2008-09-20 18:17:19 -04:00
|
|
|
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
|
|
|
|
|
/* Cairo - a vector graphics library with display and print output
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2005 Red Hat, Inc.
|
2012-02-12 11:25:07 +00:00
|
|
|
* Copyright © 2012 Intel Corporation
|
2008-09-20 18:17:19 -04:00
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it either under the terms of the GNU Lesser General Public
|
|
|
|
|
* License version 2.1 as published by the Free Software Foundation
|
|
|
|
|
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
|
|
|
|
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
|
|
|
|
* notice, a recipient may use your version of this file under either
|
|
|
|
|
* the MPL or the LGPL.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the LGPL along with this library
|
|
|
|
|
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
2010-04-27 10:17:23 +02:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
|
2008-09-20 18:17:19 -04:00
|
|
|
* You should have received a copy of the MPL along with this library
|
|
|
|
|
* in the file COPYING-MPL-1.1
|
|
|
|
|
*
|
|
|
|
|
* The contents of this file are subject to the Mozilla Public License
|
|
|
|
|
* Version 1.1 (the "License"); you may not use this file except in
|
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
|
*
|
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
|
|
|
|
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
|
|
|
|
* the specific language governing rights and limitations.
|
|
|
|
|
*
|
|
|
|
|
* The Original Code is the cairo graphics library.
|
|
|
|
|
*
|
|
|
|
|
* The Initial Developer of the Original Code is Red Hat, Inc.
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s):
|
|
|
|
|
* Owen Taylor <otaylor@redhat.com>
|
|
|
|
|
* Stuart Parmenter <stuart@mozilla.com>
|
|
|
|
|
* Vladimir Vukicevic <vladimir@pobox.com>
|
|
|
|
|
*/
|
|
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
#include "cairoint.h"
|
2008-09-20 18:17:19 -04:00
|
|
|
#include "cairo-win32-private.h"
|
|
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
#include <wchar.h>
|
2008-09-20 18:17:19 -04:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
void
|
|
|
|
|
_cairo_win32_debug_dump_hrgn (HRGN rgn, char *header)
|
2008-09-20 18:17:19 -04:00
|
|
|
{
|
2012-02-12 11:25:07 +00:00
|
|
|
RGNDATA *rd;
|
|
|
|
|
unsigned int z;
|
|
|
|
|
|
|
|
|
|
if (header)
|
|
|
|
|
fprintf (stderr, "%s\n", header);
|
2008-09-20 18:17:19 -04:00
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
if (rgn == NULL) {
|
|
|
|
|
fprintf (stderr, " NULL\n");
|
2008-09-20 18:17:19 -04:00
|
|
|
}
|
|
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
z = GetRegionData(rgn, 0, NULL);
|
2017-07-08 09:28:03 +09:30
|
|
|
rd = (RGNDATA*) _cairo_malloc (z);
|
2012-02-12 11:25:07 +00:00
|
|
|
z = GetRegionData(rgn, z, rd);
|
2008-09-20 18:17:19 -04:00
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
fprintf (stderr, " %ld rects, bounds: %ld %ld %ld %ld\n",
|
|
|
|
|
rd->rdh.nCount,
|
|
|
|
|
rd->rdh.rcBound.left,
|
|
|
|
|
rd->rdh.rcBound.top,
|
|
|
|
|
rd->rdh.rcBound.right - rd->rdh.rcBound.left,
|
|
|
|
|
rd->rdh.rcBound.bottom - rd->rdh.rcBound.top);
|
|
|
|
|
|
|
|
|
|
for (z = 0; z < rd->rdh.nCount; z++) {
|
|
|
|
|
RECT r = ((RECT*)rd->Buffer)[z];
|
|
|
|
|
fprintf (stderr, " [%d]: [%ld %ld %ld %ld]\n",
|
|
|
|
|
z, r.left, r.top, r.right - r.left, r.bottom - r.top);
|
|
|
|
|
}
|
2008-09-20 18:17:19 -04:00
|
|
|
|
2012-02-12 11:25:07 +00:00
|
|
|
free(rd);
|
|
|
|
|
fflush (stderr);
|
|
|
|
|
}
|