[Mono-osx] Draw Image and Font

Jon Lipsky jon.lipsky at elevenworks.com
Mon Feb 6 21:57:28 UTC 2012

Hi Luca,

Create a subclass of NSView, and override the DrawRect method:

public override void DrawRect(RectangleF rect)
   var context = NSGraphicsContext.CurrentContext;

   ... do your drawing here ...   

You can then add your custom view to a window.


On Feb 6, 2012, at 3:48 PM, De Santis Luca wrote:

> I need draw image and font on a Cocoa Window with a loop, like videogame. I use NSImage to store images, but with monomac documentation I can't understad how to create a graphic context and draw all images on the window.
> Luca
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-osx/attachments/20120206/02c273ea/attachment.html>

More information about the Mono-osx mailing list