1 /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
2 /* Cairo - a vector graphics library with display and print output
4 * Copyright © 2005 Red Hat, Inc.
5 * Copyright © 2012 Intel Corporation
7 * This library is free software; you can redistribute it and/or
8 * modify it either under the terms of the GNU Lesser General Public
9 * License version 2.1 as published by the Free Software Foundation
10 * (the "LGPL") or, at your option, under the terms of the Mozilla
11 * Public License Version 1.1 (the "MPL"). If you do not alter this
12 * notice, a recipient may use your version of this file under either
13 * the MPL or the LGPL.
15 * You should have received a copy of the LGPL along with this library
16 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
18 * You should have received a copy of the MPL along with this library
19 * in the file COPYING-MPL-1.1
21 * The contents of this file are subject to the Mozilla Public License
22 * Version 1.1 (the "License"); you may not use this file except in
23 * compliance with the License. You may obtain a copy of the License at
24 * http://www.mozilla.org/MPL/
26 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
27 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
28 * the specific language governing rights and limitations.
30 * The Original Code is the cairo graphics library.
32 * The Initial Developer of the Original Code is Red Hat, Inc.
35 * Owen Taylor <otaylor@redhat.com>
36 * Stuart Parmenter <stuart@mozilla.com>
37 * Vladimir Vukicevic <vladimir@pobox.com>
40 #define WIN32_LEAN_AND_MEAN
41 /* We require Windows 2000 features such as ETO_PDY */
42 #if !defined(WINVER) || (WINVER < 0x0500)
43 # define WINVER 0x0500
45 #if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
46 # define _WIN32_WINNT 0x0500
50 #include "cairo-win32-private.h"
56 _cairo_win32_debug_dump_hrgn (HRGN rgn, char *header)
62 fprintf (stderr, "%s\n", header);
65 fprintf (stderr, " NULL\n");
68 z = GetRegionData(rgn, 0, NULL);
69 rd = (RGNDATA*) malloc(z);
70 z = GetRegionData(rgn, z, rd);
72 fprintf (stderr, " %ld rects, bounds: %ld %ld %ld %ld\n",
76 rd->rdh.rcBound.right - rd->rdh.rcBound.left,
77 rd->rdh.rcBound.bottom - rd->rdh.rcBound.top);
79 for (z = 0; z < rd->rdh.nCount; z++) {
80 RECT r = ((RECT*)rd->Buffer)[z];
81 fprintf (stderr, " [%d]: [%ld %ld %ld %ld]\n",
82 z, r.left, r.top, r.right - r.left, r.bottom - r.top);