QPainter equivalent in Objective C
I'm trying to translate a Qt project in Objective-C
It is a blockbraker. I need to find the equivalent for QPainter, un Qt object that call the 开发者_StackOverflowWindows fonction to draw something on the screen.
So I need anything that allows me to draw lines, ellipse and, most important of all, png images.
Thanks
You'll want to have a look at the Cocoa Drawing Guide, which explains how to draw things in Cocoa. Specifically, the NSBezierPath
lets you draw shapes, and NSImage
lets you work with PNGs. But there are other classes you need to know about in order to change colors, etc.
精彩评论