line builder for scheme
This commit is contained in:
parent
354cd8c9a2
commit
9c5c4b5747
@ -121,13 +121,24 @@ fun SchemeFeaturesState.draw(
|
||||
drawFeature: DrawScope.() -> Unit,
|
||||
) = addFeature(id, SchemeDrawFeature(position.toCoordinates(), scaleRange, drawFeature))
|
||||
|
||||
fun SchemeFeaturesState.line(
|
||||
aCoordinates: SchemeCoordinates,
|
||||
bCoordinates: SchemeCoordinates,
|
||||
scaleRange: FloatRange = defaultScaleRange,
|
||||
color: Color = Color.Red,
|
||||
id: FeatureId? = null,
|
||||
): FeatureId = addFeature(
|
||||
id,
|
||||
SchemeLineFeature(aCoordinates, bCoordinates, scaleRange, color)
|
||||
)
|
||||
|
||||
fun SchemeFeaturesState.line(
|
||||
aCoordinates: Pair<Number, Number>,
|
||||
bCoordinates: Pair<Number, Number>,
|
||||
scaleRange: FloatRange = defaultScaleRange,
|
||||
color: Color = Color.Red,
|
||||
id: FeatureId? = null,
|
||||
) = addFeature(id, SchemeLineFeature(aCoordinates.toCoordinates(), bCoordinates.toCoordinates(), scaleRange, color))
|
||||
) = line(aCoordinates.toCoordinates(), bCoordinates.toCoordinates(), scaleRange, color, id)
|
||||
|
||||
public fun SchemeFeaturesState.arc(
|
||||
oval: SchemeRectangle,
|
||||
|
Loading…
Reference in New Issue
Block a user