1 /* 2 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 3 * and associated documentation files (the "Software"), to deal in the Software without restriction, 4 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 6 * subject to the following conditions: 7 * 8 * The above copyright notice and this permission notice shall be included in all copies or substantial 9 * portions of the Software. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 12 * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 13 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 14 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 15 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 * 17 * Authors: 18 * Alexandre Pigolkine (pigolkine@gmx.de) 19 * Duncan Mak (duncan@ximian.com) 20 * Miguel de Icaza (miguel@ximian.com) 21 * Ravindra (rkumar@novell.com) 22 * Sanjay Gupta (gsanjay@novell.com) 23 * Vladimir Vukicevic (vladimir@pobox.com) 24 * Geoff Norton (gnorton@customerdna.com) 25 * Jonathan Gilbert (logic@deltaq.org) 26 * Sebastien Pouliot <sebastien@ximian.com> 27 * 28 * Copyright (C) 2003-2007 Novell, Inc (http://www.novell.com) 29 */ 30 31 /* 32 * NOTE: This is a private header files and everything is subject to changes. 33 */ 34 35 #ifndef __REGION_PRIVATE_H__ 36 #define __REGION_PRIVATE_H__ 37 38 #include "gdiplus-private.h" 39 #include "matrix-private.h" 40 #include "region-bitmap.h" 41 #include "region-path-tree.h" 42 43 /* In the integer world infinity has limited bounds ;-) */ 44 #define REGION_INFINITE_POSITION -4194304 45 #define REGION_INFINITE_LENGTH 8388608 46 47 typedef enum { 48 RegionTypeRect, 49 RegionTypePath, 50 RegionTypeInfinite 51 } RegionType; 52 53 typedef enum { 54 RegionDataRect = 0x10000000, 55 RegionDataPath = 0x10000001, 56 RegionDataEmptyRect = 0x10000002, 57 RegionDataInfiniteRect = 0x10000003 58 } RegionDataType; 59 60 typedef struct { 61 DWORD size; 62 DWORD checksum; 63 DWORD magic; 64 DWORD combiningOps; 65 } RegionHeader; 66 67 struct _Region { 68 guint32 type; 69 int cnt; 70 GpRectF* rects; 71 GpPathTree* tree; 72 GpRegionBitmap* bitmap; 73 }; 74 75 BOOL gdip_is_InfiniteRegion (const GpRegion *region) GDIP_INTERNAL; 76 BOOL gdip_is_Point_in_RectF_inclusive (float x, float y, GpRectF* rect) GDIP_INTERNAL; 77 78 void gdip_clear_region (GpRegion *region) GDIP_INTERNAL; 79 GpStatus gdip_copy_region (GpRegion *source, GpRegion *dest) GDIP_INTERNAL; 80 81 #include "region.h" 82 83 #endif 84