码迷,mamicode.com
首页 >  
搜索关键字:cgcontextref    ( 206个结果
color 转 image
- (UIImage*) createImageWithColor: (UIColor*) color {     CGRect rect=CGRectMake(0,0, 1, 1);     UIGraphicsBeginImageContext(rect.size);     CGContextRef context = UIGraphicsGetCurren...
分类:其他好文   时间:2015-01-26 19:22:52    阅读次数:226
iOS 截屏以及相关扩展(UIImage的绘制和渲染)
1.截取当前屏幕   CGSize windowSize = behandView.bounds.size;     UIGraphicsBeginImageContextWithOptions(windowSize, YES, 2.0);     CGContextRef context = UIGraphicsGetCurrentContext();     [behandVi...
分类:移动开发   时间:2015-01-20 18:11:44    阅读次数:282
iOS 自定义Button的高亮和normal
//根据颜色创建一个图片 +?(UIImage?*)createImageWithColor:(UIColor?*)color?rect:(CGRect)rect { ????UIGraphicsBeginImageContext(rect.size); ????CGContextRef?context?=?UIGraphicsGetCurr...
分类:移动开发   时间:2015-01-05 15:10:06    阅读次数:212
【iOS】iPhone截图并添加水印
+(UIImage *)screenForView:(UIView *)view{// UIGraphicsBeginImageContext(view.frame.size);// CGContextRef context = UIGraphicsGetCurrentContext();// [v...
分类:移动开发   时间:2014-12-27 20:25:33    阅读次数:149
iOS 绘制直线、矩形、文字的方式
首先,获取上下文 CGContextRef context = UIGraphicsGetCurrentContext();复制代码 画线 //设置画笔线条粗细 CGContextSetLineWidth(context, 5.0); //设置线条样式 CGContextSetLineC...
分类:移动开发   时间:2014-12-26 21:31:50    阅读次数:251
【iOS】Quartz2D基本图形
一、画线段 1 - (void)drawRect:(CGRect)rect 2 { 3 // Drawing code 4 // 1.获得图形上下文 5 CGContextRef ctx = UIGraphicsGetCurrentContext(); 6 7 ...
分类:移动开发   时间:2014-12-21 23:21:31    阅读次数:285
iOS CGContex小记
0 CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文 1 CGContextMoveToPoint 开始画线  2 CGContextAddLineToPoint 画直线  4 CGContextAddEllipseInRect 画一椭圆  4 CGContextSetLineCap 设置线条终点形状  4 CGCon...
分类:移动开发   时间:2014-12-19 17:32:37    阅读次数:194
UIColor转化为UIImage
+ (UIImage *)createImageWithColor:(UIColor *)color {     CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);     UIGraphicsBeginImageContext(rect.size);     CGContextRef context = UIGraphics...
分类:其他好文   时间:2014-12-08 19:40:57    阅读次数:152
IOS Quartz 各种绘制图形用法---实现画图片、写文字、画线、椭圆、矩形、棱形等
// Only override drawRect: if you perform custom drawing.   // An empty implementation adversely affects performance during animation.   - (void)drawRect:(CGRect)rect   {       CGContextRef contex...
分类:移动开发   时间:2014-11-13 09:24:05    阅读次数:350
iOS :绘图
1、画圆弧a、void CGContextAddArc(CGContextRef c, CGFloat x, CGFloat y, CGFloat radius, CGFloat startAngle, CGFloat endAngle, int clockwise)CGContextRef不解释了...
分类:移动开发   时间:2014-11-10 21:10:32    阅读次数:232
206条   上一页 1 ... 15 16 17 18 19 ... 21 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!