TencentMapSDK_iOS_3D_v6.7.0

QTexturePolylineView.h
1 //
2 // QTexturePolylineView.h
3 // QMapKit
4 //
5 // Created by fan on 2017/7/13.
6 // Copyright © 2017年 tencent. All rights reserved.
7 //
8
9 #import "QPolylineView.h"
10
14 @interface QSegmentStyle : NSObject
15
19 @property (nonatomic, assign) int startIndex;
23 @property (nonatomic, assign) int endIndex;
44 @property (nonatomic, assign) int colorImageIndex;
45
46 @end
47
51 @interface QSegmentColor : NSObject
52
56 @property (nonatomic, assign) int startIndex;
61 @property (nonatomic, assign) int endIndex;
65 @property (nonatomic, strong) UIColor *color;
69 @property (nonatomic, strong) UIColor *borderColor;
70
71 @end
72
73 #pragma mark - QTexturePolylineView
74
80 typedef NS_ENUM(NSInteger, QTextureLineDrawType) {
81 QTextureLineDrawType_ColorLine = -1, // 不使用纹理, 而且以颜色的形式绘制, 使用segmentColor中色值绘制
82 QTextureLineDrawType_SliceAsBackground, // 将图片以1像素为单位按行切片，根据下标从图片选取1像素来绘制线路样式(最大支持16像素高)
83 QTextureLineDrawType_RepeatDraw, // 重复绘制整个图片
84 QTextureLineDrawType_FootPrint, // 以足迹的形式重复绘制整个图片
85 };
86
93 @interface QTexturePolylineView : QPolylineView
94
100 @property (nonatomic, assign) QTextureLineDrawType drawType;
101
106 @property (nonatomic, assign) BOOL useGradient;
107
108 #pragma mark 分段颜色线
109
115 @property (nonatomic, copy) NSArray<QSegmentColor *> *segmentColor;
116
117 #pragma mark 纹理线通用
118
124 @property (nonatomic, strong) UIImage *styleTextureImage;
125
126
127 #pragma mark 分段纹理线
128
133 @property (nonatomic, copy) NSArray<QSegmentStyle *> *segmentStyle;
134
135 #pragma mark 纹理线上的箭头
136
141 @property (nonatomic, assign, getter=isDrawSymbol) BOOL drawSymbol;
142
148 @property (nonatomic, strong) UIImage *symbolImage;
149
155 @property (nonatomic, assign) CGFloat symbolGap;
156
157
158 #pragma mark 路线擦除
159
165 @property (nonatomic, strong) UIColor *eraseColor;
166
175 - (void)eraseFromStartToCurrentPoint:(CLLocationCoordinate2D)coordinate searchFrom:(int)pointIndex toColor:(BOOL)clearColor;
176
177 #pragma mark 脚印线
178
183 @property (nonatomic, assign) CGFloat footprintStep;
184
185 @end
186
190 @interface QTexturePolylineView (Navigation)
191
197 - (void)setTurnArrowAtSegmentIndex:(int)index;
198
202 - (void)clearTurnArrow;
203
207 - (void)setTurnArrowColor:(UIColor*)filler borderColor:(UIColor*)border DEPRECATED_ATTRIBUTE;
208
209 @end
210
QSegmentStyle::startIndex
int startIndex
本线段的起始坐标点在坐标点串(QPolyline.points)的下标. 从0开始
Definition: QTexturePolylineView.h:19
QSegmentStyle::endIndex
int endIndex
本线段的终点坐标点在坐标点串(QPolyline.points)的下标
Definition: QTexturePolylineView.h:23
QSegmentColor
QTexturePolylineView中各个子线段的颜色定义
Definition: QTexturePolylineView.h:52
QPolylineView
此类是QPolyline用于显示多段线的view
Definition: QPolylineView.h:19
QTexturePolylineView
具有丰富显示样式的线覆盖物
Definition: QTexturePolylineView.h:94
QSegmentStyle
QTexturePolylineView中各个子线段的样式定义
Definition: QTexturePolylineView.h:15
QSegmentStyle::colorImageIndex
int colorImageIndex
本线段显示的颜色下标。代表styleTextureImage图片或默认图片的所采用的行(1像素为单位)
Definition: QTexturePolylineView.h:44