In Quartz2D, can I draw any shapes without using drawRect:(CGRect)rect method?
In Quartz2D, can I draw any shapes without using drawRect:(CGRect)rect method?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.