Hi , everyone!
I have a problem. In my game, have a background image 480x320, add this image to a layer (z:0) take as a sprite . I want to draw a line display over background image. someone has sample code?
thanks!
A fast, easy to use, free, and community supported 2D game engine
Hi , everyone!
I have a problem. In my game, have a background image 480x320, add this image to a layer (z:0) take as a sprite . I want to draw a line display over background image. someone has sample code?
thanks!
Have a look at
http://www.codza.com/creating-and-drawing-on-a-new-uiimage
After UIGraphicsPushContext(context);
you can draw to the context e.g.
CGContextBeginPath(context);
CGContextAddArc(context,10,10,10,0,2*M_PI,1);
CGContextSetRGBFillColor(context, 1, 0, 0, 1);
CGContextFillPath(context);
also see
http://www.iphonedevsdk.com/forum/iphone-sdk-development/13540-drawing-uiimage-memory-issues.html
You could set the background to (z:-1) and use the primitive commands, look at the draw primitives test that comes with the example code.
Hi, Kahless!
thanks you!
You must log in to post.