-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.component.dimension.Margins
public class LineComponent extends ShapeComponent
Draws a line.
-
-
Field Summary
Fields Modifier and Type Field Description private FloatthicknessDpprivate Integercolorprivate IntegerstrokeColorprivate final Shapeshapeprivate final DynamicShaderdynamicShaderprivate final FloatstrokeWidthDpprivate final MutableDimensionsmargins
-
Constructor Summary
Constructors Constructor Description LineComponent(Integer color, Float thicknessDp, Shape shape, DynamicShader dynamicShader, Dimensions margins, Float strokeWidthDp, Integer strokeColor)
-
Method Summary
Modifier and Type Method Description final FloatgetThicknessDp()final UnitsetThicknessDp(Float thicknessDp)final IntegergetColor()The color of the shape. final UnitsetColor(Integer color)The color of the shape. final IntegergetStrokeColor()The color of the stroke. final UnitsetStrokeColor(Integer strokeColor)The color of the stroke. final ShapegetShape()final DynamicShadergetDynamicShader()final FloatgetStrokeWidthDp()MutableDimensionsgetMargins()The current margins. UnitdrawHorizontal(DrawContext context, Float left, Float right, Float centerY, Float thicknessScale)A convenience function for draw that draws the LineComponent horizontally. BooleanfitsInHorizontal(DrawContext context, Float left, Float right, Float centerY, RectF boundingBox, Float thicknessScale)Checks whether the LineComponent fits horizontally within the given boundingBox with its current thicknessDp. UnitdrawVertical(DrawContext context, Float top, Float bottom, Float centerX, Float thicknessScale)A convenience function for draw that draws the LineComponent vertically. BooleanfitsInVertical(DrawContext context, Float top, Float bottom, Float centerX, RectF boundingBox, Float thicknessScale)Checks whether the LineComponent fits vertically within the given boundingBox with its current thicknessDp. BooleanintersectsVertical(DrawContext context, Float top, Float bottom, Float centerX, RectF boundingBox, Float thicknessScale)Checks whether the LineComponent vertically intersects the given boundingBox with its current thicknessDp. -
Methods inherited from class com.patrykandpatrick.vico.core.component.shape.LineComponent
clearShadow, draw, setShadow -
Methods inherited from class com.patrykandpatrick.vico.core.component.Component
setMargins, setMargins -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
LineComponent
LineComponent(Integer color, Float thicknessDp, Shape shape, DynamicShader dynamicShader, Dimensions margins, Float strokeWidthDp, Integer strokeColor)
-
-
Method Detail
-
getThicknessDp
final Float getThicknessDp()
-
setThicknessDp
final Unit setThicknessDp(Float thicknessDp)
-
getStrokeColor
final Integer getStrokeColor()
The color of the stroke.
-
setStrokeColor
final Unit setStrokeColor(Integer strokeColor)
The color of the stroke.
-
getDynamicShader
final DynamicShader getDynamicShader()
-
getStrokeWidthDp
final Float getStrokeWidthDp()
-
getMargins
MutableDimensions getMargins()
The current margins.
-
drawHorizontal
Unit drawHorizontal(DrawContext context, Float left, Float right, Float centerY, Float thicknessScale)
A convenience function for draw that draws the LineComponent horizontally.
-
fitsInHorizontal
Boolean fitsInHorizontal(DrawContext context, Float left, Float right, Float centerY, RectF boundingBox, Float thicknessScale)
Checks whether the LineComponent fits horizontally within the given boundingBox with its current thicknessDp.
-
drawVertical
Unit drawVertical(DrawContext context, Float top, Float bottom, Float centerX, Float thicknessScale)
A convenience function for draw that draws the LineComponent vertically.
-
fitsInVertical
Boolean fitsInVertical(DrawContext context, Float top, Float bottom, Float centerX, RectF boundingBox, Float thicknessScale)
Checks whether the LineComponent fits vertically within the given boundingBox with its current thicknessDp.
-
intersectsVertical
Boolean intersectsVertical(DrawContext context, Float top, Float bottom, Float centerX, RectF boundingBox, Float thicknessScale)
Checks whether the LineComponent vertically intersects the given boundingBox with its current thicknessDp.
-
-
-
-