iOS高德地图SDK(2D)  v5.6.0
MAOverlayPathView Class Reference

该类提供使用CGPathRef来绘制overlay,默认的操作是使用fill attributes, stroke attributes绘制当前path到context中, 可以使用该类的子类MACircleView, MAPolylineView, MAPolygonView或者继承该类, 如果继承该类,需要重载-(void)createPath方法 More...

#import <MAOverlayPathView.h>

Inheritance diagram for MAOverlayPathView:
MAOverlayView MACircleView MAPolygonView MAPolylineView

Instance Methods

(void) - createPath
 子类需要重载该方法并设置(self.path = newPath) More...
 
(void) - invalidatePath
 释放当前path,调用之后 path == NULL More...
 
(void) - applyStrokePropertiesToContext:atZoomScale:
 将当前的stroke attributes设置到指定的context More...
 
(void) - applyFillPropertiesToContext:atZoomScale:
 将当前的fill attributes设置到指定的context More...
 
(void) - strokePath:inContext:
 绘制path More...
 
(void) - fillPath:inContext:
 填充path More...
 
- Instance Methods inherited from MAOverlayView
(id) - initWithOverlay:
 初始化并返回一个overlay view More...
 
(CGPoint) - pointForMapPoint:
 将MAMapPoint转化为相对于receiver的本地坐标 More...
 
(MAMapPoint- mapPointForPoint:
 将相对于receiver的本地坐标转化为MAMapPoint More...
 
(CGRect) - rectForMapRect:
 将MAMapRect转化为相对于receiver的本地rect More...
 
(MAMapRect- mapRectForRect:
 将相对于receiver的本地rect转化为MAMapRect More...
 
(BOOL) - canDrawMapRect:zoomScale:
 判断overlay view是否可以绘制包含的内容 More...
 
(void) - drawMapRect:zoomScale:inContext:
 绘制overlay view的内容 More...
 
(void) - setNeedsDisplay
 
(void) - setNeedsDisplayInMapRect:
 重绘指定map rect内的内容 More...
 
(void) - setNeedsDisplayInMapRect:zoomScale:
 重绘指定zoom scale下map rect内的内容 More...
 

Properties

UIColor * fillColor
 填充颜色,默认是[UIColor colorWithRed:0 green:1 blue:0 alpha:0.6] More...
 
UIColor * strokeColor
 笔触颜色,默认是[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6] More...
 
CGFloat lineWidth
 笔触宽度,默认是0 More...
 
CGLineJoin lineJoin
 LineJoin,默认是kCGLineJoinRound. More...
 
CGLineCap lineCap
 LineCap,默认是kCGLineCapRound. More...
 
CGFloat miterLimit
 MiterLimit,默认是10.f. More...
 
CGFloat lineDashPhase
 LineDashPhase,默认是0.f. More...
 
NSArray * lineDashPattern
 LineDashPattern,默认是nil. More...
 
CGPathRef path
 当前的path More...
 
- Properties inherited from MAOverlayView
id< MAOverlay > overlay
 关联的overlay对象 More...
 
CGFloat alpha
 overlay的透明度 More...
 
CGFloat contentScaleFactor
 context的比例系数 More...
 

Detailed Description

该类提供使用CGPathRef来绘制overlay,默认的操作是使用fill attributes, stroke attributes绘制当前path到context中, 可以使用该类的子类MACircleView, MAPolylineView, MAPolygonView或者继承该类, 如果继承该类,需要重载-(void)createPath方法

Method Documentation

◆ applyFillPropertiesToContext:atZoomScale:()

- (void) applyFillPropertiesToContext: (CGContextRef)  context
atZoomScale: (MAZoomScale zoomScale 

将当前的fill attributes设置到指定的context

Parameters
context目标context
zoomScale当前缩放比例值

◆ applyStrokePropertiesToContext:atZoomScale:()

- (void) applyStrokePropertiesToContext: (CGContextRef)  context
atZoomScale: (MAZoomScale zoomScale 

将当前的stroke attributes设置到指定的context

Parameters
context目标context
zoomScale当前缩放比例值

◆ createPath()

- (void) createPath

子类需要重载该方法并设置(self.path = newPath)

◆ fillPath:inContext:()

- (void) fillPath: (CGPathRef)  path
inContext: (CGContextRef)  context 

填充path

Parameters
path要绘制的path
context目标context

◆ invalidatePath()

- (void) invalidatePath

释放当前path,调用之后 path == NULL

◆ strokePath:inContext:()

- (void) strokePath: (CGPathRef)  path
inContext: (CGContextRef)  context 

绘制path

Parameters
path要绘制的path
context目标context

Property Documentation

◆ fillColor

- (UIColor*) fillColor
readwriteatomicstrong

填充颜色,默认是[UIColor colorWithRed:0 green:1 blue:0 alpha:0.6]

◆ lineCap

- (CGLineCap) lineCap
readwriteatomic

LineCap,默认是kCGLineCapRound.

◆ lineDashPattern

- (NSArray*) lineDashPattern
readwriteatomiccopy

LineDashPattern,默认是nil.

◆ lineDashPhase

- (CGFloat) lineDashPhase
readwriteatomic

LineDashPhase,默认是0.f.

◆ lineJoin

- (CGLineJoin) lineJoin
readwriteatomic

LineJoin,默认是kCGLineJoinRound.

◆ lineWidth

- (CGFloat) lineWidth
readwriteatomic

笔触宽度,默认是0

◆ miterLimit

- (CGFloat) miterLimit
readwriteatomic

MiterLimit,默认是10.f.

◆ path

- (CGPathRef) path
readwriteatomic

当前的path

◆ strokeColor

- (UIColor*) strokeColor
readwriteatomicstrong

笔触颜色,默认是[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6]


The documentation for this class was generated from the following file:
© 2017 高德信息技术有限公司 版权所有,保留所有权利。