I wanted to use alias drawing capability of core graphics with Zooming in capablility so the pixels will be seen very clear at 1600% or up and everything works fine in ipad 1 (no retina display)
when i have the same code running on iphone4S / 4, I can't see alias drawing is on
follow the instructions from this post CoreGraphics for retina display but the image is still not "alias"
here's the screen cap of my question - http://farm8.staticflickr.com/7161/6634020573_19d8b3549f_o.jpg
here's how i do the screen capture below - (subclass a UIView and put the drawing code in drawRect:)
- (void)drawRect:(CGRect)rect
{
//[self setNeedsDisplay];
// Drawing code
CGContextRef context = UIGraphicsGetCurrentContext();
//
CGContextSetLineWidth(context, 1.0);
CGColorSpaceRef cs=CGColorSpaceCreateDeviceRGB();
float cc[]={1.0,0.0,0.0,1.0};
CGContextSetStrokeColorWithColor(context,CGColorCreate(cs, cc));
CGContextSetShouldAntialias(context, FALSE);
CGContextSetAllowsAntialiasing(context, FALSE);
//
CGContextMoveToPoint(context,10,0);
CGContextAddLineToPoint(context, 266,256);
CGContextStrokePath(context);
CGContextSetShouldAntialias(context, TRUE);
CGContextSetAllowsAntialiasing(context, TRUE);
//
CGContextMoveToPoint(context,-10,0);
CGContextAddLineToPoint(context, 246,256);
CGContextStrokePath(context);
}
and zoom in by double tap simply
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *t=[touches anyObject];
if([t tapCount]==2) {
paper *p=[paperStack objectAtIndex:0];
CGAffineTransform transform = p.transform;
p.transform = CGAffineTransformScale(transform, 16.0f, 16.0f);
}
}
any helps / tips will be much appreciated, thank you in advance !
best, Kitdastudio