-
public final class ShapesKt
-
-
Method Summary
Modifier and Type Method Description final static ShapechartShape(Shape $self)Converts this androidx.compose.ui.graphics.Shape to an instance of com.patrykandpatrick.vico.core.component.shape.Shape. final static ShapecomposeShape(CorneredShape $self)Converts this CorneredShape to an instance of androidx.compose.ui.graphics.Shape. final static UnitaddRoundRect(Path $self, Float left, Float top, Float right, Float bottom, RoundRect rect, FloatArray radii)Adds a rounded rectangle to the receiver Path. final static CorneredShaperoundedCornerShape(Shapes $self, Dp all)Creates a CorneredShape with rounded corners of the provided size. final static CorneredShaperoundedCornerShape(Shapes $self, Dp topLeft, Dp topRight, Dp bottomRight, Dp bottomLeft)Creates a CorneredShape with rounded corners of the provided sizes. final static CorneredShapecutCornerShape(Shapes $self, Dp all)Creates a CorneredShape with cut corners of the provided size. final static CorneredShapecutCornerShape(Shapes $self, Dp topLeft, Dp topRight, Dp bottomRight, Dp bottomLeft)Creates a CorneredShape with cut corners of the provided sizes. final static MarkerCorneredShapemarkerCorneredShape(Shapes $self, Corner topLeft, Corner topRight, Corner bottomRight, Corner bottomLeft, Dp tickSizeDp)Creates a MarkerCorneredShape. final static MarkerCorneredShapemarkerCorneredShape(Shapes $self, Corner all, Dp tickSizeDp)Creates a MarkerCorneredShape. final static MarkerCorneredShapemarkerCorneredShape(Shapes $self, CorneredShape corneredShape, Dp tickSizeDp)Creates a MarkerCorneredShape out of a regular CorneredShape. final static DashedShapedashedShape(Shapes $self, Shape shape, Dp dashLength, Dp gapLength, DashedShape.FitStrategy fitStrategy)Creates a DashedShape. final static DashedShapedashedShape(Shapes $self, Shape shape, Dp dashLength, Dp gapLength, DashedShape.FitStrategy fitStrategy)Creates a DashedShape. -
-
Method Detail
-
chartShape
final static Shape chartShape(Shape $self)
Converts this androidx.compose.ui.graphics.Shape to an instance of com.patrykandpatrick.vico.core.component.shape.Shape.
-
composeShape
final static Shape composeShape(CorneredShape $self)
Converts this CorneredShape to an instance of androidx.compose.ui.graphics.Shape.
-
addRoundRect
final static Unit addRoundRect(Path $self, Float left, Float top, Float right, Float bottom, RoundRect rect, FloatArray radii)
Adds a rounded rectangle to the receiver Path.
- Parameters:
left- the x coordinate of the left edge of the rectangle.top- the y coordinate of the top edge of the rectangle.right- the x coordinate of the right edge of the rectangle.bottom- the y coordinate of the bottom edge of the rectangle.rect- the rounded rectangle to be drawn.radii- used to store the corner radii.
-
roundedCornerShape
final static CorneredShape roundedCornerShape(Shapes $self, Dp all)
Creates a CorneredShape with rounded corners of the provided size.
-
roundedCornerShape
final static CorneredShape roundedCornerShape(Shapes $self, Dp topLeft, Dp topRight, Dp bottomRight, Dp bottomLeft)
Creates a CorneredShape with rounded corners of the provided sizes.
-
cutCornerShape
final static CorneredShape cutCornerShape(Shapes $self, Dp all)
Creates a CorneredShape with cut corners of the provided size.
-
cutCornerShape
final static CorneredShape cutCornerShape(Shapes $self, Dp topLeft, Dp topRight, Dp bottomRight, Dp bottomLeft)
Creates a CorneredShape with cut corners of the provided sizes.
-
markerCorneredShape
final static MarkerCorneredShape markerCorneredShape(Shapes $self, Corner topLeft, Corner topRight, Corner bottomRight, Corner bottomLeft, Dp tickSizeDp)
Creates a MarkerCorneredShape.
- Parameters:
topLeft- the size and look of the top-left corner.topRight- the size and look of the top-right corner.bottomRight- the size and look of the bottom-right corner.bottomLeft- the size and look of the bottom-left corner.tickSizeDp- the tick size.
-
markerCorneredShape
final static MarkerCorneredShape markerCorneredShape(Shapes $self, Corner all, Dp tickSizeDp)
Creates a MarkerCorneredShape.
- Parameters:
all- the size and look of all corners.tickSizeDp- the tick size.
-
markerCorneredShape
final static MarkerCorneredShape markerCorneredShape(Shapes $self, CorneredShape corneredShape, Dp tickSizeDp)
Creates a MarkerCorneredShape out of a regular CorneredShape.
- Parameters:
corneredShape- the base CorneredShape.tickSizeDp- the tick size.
-
dashedShape
final static DashedShape dashedShape(Shapes $self, Shape shape, Dp dashLength, Dp gapLength, DashedShape.FitStrategy fitStrategy)
Creates a DashedShape.
- Parameters:
shape- the Shape from which to create the DashedShape.dashLength- the dash length.gapLength- the gap length.fitStrategy- the DashedShape.FitStrategy to use for the dashes.
-
dashedShape
final static DashedShape dashedShape(Shapes $self, Shape shape, Dp dashLength, Dp gapLength, DashedShape.FitStrategy fitStrategy)
Creates a DashedShape.
- Parameters:
shape- the ChartShape from which to create the DashedShape.dashLength- the dash length.gapLength- the gap length.fitStrategy- the DashedShape.FitStrategy to use for the dashes.
-
-
-
-