[6.5.0][overlay] 绘线添加自定义纹理选项

This commit is contained in:
renwj
2024-06-13 14:22:27 +08:00
parent efe3eb1eed
commit 27328c05a9

View File

@@ -52,6 +52,8 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
val lightSpeed: Float = builder.lightSpeed
val customTexture: Bitmap? = builder.customTexture
fun builder(): Builder {
return builder
}
@@ -92,6 +94,8 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
internal var lightSpeed: Float = 0f
internal var customTexture: Bitmap? = null
fun setId(id: String) = apply {
this.id = id
}
@@ -160,6 +164,10 @@ data class Polyline(val id: String, val owner: String, val level: Level, val opt
this.lightSpeed = speed
}
fun setCustomTexture(texture: Bitmap) = apply {
this.customTexture = texture
}
fun build(): Options {
if (TextUtils.isEmpty(id)) {
id = UUID.randomUUID().toString()