TencentMapSDK_iOS_3D_v6.8.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
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 分段颜色线
115@property (nonatomic, copy) NSArray<QSegmentColor *> *segmentColor;
116
117#pragma mark 纹理线通用
124@property (nonatomic, strong) UIImage *styleTextureImage;
125
126
127#pragma mark 分段纹理线
133@property (nonatomic, copy) NSArray<QSegmentStyle *> *segmentStyle;
134
135#pragma mark 纹理线上的箭头
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 脚印线
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
QPolylineView
此类是QPolyline用于显示多段线的view
定义 QPolylineView.h:19
QSegmentColor
QTexturePolylineView中各个子线段的颜色定义
定义 QTexturePolylineView.h:52
QSegmentColor::color
UIColor * color
本线段显示的颜色
定义 QTexturePolylineView.h:65
QSegmentColor::startIndex
int startIndex
本线段的起始坐标点在坐标点串(QPolyline.points)的下标. 从0开始
定义 QTexturePolylineView.h:56
QSegmentColor::borderColor
UIColor * borderColor
本线段显示的描边颜色. 可为nil
定义 QTexturePolylineView.h:69
QSegmentColor::endIndex
int endIndex
本线段的终点坐标点在坐标点串(QPolyline.points)的下标
定义 QTexturePolylineView.h:61
QSegmentStyle
QTexturePolylineView中各个子线段的样式定义
定义 QTexturePolylineView.h:15
QSegmentStyle::startIndex
int startIndex
本线段的起始坐标点在坐标点串(QPolyline.points)的下标. 从0开始
定义 QTexturePolylineView.h:19
QSegmentStyle::colorImageIndex
int colorImageIndex
本线段显示的颜色下标。代表styleTextureImage图片或默认图片的所采用的行(1像素为单位)
定义 QTexturePolylineView.h:44
QSegmentStyle::endIndex
int endIndex
本线段的终点坐标点在坐标点串(QPolyline.points)的下标
定义 QTexturePolylineView.h:23
QTexturePolylineView
具有丰富显示样式的线覆盖物
定义 QTexturePolylineView.h:94
QTexturePolylineView::segmentColor
NSArray< QSegmentColor * > * segmentColor
定义了各子线段的颜色. 当 QTextureLineDrawType_ColorLine 有效.
定义 QTexturePolylineView.h:115
QTexturePolylineView::styleTextureImage
UIImage * styleTextureImage
绘制线所采用的纹理. 当非QTextureLineDrawType_ColorLine有效.
定义 QTexturePolylineView.h:124
QTexturePolylineView::eraseColor
UIColor * eraseColor
擦掉时时采用的颜色. 默认为灰色(置灰)
定义 QTexturePolylineView.h:165
QTexturePolylineView::symbolGap
CGFloat symbolGap
箭头之间的间距. 单位：Point
定义 QTexturePolylineView.h:155
QTexturePolylineView::footprintStep
CGFloat footprintStep
footprints之间的间距。 单位：Point
定义 QTexturePolylineView.h:183
QTexturePolylineView::drawSymbol
BOOL drawSymbol
是否绘制箭头图标
定义 QTexturePolylineView.h:141
QTexturePolylineView::symbolImage
UIImage * symbolImage
箭头图标。默认采用默认样式箭头
定义 QTexturePolylineView.h:148
QTexturePolylineView::useGradient
BOOL useGradient
是否使用渐变效果, 仅在drawType为QTextureLineDrawType_ColorLine时有效 渐变时, 以QSegmentColor的startIndex作为渐变点颜色标记位
定义 QTexturePolylineView.h:106
QTexturePolylineView::drawType
QTextureLineDrawType drawType
线绘制方式.
定义 QTexturePolylineView.h:100
QTexturePolylineView::segmentStyle
NSArray< QSegmentStyle * > * segmentStyle
定义了各子线段的样式. 当 非QTextureLineDrawType_ColorLine 有效.
定义 QTexturePolylineView.h:133