Hi Guys,
I'm playing with some Quartz 2D samples,
and have gotten everything to work as expected with regard to drawing primitives, etc.
I am now trying to move some text on the screen
Problem is, the screen is drawn correctly the first time,
and is never refreshed.
How to I get it to cycle?
This is happening in the drawRect function from the Quartz line draw sample code
Cheers, Art.
I'm playing with some Quartz 2D samples,
and have gotten everything to work as expected with regard to drawing primitives, etc.
I am now trying to move some text on the screen
Code:
CGContextSetTextDrawingMode(context, kCGTextFill);
CGContextShowTextAtPoint(context, 88.0, y, kTextString, kTextStringLength);
// increment or decrement y coord according to direction
if (d == 0) {y = y - 1;} else {y = y + 1;}
// change direction when limit is reached
if (y > 450) {d = 0;}
if (y < 10) {d = 1;}
Problem is, the screen is drawn correctly the first time,
and is never refreshed.
How to I get it to cycle?
This is happening in the drawRect function from the Quartz line draw sample code
Code:
- (void)drawRect:(CGRect)rect {
Cheers, Art.