Skip to content

二维绘图引擎ZQuartz 提供矩形,圆角矩形,圆,扇形,曲线,折线,弧线等.

License

Notifications You must be signed in to change notification settings

zhuayi/UIView-ZQuartz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

二维绘图引擎ZQuartz

CI Status Version License Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

API

绘制图片

- (void)drawImage:(CGRect)rect image:(UIImage *)image;

绘制文字

- (void)drawText:(CGPoint)point text:(NSString *)text fontSize:(NSDictionary *)fontStyle

绘制带边框线的矩形

- (void)drawRectangle:(CGRect)rect lineWidth:(CGFloat)lineWidth color:(UIColor *)color

绘制矩形

- (void)drawRectangle:(CGRect)rect

绘制圆角矩形

- (void)drawRectangle:(CGRect)rect withRadius:(float)radius;

绘制画多边形

- (void)drawPolygon:(NSArray *)pointArray

绘制圆形

- (void)drawCircleWithCenter:(CGPoint)center radius:(float)radius

绘制曲线

- (void)drawCurveFrom:(CGPoint)startPoint
                   to:(CGPoint)endPoint
        controlPoint1:(CGPoint)controlPoint1
        controlPoint2:(CGPoint)controlPoint2;

绘制弧线

- (void)drawArcFromCenter:(CGPoint)center
                   radius:(float)radius
               startAngle:(float)startAngle
                 endAngle:(float)endAngle
                clockwise:(BOOL)clockwise;

绘制扇形

- (void)drawSectorFromCenter:(CGPoint)center
                      radius:(float)radius
                  startAngle:(float)startAngle
                    endAngle:(float)endAngle
                   clockwise:(BOOL)clockwise

绘制直线

- (void)drawLineFrom:(CGPoint)startPoint to:(CGPoint)endPoint

绘制折线 ,连续直线

- (void)drawLines:(NSArray *)pointArray;

Installation

UIView-ZQuartz is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "UIView-ZQuartz"

Author

renxin, [email protected]

License

UIView-ZQuartz is available under the MIT license. See the LICENSE file for more info.

About

二维绘图引擎ZQuartz 提供矩形,圆角矩形,圆,扇形,曲线,折线,弧线等.

Resources

License

Stars

Watchers

Forks

Packages

No packages published