CustomCap

public final class CustomCap extensions Cap

Polyline 的起始或结束顶点为中心的位图叠加层,根据线条的第一边或最后一边的方向进行定向,并根据线条的描边宽度进行缩放。CustomCap 可应用于具有任何描边图案的 Polyline

继承的常量摘要

字段摘要

public final BitmapDescriptor bitmapDescriptor 要叠加在起始顶点或结束顶点处的位图的描述符。
public final float refWidth 参考描边宽度(以像素为单位)- 在其原生尺寸下设计帽子位图的描边宽度。

公共构造函数摘要

CustomCap(BitmapDescriptorBitmapDescriptor, float refWidth)
构造一个新的 CustomCap
CustomCap(BitmapDescriptorBitmapDescriptor)
使用默认参考描边宽度为 10 像素(等于默认描边宽度,请参阅 width(float))构造新的 CustomCap

公共方法摘要

字符串

继承的方法摘要

字段

public final BitmapDescriptor bitmapDescriptor

要叠加在起始顶点或结束顶点处的位图的描述符。

public final float refWidth

参考描边宽度(以像素为单位)- 在其原生尺寸下设计帽子位图的描边宽度。默认的参考描边宽度为 10 像素。

公共构造函数

public CustomCap BitmapDescriptorBitmapDescriptor, float refWidth)

构造一个新的 CustomCap

参数
bitmapDescriptor 要使用的位图的描述符。不得为 null
refWidth 设计原生尺寸的端帽位图的描边宽度(以像素为单位)。必须为正数。

public CustomCap (BitmapDescriptorBitmapDescriptor)

使用默认参考描边宽度为 10 像素(等于默认描边宽度,请参阅 width(float))构造新的 CustomCap

参数
bitmapDescriptor 要使用的位图的描述符。不得为 null

公共方法

public String toString ()