Vineesh TP
Vineesh TP

Reputation: 7973

Quartz2D drawing without using drawRect:(CGRect)rect method

In Quartz2D, can I draw any shapes without using drawRect:(CGRect)rect method?

Upvotes: 2

Views: 279

Answers (1)

justin
justin

Reputation: 104718

Yes. If you want to draw to a bitmap (as one example) and produce a CGImage, you could certainly create a CGBitmapContext, then use CoreGraphics as usual using that as your context.

If you want to draw to the display, do your work from within drawRect:, using the supplied graphics context.

Upvotes: 2

Related Questions