Re: Can cairo work with win32 SetMapMode

Adrian Johnson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 19/08/14 17:29, fiveight wrote:
> Can cairo work with win32 SetMapMode?

No. You will need to call GetDeviceCaps to get the pixels per inch then
set the cairo scale. Something like:

    int x = GetDeviceCaps(hdc, LOGPIXELSX);
    int y = GetDeviceCaps(hdc, LOGPIXELSY);
    cairo_scale(0.1*x/25.4, 0.1*y/25.4); /* 1 unit is 0.1 mm */

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.