-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.component.shape.Shape
public final class DashedShape implements Shape
DashedShape draws a dashed line by interchangeably drawing the provided shape and leaving a gap.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumDashedShape.FitStrategyDefines how a DashedShape is to be rendered.
-
Field Summary
Fields Modifier and Type Field Description private final Shapeshapeprivate final FloatdashLengthDpprivate final FloatgapLengthDpprivate final DashedShape.FitStrategyfitStrategy
-
Constructor Summary
Constructors Constructor Description DashedShape(Shape shape, Float dashLengthDp, Float gapLengthDp, DashedShape.FitStrategy fitStrategy)
-
Method Summary
Modifier and Type Method Description final ShapegetShape()final FloatgetDashLengthDp()final FloatgetGapLengthDp()final DashedShape.FitStrategygetFitStrategy()UnitdrawShape(DrawContext context, Paint paint, Path path, Float left, Float top, Float right, Float bottom)Draws the Shape on the canvas. -
-
Constructor Detail
-
DashedShape
DashedShape(Shape shape, Float dashLengthDp, Float gapLengthDp, DashedShape.FitStrategy fitStrategy)
-
-
Method Detail
-
getDashLengthDp
final Float getDashLengthDp()
-
getGapLengthDp
final Float getGapLengthDp()
-
getFitStrategy
final DashedShape.FitStrategy getFitStrategy()
-
drawShape
Unit drawShape(DrawContext context, Paint paint, Path path, Float left, Float top, Float right, Float bottom)
Draws the Shape on the canvas.
- Parameters:
context- holds environment data.paint- the Paint used to draw the shape.path- the Path defining the shape.left- the x coordinate of the left edge of the bounds in which the shape should be drawn.top- the y coordinate of the top edge of the bounds in which the shape should be drawn.right- the x coordinate of the right edge of the bounds in which the shape should be drawn.bottom- the y coordinate of the bottom edge of the bounds in which the shape should be drawn.
-
-
-
-