-
- All Implemented Interfaces:
-
com.patrykandpatrick.vico.core.context.Extras
public interface MeasureContext implements Extras
MeasureContext holds data used by various chart components during the measuring and drawing phases.
-
-
Method Summary
Modifier and Type Method Description FloattoPixels(Float dp)Returns the number of pixels corresponding to the provided number of density-independent pixels. FloattoFontSize(Float sp)Returns the number of pixels corresponding to the provided number of scaled pixels. abstract Unitreset()Removes all stored extras and resets ChartValuesManager.chartValues. abstract RectFgetCanvasBounds()The bounds of the canvas that will be used to draw the chart and its components. abstract ChartValuesManagergetChartValuesManager()Manages the associated Chart’s ChartValues. abstract FloatgetDensity()The pixel density. abstract FloatgetFontScale()The font scale. abstract BooleangetIsLtr()Whether the layout direction is left-to-right. abstract BooleangetIsHorizontalScrollEnabled()Whether horizontal scrolling is enabled. abstract FloatgetChartScale()The scale of the chart. abstract HorizontalLayoutgetHorizontalLayout()Defines how the chart’s content is positioned horizontally. FloatgetLayoutDirectionMultiplier()FloatgetPixels(Float $self)IntegergetWholePixels(Float $self)-
-
Method Detail
-
toPixels
Float toPixels(Float dp)
Returns the number of pixels corresponding to the provided number of density-independent pixels.
-
toFontSize
Float toFontSize(Float sp)
Returns the number of pixels corresponding to the provided number of scaled pixels.
-
getCanvasBounds
abstract RectF getCanvasBounds()
The bounds of the canvas that will be used to draw the chart and its components.
-
getChartValuesManager
abstract ChartValuesManager getChartValuesManager()
Manages the associated Chart’s ChartValues.
-
getDensity
abstract Float getDensity()
The pixel density.
-
getFontScale
abstract Float getFontScale()
The font scale.
-
getIsHorizontalScrollEnabled
abstract Boolean getIsHorizontalScrollEnabled()
Whether horizontal scrolling is enabled.
-
getChartScale
abstract Float getChartScale()
The scale of the chart. Used to handle zooming in and out.
-
getHorizontalLayout
abstract HorizontalLayout getHorizontalLayout()
Defines how the chart’s content is positioned horizontally.
-
getLayoutDirectionMultiplier
Float getLayoutDirectionMultiplier()
-
getWholePixels
Integer getWholePixels(Float $self)
-
-
-
-