TencentMapSDK_iOS_3D_v6.4.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;
60
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
80typedef NS_ENUM(NSInteger, QTextureLineDrawType) {
81 QTextureLineDrawType_ColorLine = -1, // 不使用纹理, 而且以颜色的形式绘制, 使用segmentColor中色值绘制
82 QTextureLineDrawType_SliceAsBackground, // 将图片以1像素为单位按行切片,根据下标从图片选取1像素来绘制线路样式(最大支持16像素高)
83 QTextureLineDrawType_RepeatDraw, // 重复绘制整个图片
84 QTextureLineDrawType_FootPrint, // 以足迹的形式重复绘制整个图片
85};
86
94
100@property (nonatomic, assign) QTextureLineDrawType drawType;
101
106@property (nonatomic, assign) BOOL useGradient;
107
108#pragma mark 分段颜色线
115@property (nonatomic, copy) NSArray<QSegmentColor *> *segmentColor;
116
117#pragma mark 纹理线通用
124@property (nonatomic, strong) UIImage *styleTextureImage;
125
126#pragma mark 分段纹理线
132@property (nonatomic, copy) NSArray<QSegmentStyle *> *segmentStyle;
133
134#pragma mark 纹理线上的箭头
140@property (nonatomic, assign, getter=isDrawSymbol) BOOL drawSymbol;
141
147@property (nonatomic, strong) UIImage *symbolImage;
148
154@property (nonatomic, assign) CGFloat symbolGap;
155
156
157#pragma mark 路线擦除
158
164@property (nonatomic, strong) UIColor *eraseColor;
165
174- (void)eraseFromStartToCurrentPoint:(CLLocationCoordinate2D)coordinate searchFrom:(int)pointIndex toColor:(BOOL)clearColor;
175
176#pragma mark 脚印线
182@property (nonatomic, assign) CGFloat footprintStep;
183
184@end
185
189@interface QTexturePolylineView (Navigation)
190
196- (void)setTurnArrowAtSegmentIndex:(int)index;
197
202
206- (void)setTurnArrowColor:(UIColor*)filler borderColor:(UIColor*)border DEPRECATED_ATTRIBUTE;
207
208@end
209
void clearTurnArrow()
隐藏转向箭头
此类是QPolyline用于显示多段线的view
定义 QPolylineView.h:19
QTexturePolylineView中各个子线段的颜色定义
定义 QTexturePolylineView.h:52
UIColor * color
本线段显示的颜色
定义 QTexturePolylineView.h:65
int startIndex
本线段的起始坐标点在坐标点串(QPolyline.points)的下标. 从0开始
定义 QTexturePolylineView.h:56
UIColor * borderColor
本线段显示的描边颜色. 可为nil
定义 QTexturePolylineView.h:69
int endIndex
本线段的终点坐标点在坐标点串(QPolyline.points)的下标
定义 QTexturePolylineView.h:61
QTexturePolylineView中各个子线段的样式定义
定义 QTexturePolylineView.h:15
int startIndex
本线段的起始坐标点在坐标点串(QPolyline.points)的下标. 从0开始
定义 QTexturePolylineView.h:19
int colorImageIndex
本线段显示的颜色下标。代表styleTextureImage图片或默认图片的所采用的行(1像素为单位)
定义 QTexturePolylineView.h:44
int endIndex
本线段的终点坐标点在坐标点串(QPolyline.points)的下标
定义 QTexturePolylineView.h:23
具有丰富显示样式的线覆盖物
定义 QTexturePolylineView.h:94
NSArray< QSegmentColor * > * segmentColor
定义了各子线段的颜色. 当 QTextureLineDrawType_ColorLine 有效.
定义 QTexturePolylineView.h:115
UIImage * styleTextureImage
绘制线所采用的纹理. 当非QTextureLineDrawType_ColorLine有效.
定义 QTexturePolylineView.h:124
UIColor * eraseColor
擦掉时时采用的颜色. 默认为灰色(置灰)
定义 QTexturePolylineView.h:164
CGFloat symbolGap
箭头之间的间距. 单位:Point
定义 QTexturePolylineView.h:154
CGFloat footprintStep
footprints之间的间距。 单位:Point
定义 QTexturePolylineView.h:182
BOOL drawSymbol
是否绘制箭头图标
定义 QTexturePolylineView.h:140
UIImage * symbolImage
箭头图标。默认采用默认样式箭头
定义 QTexturePolylineView.h:147
BOOL useGradient
是否使用渐变效果, 仅在drawType为QTextureLineDrawType_ColorLine时有效 渐变时, 以QSegmentColor的startIndex作为渐变点颜色标记位
定义 QTexturePolylineView.h:106
QTextureLineDrawType drawType
线绘制方式.
定义 QTexturePolylineView.h:100
NSArray< QSegmentStyle * > * segmentStyle
定义了各子线段的样式. 当 非QTextureLineDrawType_ColorLine 有效.
定义 QTexturePolylineView.h:132