-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathd2dwrapper.cpp
73 lines (61 loc) · 1.83 KB
/
d2dwrapper.cpp
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "d2dwrapper.h"
extern "C"
{
D2D1_SIZE_F dxID2D1Bitmap_GetSize(ID2D1Bitmap *_this)
{
return _this->GetSize();
}
HRESULT dxID2D1Factory_CreateHwndRenderTarget(
ID2D1Factory* _this,
const D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties,
const D2D1_HWND_RENDER_TARGET_PROPERTIES* hwndRenderTargetProperties,
ID2D1HwndRenderTarget** hwndRenderTarget
)
{
return _this->CreateHwndRenderTarget(renderTargetProperties, hwndRenderTargetProperties, hwndRenderTarget);
}
D2D1_SIZE_F dxID2D1HwndRenderTarget_GetSize(ID2D1HwndRenderTarget* _this)
{
return _this->GetSize();
}
HRESULT dxID2D1HwndRenderTarget_Resize(ID2D1HwndRenderTarget* _this, D2D1_SIZE_U* pixelSize)
{
return _this->Resize(pixelSize);
}
void dxID2D1RenderTarget_BeginDraw(ID2D1RenderTarget *_this)
{
_this->BeginDraw();
}
void dxID2D1RenderTarget_Clear(ID2D1RenderTarget* _this, D2D1_COLOR_F* clearColor)
{
_this->Clear(clearColor);
}
HRESULT dxID2D1RenderTarget_CreateBitmapFromWicBitmap(
ID2D1RenderTarget* _this,
IWICBitmapSource* wicBitmapSource,
const D2D1_BITMAP_PROPERTIES* bitmapProperties,
ID2D1Bitmap** bitmap
)
{
return _this->CreateBitmapFromWicBitmap(wicBitmapSource, bitmapProperties, bitmap);
}
void dxID2D1RenderTarget_DrawBitmap(
ID2D1RenderTarget* _this,
ID2D1Bitmap* bitmap,
const D2D1_RECT_F* destinationRectangle,
FLOAT opacity,
D2D1_BITMAP_INTERPOLATION_MODE interpolationMode,
const D2D1_RECT_F* sourceRectangle
)
{
_this->DrawBitmap(bitmap, destinationRectangle, opacity, interpolationMode, sourceRectangle);
}
HRESULT dxID2D1RenderTarget_EndDraw(ID2D1RenderTarget* _this, D2D1_TAG* tag1, D2D1_TAG* tag2)
{
return _this->EndDraw(tag1, tag2);
}
void dxID2D1RenderTarget_SetTransform(ID2D1RenderTarget *_this, D2D_MATRIX_3X2_F *transform)
{
_this->SetTransform(transform);
}
}