mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-21 16:50:38 +01:00
Thw Win32 boilerplate worked by creating an offscreen window and creating a cairo surface that targets the client HDC. However GDI clips the client HDC to the visible region of the window, and that region is empty. In the end, every GDI drawing operation turned into a no-op. Rather than targeting HWNDs, it's much better to create a bitmap (DIB Section) and draw via a memory HDC. https://learn.microsoft.com/en-us/windows/win32/gdi/window-regions https://devblogs.microsoft.com/oldnewthing/20030829-00/?p=42743 https://devblogs.microsoft.com/oldnewthing/20030902-00/?p=42693 |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| cairo-boilerplate-getopt.c | ||
| cairo-boilerplate-getopt.h | ||
| cairo-boilerplate-pdf.c | ||
| cairo-boilerplate-private.h | ||
| cairo-boilerplate-ps.c | ||
| cairo-boilerplate-quartz.c | ||
| cairo-boilerplate-scaled-font.h | ||
| cairo-boilerplate-script.c | ||
| cairo-boilerplate-svg.c | ||
| cairo-boilerplate-system.c | ||
| cairo-boilerplate-system.h | ||
| cairo-boilerplate-test-surfaces.c | ||
| cairo-boilerplate-win32-printing.c | ||
| cairo-boilerplate-win32.c | ||
| cairo-boilerplate-xcb.c | ||
| cairo-boilerplate-xlib.c | ||
| cairo-boilerplate-xlib.h | ||
| cairo-boilerplate.c | ||
| cairo-boilerplate.h | ||
| make-cairo-boilerplate-constructors.py | ||
| meson.build | ||
| README | ||
This directory provides code that is common to both of cairo's tests suites: * The test suite for correctness in test/ * The test suite for performance in perf/ We call it boilerplate as it consists primarily of the boilerplate code necessary for initializing a backend in order to create a surface for that backend. The code here just might be useful for someone looking to get started writing cairo code to use a particular backend, (but there are no promises that the boilerplate code found here for any particular backend is exemplary).