image with painter
This commit is contained in:
parent
bebd33f859
commit
f3b67cffe9
@ -4,8 +4,8 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.geometry.Size
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.graphics.vector.VectorPainter
|
||||
import androidx.compose.ui.graphics.vector.rememberVectorPainter
|
||||
import androidx.compose.ui.unit.IntSize
|
||||
import centre.sciprog.maps.GeodeticMapCoordinates
|
||||
@ -51,9 +51,9 @@ class MapBitmapImageFeature(
|
||||
) : MapFeature(zoomRange)
|
||||
|
||||
|
||||
class MapVectorImageFeature internal constructor(
|
||||
class MapVectorImageFeature (
|
||||
val position: GeodeticMapCoordinates,
|
||||
val painter: VectorPainter,
|
||||
val painter: Painter,
|
||||
val size: Size,
|
||||
zoomRange: IntRange = defaultZoomRange,
|
||||
) : MapFeature(zoomRange)
|
||||
@ -64,4 +64,4 @@ fun MapVectorImageFeature(
|
||||
image: ImageVector,
|
||||
size: Size = Size(20f, 20f),
|
||||
zoomRange: IntRange = defaultZoomRange,
|
||||
): MapVectorImageFeature = MapVectorImageFeature(position, rememberVectorPainter(image), size, zoomRange)
|
||||
): MapVectorImageFeature = MapVectorImageFeature(position, rememberVectorPainter(image), size, zoomRange)
|
||||
|
Loading…
Reference in New Issue
Block a user