Package com._1c.g5.v8.dt.chart.converter
Class ChartPositionConverter
- java.lang.Object
-
- com._1c.g5.v8.dt.chart.converter.ChartPositionConverter
-
public final class ChartPositionConverter extends Object
Converts canvas coordinates of chart images into model ones and back.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DoubleRect
canvasToChartModelRectangle(org.eclipse.swt.graphics.Rectangle canvasRect, int canvasWidth, int canvasHeight)
Converts canvas rectangle into model coordinates of a chart image.static org.eclipse.swt.graphics.Rectangle
chartModelToCanvasRectangle(DoubleRect modelRect, int canvasWidth, int canvasHeight)
Converts chart model's rectangle into canvas coordinates of a chart image.
-
-
-
Method Detail
-
canvasToChartModelRectangle
public static DoubleRect canvasToChartModelRectangle(org.eclipse.swt.graphics.Rectangle canvasRect, int canvasWidth, int canvasHeight)
Converts canvas rectangle into model coordinates of a chart image.- Parameters:
canvasRect
- the canvas rectangle to convertcanvasWidth
- the width of the whole canvascanvasHeight
- the height of the whole canvas- Returns:
- the chart model's rectangle, never
null
-
chartModelToCanvasRectangle
public static org.eclipse.swt.graphics.Rectangle chartModelToCanvasRectangle(DoubleRect modelRect, int canvasWidth, int canvasHeight)
Converts chart model's rectangle into canvas coordinates of a chart image.- Parameters:
modelRect
- the chart model's rectangle to convertcanvasWidth
- the width of the whole canvascanvasHeight
- the height of the whole canvas- Returns:
- the canvas rectangle, never
null
-
-