- (UIImage*) createImageWithColor: (UIColor*) color
{
CGRect rect=CGRectMake(0,0,
1, 1);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurren...
分类:
其他好文 时间:
2015-01-26 19:22:52
阅读次数:
226
1.截取当前屏幕
CGSize windowSize = behandView.bounds.size;
UIGraphicsBeginImageContextWithOptions(windowSize, YES, 2.0);
CGContextRef context = UIGraphicsGetCurrentContext();
[behandVi...
分类:
移动开发 时间:
2015-01-20 18:11:44
阅读次数:
282
//根据颜色创建一个图片
+?(UIImage?*)createImageWithColor:(UIColor?*)color?rect:(CGRect)rect
{
????UIGraphicsBeginImageContext(rect.size);
????CGContextRef?context?=?UIGraphicsGetCurr...
分类:
移动开发 时间:
2015-01-05 15:10:06
阅读次数:
212
+(UIImage *)screenForView:(UIView *)view{// UIGraphicsBeginImageContext(view.frame.size);// CGContextRef context = UIGraphicsGetCurrentContext();// [v...
分类:
移动开发 时间:
2014-12-27 20:25:33
阅读次数:
149
首先,获取上下文 CGContextRef context = UIGraphicsGetCurrentContext();复制代码 画线 //设置画笔线条粗细 CGContextSetLineWidth(context, 5.0); //设置线条样式 CGContextSetLineC...
分类:
移动开发 时间:
2014-12-26 21:31:50
阅读次数:
251
一、画线段 1 - (void)drawRect:(CGRect)rect 2 { 3 // Drawing code 4 // 1.获得图形上下文 5 CGContextRef ctx = UIGraphicsGetCurrentContext(); 6 7 ...
分类:
移动开发 时间:
2014-12-21 23:21:31
阅读次数:
285
0 CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文
1 CGContextMoveToPoint 开始画线
2 CGContextAddLineToPoint 画直线
4 CGContextAddEllipseInRect 画一椭圆
4 CGContextSetLineCap 设置线条终点形状
4 CGCon...
分类:
移动开发 时间:
2014-12-19 17:32:37
阅读次数:
194
+ (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
// 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
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