mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
- Add to IGraphRenderer functions for panning and zooming
This commit is contained in:
parent
091732aa94
commit
d6812e0880
2 changed files with 9 additions and 16 deletions
|
@ -326,24 +326,18 @@ namespace Graphing
|
||||||
// Zoom out on all axes by the predefined ratio
|
// Zoom out on all axes by the predefined ratio
|
||||||
ZoomOut,
|
ZoomOut,
|
||||||
|
|
||||||
// Zoom out on X axis only, leave the range of Y (and Z in 3D) unchanged
|
// Zoom out on X axis only, leave the range of Y unchanged
|
||||||
WidenX,
|
WidenX,
|
||||||
|
|
||||||
// Zoom in on X axis only, leave the range of Y (and Z in 3D) unchanged
|
// Zoom in on X axis only, leave the range of Y unchanged
|
||||||
ShrinkX,
|
ShrinkX,
|
||||||
|
|
||||||
// Zoom out on Y axis only, leave the range of X (and Z in 3D) unchanged
|
// Zoom out on Y axis only, leave the range of X unchanged
|
||||||
WidenY,
|
WidenY,
|
||||||
|
|
||||||
// Zoom in on Y axis only, leave the range of X (and Z in 3D) unchanged
|
// Zoom in on Y axis only, leave the range of X unchanged
|
||||||
ShrinkY,
|
ShrinkY,
|
||||||
|
|
||||||
// Zoom out on Z axis only, leave the range of X and Y unchanged. Apply to 3D graph only but not 2D graph.
|
|
||||||
WidenZ,
|
|
||||||
|
|
||||||
// Zoom in on Z axis only, leave the range of X and Y unchanged. Apply to 3D graph only but not 2D graph.
|
|
||||||
ShrinkZ,
|
|
||||||
|
|
||||||
// Move the view window of the graph towards the negative X axis.
|
// Move the view window of the graph towards the negative X axis.
|
||||||
MoveNegativeX,
|
MoveNegativeX,
|
||||||
|
|
||||||
|
@ -356,12 +350,6 @@ namespace Graphing
|
||||||
// Move the view window of the graph towards the positive Y axis.
|
// Move the view window of the graph towards the positive Y axis.
|
||||||
MovePositiveY,
|
MovePositiveY,
|
||||||
|
|
||||||
// Move the view window of the graph towards the negative Z axis.
|
|
||||||
MoveNegativeZ,
|
|
||||||
|
|
||||||
// Move the view window of the graph towards the positive Z axis.
|
|
||||||
MovePositiveZ,
|
|
||||||
|
|
||||||
// Zoom in on all axes by the predefined ratio. The ratio is smaller than used in ZoomIn result in a smoother motion
|
// Zoom in on all axes by the predefined ratio. The ratio is smaller than used in ZoomIn result in a smoother motion
|
||||||
SmoothZoomIn,
|
SmoothZoomIn,
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,10 @@ namespace Graphing::Renderer
|
||||||
|
|
||||||
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
|
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
|
||||||
virtual HRESULT GetClosePointData(float inScreenPointX, float inScreenPointY, int& formulaIdOut, float& xScreenPointOut, float& yScreenPointOut, float& xValueOut, float& yValueOut) = 0;
|
virtual HRESULT GetClosePointData(float inScreenPointX, float inScreenPointY, int& formulaIdOut, float& xScreenPointOut, float& yScreenPointOut, float& xValueOut, float& yValueOut) = 0;
|
||||||
|
|
||||||
|
virtual HRESULT ScaleRange(double centerX, double centerY, double scale) = 0;
|
||||||
|
virtual HRESULT ChangeRange(ChangeRangeAction action) = 0;
|
||||||
|
virtual HRESULT MoveRangeByRatio(double ratioX, double ratioY) = 0;
|
||||||
|
virtual HRESULT ResetRange() = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue