Re: Patterns in Cocoa ?
Re: Patterns in Cocoa ?
- Subject: Re: Patterns in Cocoa ?
- From: Gibbons Burke <email@hidden>
- Date: Wed, 19 Jun 2002 10:42:01 -0500
>
At 7:01 AM -0400 6/19/02, Robert Miller wrote:
>
Does anyone know if there is an equivalent to the old QuickDraw
>
'pattern' in Cocoa. Something that could be used to fill in solid
>
geometric shapes, ie. gray, striped, bricks, etc... ?
Interface Builder (April 2002 beta) includes a view widget in the GraphicsViews palette called "NSQuickDrawView". This class lets you to make direct calls to the Carbon API's QuickDraw commands from your Cocoa application.
The documentation at the ADC for this class is here:
<
http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ProgrammingTopics/DrawViews/Concepts/AboutQDViews.html>
and here:
<
http://developer.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSQuickDrawView.html>
and there is some sample code:
<
http://developer.apple.com/samplecode/Sample_Code/QuickTime/Basics/QTGraphicsImport.htm>
More Cocoa examples of what you are trying to do can be found in the "Sketch" project found here:
/Developer/Examples/AppKit/Sketch
It shows how to draw geometric shapes and fill them with colors, however, it doesn't seem to support Quickdraw-style pattern fills.
Hope this helps,
--
Gibbons Burke Grey-eyed Athena sent them a favorable breeze,
a fresh west wind, singing over the wine-dark sea.
[Homer, The Odyssey, II, l.420.]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.