美文网首页
iOS 绘图

iOS 绘图

作者: 小的小碰撞 | 来源:发表于2017-05-17 17:23 被阅读0次
// 获取图形上下文
    CGContextRef con = UIGraphicsGetCurrentContext();
    
    CGContextMoveToPoint(con, 0, 0);
    CGContextAddLineToPoint(con, 5, 9);
    CGContextAddArcToPoint(con, 5, 30, 30, 30, 6);
    CGContextAddLineToPoint(con, 0, 30);
    
    CGContextClosePath(con);
    CGContextAddRect(con, CGContextGetClipBoundingBox(con));
    CGContextEOClip(con);
    // 剪裁 
    CGContextSetFillColorWithColor(con, [color CGColor]);
    CGContextMoveToPoint(con, 0, 0);
    CGContextAddLineToPoint(con, 0, 30);
    
    CGContextAddLineToPoint(con, self.bounds.size.width * self.progress, 30);
    CGContextAddLineToPoint(con, self.bounds.size.width * self.progress, 0);
    
    CGContextFillPath(con);

相关文章

  • iOS绘图详解(链接)

    iOS绘图详解iOS绘图教程

  • iOS 绘图

    转自:iOS绘图—— UIBezierPath 和 Core Graphics绘图进阶请参考:绘图 前言 iOS系...

  • iOS绘图框架CoreGraphics分析

    iOS绘图框架CoreGraphics分析 iOS绘图框架CoreGraphics分析

  • IOS 学习之绘图( Core Graphics 教学)

    IOS 绘图 总结 Core Graphics IOS中绘图的三种方式 在UIKit控件中,的drawInReat...

  • ios绘图基础

    ios绘图才一些场合很好用,这里演示一些基本的方法。 -1 ios绘图基础 -2 ios常见的图形绘制 代码下载:...

  • 绘图

    IOS中绘图的方式介绍 IOS中貌似绘图的方式还挺多的,有 Core Graphics/QuartZ 2D UIK...

  • iOS绘图功能(一)

    不同的绘图系统### iOS主要的绘图系统有UIKit,Core Graphics(Quartz), Core A...

  • 绘图1

    iOS中绘图的概念 iOS iOSopenGL Quartz UIView DrawRect 1个像素 =...

  • iOS-绘图Quartz 2D 贝赛尔曲线相关

    本篇涵盖iOS中绘图上下文,截屏相关等. 1.玩转iOS中的绘图(Quartz 2D基础篇)2.分享iOS中常用的...

  • iOS Quart2D绘图

    iOS Quart2D绘图之UIGraphicsGetCurrentContext基础。 iOS Quart2D绘...

网友评论

      本文标题:iOS 绘图

      本文链接:https://www.haomeiwen.com/subject/gyndxxtx.html