-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
40 lines (24 loc) · 1.36 KB
/
README
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
Example program using ID2D1DeviceContext5 and ID2D1SvgDocument.
Create a bitmap and paint a white stripe on a purple background, with Direct2D.
Render an SVG image (a white circle), if enabled.
Save the bitmap to a PNG file.
Build commands (in Windows Command Prompt):
With MinGW-W64 g++, without SVG (note the -DNO_SVG option):
g++ -c -o d2d-test.o -DNO_SVG -municode -O0 -ggdb3 -Wall -Wextra -Werror d2d-test.cpp
g++ -o d2d-test.exe -municode -O0 -ggdb3 -Wall -Wextra -Werror d2d-test.o -ld2d1 -lwindowscodecs -lole32 -lshlwapi
d2d-test.exe output.png circle.svg
With MinGW-W64 g++, with SVG:
g++ -c -o d2d-test.o -municode -O0 -ggdb3 -Wall -Wextra -Werror d2d-test.cpp
g++ -o d2d-test.exe -municode -O0 -ggdb3 -Wall -Wextra -Werror d2d-test.o -ld2d1 -lwindowscodecs -lole32 -lshlwapi
d2d-test.exe output.png circle.svg
With MSVC 2019, with SVG:
cl /nologo /c /Od /W4 /WX /EHsc d2d-test.cpp
link /nologo /WX d2d-test.obj d2d1.lib windowscodecs.lib ole32.lib shlwapi.lib /OUT:d2d-test.exe
d2d-test.exe output.png circle.svg
Or use the Makefiles:
With MinGW-W64 g++, without SVG, with MSYS2 mingw32-make:
mingw32-make
With MinGW-W64 g++, with SVG, with MSYS2 mingw32-make:
mingw32-make CPPFLAGS=
With MSVC 2019, with SVG, with MSYS2 mingw32-make:
c:\msys64\mingw64\bin\mingw32-make -f Makefile-vc