-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.component.shape.Shape
public class MarkerCorneredShape extends CorneredShape
MarkerCorneredShape is an extension of CorneredShape that supports drawing a triangular tick at a given point.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classMarkerCorneredShape.Companion
-
Field Summary
Fields Modifier and Type Field Description private final FloattickSizeDpprivate final CornertopLeftprivate final CornertopRightprivate final CornerbottomRightprivate final CornerbottomLeft
-
Constructor Summary
Constructors Constructor Description MarkerCorneredShape(Corner all, Float tickSizeDp)MarkerCorneredShape(CorneredShape corneredShape, Float tickSizeDp)MarkerCorneredShape(Corner topLeft, Corner topRight, Corner bottomRight, Corner bottomLeft, Float tickSizeDp)
-
Method Summary
Modifier and Type Method Description final FloatgetTickSizeDp()final CornergetTopLeft()final CornergetTopRight()final CornergetBottomRight()final CornergetBottomLeft()UnitdrawShape(DrawContext context, Paint paint, Path path, Float left, Float top, Float right, Float bottom)Draws the Shape on the canvas. -
-
Constructor Detail
-
MarkerCorneredShape
MarkerCorneredShape(CorneredShape corneredShape, Float tickSizeDp)
-
MarkerCorneredShape
MarkerCorneredShape(Corner topLeft, Corner topRight, Corner bottomRight, Corner bottomLeft, Float tickSizeDp)
- Parameters:
topLeft- specifies a Corner for the top left of the Shape.topRight- specifies a Corner for the top right of the Shape.bottomRight- specifies a Corner for the bottom right of the Shape.bottomLeft- specifies a Corner for the bottom left of the Shape.tickSizeDp- the size of the tick (in dp).
-
-
Method Detail
-
getTickSizeDp
final Float getTickSizeDp()
-
getTopLeft
final Corner getTopLeft()
-
getTopRight
final Corner getTopRight()
-
getBottomRight
final Corner getBottomRight()
-
getBottomLeft
final Corner getBottomLeft()
-
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.
-
-
-
-