-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.context.Extras,com.patrykandpatrick.vico.core.context.MeasureContext
public final class MutableMeasureContext implements MeasureContext, Extras
A MeasureContext implementation that facilitates the mutation of some of its properties.
-
-
Field Summary
Fields Modifier and Type Field Description private final ChartValuesManagerchartValuesManagerprivate final RectFcanvasBoundsprivate Floatdensityprivate FloatfontScaleprivate BooleanisLtrprivate BooleanisHorizontalScrollEnabledprivate FloatchartScaleprivate HorizontalLayouthorizontalLayoutprivate final FloatlayoutDirectionMultiplierprivate final Floatpixelsprivate final IntegerwholePixels
-
Constructor Summary
Constructors Constructor Description MutableMeasureContext(RectF canvasBounds, Float density, Float fontScale, Boolean isLtr, Boolean isHorizontalScrollEnabled, Float chartScale, HorizontalLayout horizontalLayout)
-
Method Summary
Modifier and Type Method Description ChartValuesManagergetChartValuesManager()Manages the associated Chart’s ChartValues. RectFgetCanvasBounds()The bounds of the canvas that will be used to draw the chart and its components. FloatgetDensity()The pixel density. UnitsetDensity(Float density)The pixel density. FloatgetFontScale()The font scale. UnitsetFontScale(Float fontScale)The font scale. BooleangetIsLtr()Whether the layout direction is left-to-right. UnitsetIsLtr(Boolean isLtr)Whether the layout direction is left-to-right. BooleangetIsHorizontalScrollEnabled()Whether horizontal scrolling is enabled. UnitsetIsHorizontalScrollEnabled(Boolean isHorizontalScrollEnabled)Whether horizontal scrolling is enabled. FloatgetChartScale()The scale of the chart. UnitsetChartScale(Float chartScale)The scale of the chart. HorizontalLayoutgetHorizontalLayout()Defines how the chart’s content is positioned horizontally. UnitsetHorizontalLayout(HorizontalLayout horizontalLayout)Defines how the chart’s content is positioned horizontally. FloatgetLayoutDirectionMultiplier()FloatgetPixels(Float $self)IntegergetWholePixels(Float $self)Unitreset()Removes all stored extras and resets ChartValuesManager.chartValues. -
Methods inherited from class com.patrykandpatrick.vico.core.context.MutableMeasureContext
toFontSize, toPixels -
Methods inherited from class com.patrykandpatrick.vico.core.context.MeasureContext
clearExtras, consumeExtra, get, getExtra, hasExtra, putExtra, set -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getChartValuesManager
ChartValuesManager getChartValuesManager()
Manages the associated Chart’s ChartValues.
-
getCanvasBounds
RectF getCanvasBounds()
The bounds of the canvas that will be used to draw the chart and its components.
-
getDensity
Float getDensity()
The pixel density.
-
setDensity
Unit setDensity(Float density)
The pixel density.
-
getFontScale
Float getFontScale()
The font scale.
-
setFontScale
Unit setFontScale(Float fontScale)
The font scale.
-
getIsHorizontalScrollEnabled
Boolean getIsHorizontalScrollEnabled()
Whether horizontal scrolling is enabled.
-
setIsHorizontalScrollEnabled
Unit setIsHorizontalScrollEnabled(Boolean isHorizontalScrollEnabled)
Whether horizontal scrolling is enabled.
-
getChartScale
Float getChartScale()
The scale of the chart. Used to handle zooming in and out.
-
setChartScale
Unit setChartScale(Float chartScale)
The scale of the chart. Used to handle zooming in and out.
-
getHorizontalLayout
HorizontalLayout getHorizontalLayout()
Defines how the chart’s content is positioned horizontally.
-
setHorizontalLayout
Unit setHorizontalLayout(HorizontalLayout horizontalLayout)
Defines how the chart’s content is positioned horizontally.
-
getLayoutDirectionMultiplier
Float getLayoutDirectionMultiplier()
-
getWholePixels
Integer getWholePixels(Float $self)
-
-
-
-