TencentMapSDK_iOS_3D_v1.3.3
QOverlayPathView.h
1 //
2 // QOverlayPathView.h
3 // QMapKit
4 //
5 //
6 // Created by jeff on 14-8-4.
7 // Copyright (c) 2014年 Tencent. All rights reserved.
8 
9 #import <UIKit/UIKit.h>
10 #import "QOverlayView.h"
11 
19 Q_EXTERN @interface QOverlayPathView : QOverlayView
20 
24 @property (nonatomic, strong) UIColor *fillColor;
25 
29 @property (nonatomic, strong) UIColor *strokeColor;
30 
34 @property (nonatomic, assign) CGFloat lineWidth;
35 
39 @property (nonatomic, assign) CGLineJoin lineJoin;
40 
44 @property (nonatomic, assign) CGLineCap lineCap;
45 
49 @property (nonatomic, assign) CGFloat miterLimit;
50 
54 @property (nonatomic, assign) CGFloat lineDashPhase;
55 
59 @property (nonatomic, copy) NSArray *lineDashPattern;
60 
64 - (void)createPath;
65 
69 @property CGPathRef path;
70 
74 - (void)invalidatePath;
75 
82 - (void)applyStrokePropertiesToContext:(CGContextRef)context atZoomScale:(QZoomScale)zoomScale;
83 
90 - (void)applyFillPropertiesToContext:(CGContextRef)context atZoomScale:(QZoomScale)zoomScale;
91 
98 - (void)strokePath:(CGPathRef)path inContext:(CGContextRef)context;
99 
106 - (void)fillPath:(CGPathRef)path inContext:(CGContextRef)context;
107 
108 @end
UIColor * strokeColor
笔触颜色,默认是[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6]
Definition: QOverlayPathView.h:29
该类是地图覆盖物View的基类, 提供了绘制overlay的接口, 但是没有实际实现。希望不要直接实例化,通常通过子类重写[drawMapRect:zoomScale:inContext:]来绘制内容
Definition: QOverlayView.h:16
CGLineJoin lineJoin
折线拐点样式,默认是kCGLineJoinRound
Definition: QOverlayPathView.h:39
CGPathRef path
当前path
Definition: QOverlayPathView.h:69
CGFloat lineDashPhase
虚线属性, 默认为0.f
Definition: QOverlayPathView.h:54
CGFloat lineWidth
笔触宽度,默认是0
Definition: QOverlayPathView.h:34
void createPath()
子类需要重载该方法并设置(self.path = newPath)
CGFloat miterLimit
线条交点样式参数,默认为10.f
Definition: QOverlayPathView.h:49
CGLineCap lineCap
线头尾样式,默认是kCGLineCapRound
Definition: QOverlayPathView.h:44
该类提供使用CGPathRef来绘制overlay
Definition: QOverlayPathView.h:19
void invalidatePath()
释放当前path,调用之后 path == NULL
UIColor * fillColor
填充颜色,默认是[UIColor colorWithRed:0 green:1 blue:0 alpha:0.6]
Definition: QOverlayPathView.h:24
NSArray * lineDashPattern
虚线模式, 默认为nil
Definition: QOverlayPathView.h:59