-
Notifications
You must be signed in to change notification settings - Fork 5.4k
/
IGraphRenderer.h
49 lines (40 loc) · 1.66 KB
/
IGraphRenderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#pragma once
#include "Common.h"
struct ID2D1Factory;
struct ID2D1RenderTarget;
namespace Graphing
{
struct IBitmap;
}
namespace Graphing::Renderer
{
struct IGraphRenderer : public NonCopyable, public NonMoveable
{
virtual ~IGraphRenderer() = default;
virtual HRESULT SetGraphSize(unsigned int width, unsigned int height) = 0;
virtual HRESULT SetDpi(float dpiX, float dpiY) = 0;
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
virtual HRESULT GetClosePointData(
double inScreenPointX,
double inScreenPointY,
double precision,
int& formulaIdOut,
float& xScreenPointOut,
float& yScreenPointOut,
double& xValueOut,
double& yValueOut,
double& rhoValueOut,
double& thetaValueOut,
double& tValueOut) = 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;
virtual HRESULT GetDisplayRanges(double& xMin, double& xMax, double& yMin, double& yMax) = 0;
virtual HRESULT SetDisplayRanges(double xMin, double xMax, double yMin, double yMax) = 0;
virtual HRESULT PrepareGraph() = 0;
virtual HRESULT GetBitmap(std::shared_ptr<Graphing::IBitmap>& bitmapOut, bool& hasSomeMissingDataOut) = 0;
};
}