Fork me on GitHub
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 125 下一页

2012年4月24日

摘要: 转自 :http://lockriver.blog.163.com/blog/static/48723224201141045739670/Paths中的几个重要元素Pointsvoid CGContextMoveToPoint (CGContextRef c,CGFloat x,CGFloat y);指定一个点成为current pointQuartz会跟踪current point一般执行完一个相关函数后,current point都会相应的改变.Lines相关的几个函数void CGContextAddLineToPoint (CGContextRef c,CGFloat x,CGFlo 阅读全文
posted @ 2012-04-24 12:04 pengyingh 阅读(4895) 评论(0) 推荐(1)
摘要: Internally, -drawInRect: will rotate the image into the correct orientation according to the imageOrientation property, then flip the image upside down to convert UIKit coordinates into CoreGraphics coordinates. Then it will call CGContextDrawImage. In this sense, -drawInRect: is surely slower.But u 阅读全文
posted @ 2012-04-24 09:34 pengyingh 阅读(478) 评论(0) 推荐(0)

2012年4月23日

摘要: http://justiseek.diandian.com/post/2012-01-31/147524601.UIGraphicsBeginImageContextWithOptions(pageView.page.bounds.size, YES, zoomScale);[pageView.page.layer renderInContext:UIGraphicsGetCurrentContext()];UIImage *uiImage = UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEndImageContext();2.- 阅读全文
posted @ 2012-04-23 19:11 pengyingh 阅读(13400) 评论(0) 推荐(0)
摘要: http://blog.sina.com.cn/s/blog_7ccde1bf0100ysi2.html以下Carbon代码可以将PDF页面CGPDFPageRef转换为Quartz的CGImageRef格式,这样就可以将PDF页面用在Core Animation中了。CGImageRefPDFPageToCGImage(size_tpageNumber,CGPDFDocumentRefdocument){CGPDFPageRefpage;CGRectpageSize;CGContextRefoutContext;CGImageRefThePDFImage;CGAffineTransformc 阅读全文
posted @ 2012-04-23 18:56 pengyingh 阅读(1433) 评论(0) 推荐(0)
摘要: http://bbs.51cto.com/thread-842406-1-1.html#define HIRESDEVICE (((int)rintf([[[UIScreen mainScreen] currentMode] size].width/[[UIScreen mainScreen] bounds].size.width )>1))- (CGImageRef) blerg { CGFloat imageScale = (CGFloat)1.0; CGFloat width = (CGFloat)180.0; CGFloat height = (CGFloat)180.0; .. 阅读全文
posted @ 2012-04-23 18:53 pengyingh 阅读(954) 评论(0) 推荐(0)

2012年4月21日

摘要: To extend on the subject, ...without crashing? I load about 15 full size images from the photo library in UIImageViews and get out of memory warnings and eventually an app crash. These images range from around 250KB to 400KB. The UIImageViews are set to aspect fit.The photo library seems to load sma 阅读全文
posted @ 2012-04-21 13:22 pengyingh 阅读(320) 评论(0) 推荐(0)
摘要: http://bbs.weiphone.com/read-htm-tid-95491.html我的代码做了如下:NSString* sCands = [NSString stringWithUTF8String:"欢迎"];//struct __GSFont * font=[NSClassFromString(@"WebFontCache") createFontWithFamily:@"STHeiti" traits:2 size:18.];//struct __GSFont * font=GSFontCreateWithName( 阅读全文
posted @ 2012-04-21 13:06 pengyingh 阅读(878) 评论(0) 推荐(0)
摘要: I load a UIImageView with an image depending on user interaction. When the parent view is initially displayed, no image has been selected and the imageview is black. If the user leaves that view and comes back, the image is still there. I've triedmyImageView.image = nil;upon leaving the view but 阅读全文
posted @ 2012-04-21 12:53 pengyingh 阅读(436) 评论(0) 推荐(0)
摘要: http://stackoverflow.com/questions/3838725/what-is-the-difference-between-uiimageview-and-drawinrectI want to display so many images in table cells. I knew two methods to show an image.One is creating an instance to UIImageView and show itCGRect rect=CGRectMake(x,y,width,height);UIImageView*image=[[ 阅读全文
posted @ 2012-04-21 12:51 pengyingh 阅读(1031) 评论(0) 推荐(0)
摘要: Hi, I'm trying to correct the camera's image orientation.I'm using this function lifted out of a book but it's returning an image.Can you see what's wrong?I'm using ios 5.- (UIImage *)fixOrientation: (UIImage *) image{ CGSize size = image.size; if (image.imageOrientation == U 阅读全文
posted @ 2012-04-21 12:15 pengyingh 阅读(221) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 125 下一页

导航