FeatureBuilder

Properties

Link copied to clipboard
abstract val space: CoordinateSpace<T>

Functions

Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.arc(oval: Rectangle<T>, startAngle: Angle, arcLength: Angle, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, ArcFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.circle(center: T, size: Dp = 5.dp, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, CircleFeature<T>>
Link copied to clipboard
Link copied to clipboard
@JvmName(name = "draggableMultiLineFromPoints")
fun <T : Any> FeatureBuilder<T>.draggableMultiLine(points: List<T>, id: String? = null): FeatureRef<T, MultiLineFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.draw(position: T, attributes: Attributes = Attributes.EMPTY, id: String? = null, draw: DrawScope.() -> Unit): FeatureRef<T, DrawFeature<T>>
Link copied to clipboard
abstract fun <F : Feature<T>> feature(id: String?, feature: F): FeatureRef<T, F>

Add or replace feature. If id is null, then a unique id is generated

Link copied to clipboard
abstract fun group(id: String? = null, attributes: Attributes = Attributes.EMPTY, builder: FeatureGroup<T>.() -> Unit): FeatureRef<T, FeatureGroup<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.icon(position: T, image: ImageVector, size: DpSize = DpSize(image.defaultWidth, image.defaultHeight), attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, VectorIconFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.line(aCoordinates: T, bCoordinates: T, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, LineFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.multiLine(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, MultiLineFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.points(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, PointsFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.polygon(points: List<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, PolygonFeature<T>>
Link copied to clipboard
abstract fun putFeatures(features: Map<String, Feature<T>?>)
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.rectangle(centerCoordinates: T, size: DpSize = DpSize(5.dp, 5.dp), attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, RectangleFeature<T>>
Link copied to clipboard
abstract fun removeFeature(id: String)
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.scalableImage(box: Rectangle<T>, attributes: Attributes = Attributes.EMPTY, id: String? = null, painter: @Composable () -> Painter): FeatureRef<T, ScalableImageFeature<T>>
Link copied to clipboard
fun <T : Any> FeatureBuilder<T>.text(position: T, text: String, font: Font.() -> Unit = { size = 16f }, attributes: Attributes = Attributes.EMPTY, id: String? = null): FeatureRef<T, TextFeature<T>>
Link copied to clipboard
abstract fun <F : Feature<T>> updateFeature(id: String, block: (F?) -> F): FeatureRef<T, F>

Update existing feature if it is present and is of type F