quartz2d

How to draw a sinusodial wave which varies with time on a UIView in Objective C ?

Hi All, I want to draw a sinusodial wave which varies with time on a UIView. What are the approaches should i take ? Any sample code is there ?? ...

Why are my lines getting thicker and thicker?

I try to draw some lines with different colors. This code tries to draw two rectangles with 1px thin lines. However, the second rectangle is drawn with 2px width lines, while the first one is drawn with 1px width. - (void)addLineFrom:(CGPoint)p1 to:(CGPoint)p2 context:(CGContextRef)context { // set the current point CGContex...

Problem draw line by Quartz 2D with alpha property < 1.0 on iPhone

Hello Everybody ! This code i use to draw in my app. So i have problem, if i draw with alpha property = 1. It is very good but if i change alpha property = 0.2 then my paint is not good. How do i make for better with alpha property = 0.2. http://www.flickr.com/photos/9601621@N05/page1/ Draw with alpha = 1: It is good Draw with alpha =...

Drop shadow coordinate different from iPhone OS 3.2?

I'm trying to draw a custom view with a drop shadow. I'm having different results from iPhone OS 3.2. Has the coordinate system changed for CGContextSetShadowWithColor from 3.2? Here is the code I'm using: CGContextRef graphicContext = UIGraphicsGetCurrentContext(); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloa...

UIImage from UIView to UIViewController

I am creating a UIImage programmatically in my UIView's drawRect function. Is there a way that the UIViewController responsible for this UIView access that image (or a copy of it) for manipulation? Appreciate any pointers and thanks in advance. ...

Inserting a Background Image using Quartz2d and Context ?

Hi all, I have written a game using Quartz2d. I would like a insert a background image to the game. I have tried doing this using the view.insertSubView method however the background image is always placed on top of the other sprites. Even using sendSubviewToBack does not solve this. I assume I need to somehow draw the background image ...

quartz 2d iphone not drawing

i was trying out quartz 2d today and i got to learn basic drawing and other things, but now, somehow everything i do doesn't draw a thing on the iphone screen! i tried making a new project and starting from scratch but still no luck... first, i made a new view based application, and then created a new file (.h and .m) as a subclass of UI...