GraphControllerConvertScrollbarValueToGraphCoordinate Method |
Converts the scrollbar values to the corresponding graph coordinate.
Namespace: Altaxo.Gui.Graph.Gdi.ViewingAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public PointD2D ConvertScrollbarValueToGraphCoordinate(
PointD2D scrollbarValue
)
Parameters
- scrollbarValue PointD2D
- The scrollbar value.
Return Value
PointD2DThe graph coordinate corresponding to the upper left corner of the viewport window.
Remarks The scroll bars are set as following:
- The viewport value of the scrollbar is set to the physical viewport size of the window (all units in points = 1/72 inch)
- The minimum value of the scrollbar is set to 0. This corresponds to the graph coordinate: PositionOfMarginsUpperLeftCornerInGraphCoordinates
- The maximum value of the scrollbar is set to SizeOfZoomedGraphWithMargin
- The value of the scrollbar in dependence on the visible upper left corner of the graph in graph coordinates is then calculated as:
ScrollBarValue = (GraphCoordinate - PositionOfMarginsUpperLeftCornerInGraphCoordinates)*zoom
- or vice versa: GraphCoordinate = ScrollBarValue/zoom + PositionOfMarginsUpperLeftCornerInGraphCoordinates;
See Also