77#define FLAGS_INTPATH 0x4000
112 return needed +
sizeof(
GpRect);
116 needed +=
sizeof(
DWORD);
152 (*element2)->type =
element->type;
157 (*element2)->elementdata.rect =
element->elementdata.rect;
167 (*element2)->elementdata.combine.left =
NULL;
168 (*element2)->elementdata.combine.right =
NULL;
171 &(*element2)->elementdata.combine.left);
175 &(*element2)->elementdata.combine.right);
215 TRACE(
"%p %p\n", region, clone);
217 if (!(region && clone))
220 *clone = heap_alloc_zero(
sizeof(
GpRegion));
240 if (!(region &&
path))
287 if (!(region &&
rect))
353 TRACE(
"%p %p %d\n", region1, region2,
mode);
355 if(!(region1 && region2))
392 TRACE(
"%p\n", region);
397 *region = heap_alloc_zero(
sizeof(
GpRegion));
401 TRACE(
"=> %p\n", *region);
432 if (!(
path && region))
435 *region = heap_alloc_zero(
sizeof(
GpRegion));
466 if (!(
rect && region))
469 *region = heap_alloc_zero(
sizeof(
GpRegion));
477 (*region)->node.elementdata.rect.X =
rect->X;
478 (*region)->node.elementdata.rect.Y =
rect->Y;
479 (*region)->node.elementdata.rect.Width =
rect->Width;
480 (*region)->node.elementdata.rect.Height =
rect->Height;
530 if(
buf->rdh.nCount == 0){
551 for(
i = 0; i < buf->rdh.nCount;
i++){
573 TRACE(
"%p\n", region);
593 TRACE(
"(%p, %p, %p)\n", region, graphics,
rect);
595 if(!region || !graphics || !
rect)
607 TRACE(
"%p => infinite\n", region);
614 rect->Width =
r.right -
r.left;
615 rect->Height =
r.bottom -
r.top;
634 TRACE(
"(%p, %p, %p)\n", region, graphics,
rect);
761 if (needed) *needed =
size;
813 node->elementdata.combine.left =
left;
832 ERR(
"failed to read rect data\n");
836 node->elementdata.rect = *rc;
850 ERR(
"failed to read path header\n");
862 TRACE(
"refusing to create an empty path in a region\n");
936 FIXME(
"element type %#x is not supported\n", *
type);
987 TRACE(
"%p, %p\n", region, needed);
989 if (!(region && needed))
1005 if (!
path->pathdata.Count)
1018 graphics = new_graphics;
1025 else if (!graphics->
hdc)
1185 FIXME(
"GdipGetRegionHRgn unimplemented for region type=%x\n",
element->type);
1196 TRACE(
"(%p, %p, %p)\n", region, graphics,
hrgn);
1198 if (!region || !
hrgn)
1209 TRACE(
"(%p, %p, %p)\n", region, graphics,
res);
1211 if(!region || !graphics || !
res)
1232 TRACE(
"(%p, %p, %p, %p)\n", region, region2, graphics,
res);
1234 if(!region || !region2 || !graphics || !
res)
1264 TRACE(
"(%p, %p, %p)\n", region, graphics,
res);
1266 if(!region || !graphics || !
res)
1283 TRACE(
"(%p, %.2f, %.2f, %.2f, %.2f, %p, %p)\n", region,
x,
y,
w,
h, graphics,
res);
1310 TRACE(
"(%p, %d, %d, %d, %d, %p, %p)\n", region,
x,
y,
w,
h, graphics,
res);
1325 TRACE(
"(%p, %.2f, %.2f, %p, %p)\n", region,
x,
y, graphics,
res);
1351 TRACE(
"(%p, %d, %d, %p, %p)\n", region,
x,
y, graphics,
res);
1363 TRACE(
"%p\n", region);
1378 TRACE(
"%p\n", region);
1404 if (
matrix->matrix[1] == 0.0 &&
matrix->matrix[2] == 0.0)
1446 element->elementdata.rect.Width,
element->elementdata.rect.Height);
1465 if (!
element->elementdata.path->pathdata.Count)
1469 element->elementdata.path->pathdata.Points,
1470 element->elementdata.path->pathdata.Count);
1505 for(
i = 0;
i <
element->elementdata.path->pathdata.Count;
i++){
1506 element->elementdata.path->pathdata.Points[
i].X +=
dx;
1507 element->elementdata.path->pathdata.Points[
i].Y +=
dy;
1522 TRACE(
"(%p, %f, %f)\n", region,
dx,
dy);
1537 TRACE(
"(%p, %d, %d)\n", region,
dx,
dy);
1564 *
data = heap_alloc_zero(data_size);
1577 *
data = heap_alloc_zero(data_size);
1583 (*data)->rdh.nCount = 1;
1584 (*data)->rdh.nRgnSize =
sizeof(
RECT);
1585 (*data)->rdh.rcBound.left = (*data)->rdh.rcBound.top = -0x400000;
1586 (*data)->rdh.rcBound.right = (*data)->rdh.rcBound.bottom = 0x400000;
1588 memcpy((*data)->Buffer, &(*data)->rdh.rcBound,
sizeof(
RECT));
1641 for (
i=0;
i<
data->rdh.nCount;
i++)
1644 scans[
i].
Y = rects[
i].
top;
1675 for (
i=0;
i<
data->rdh.nCount;
i++)
1678 scans[
i].
Y = rects[
i].
top;
static BOOL heap_free(void *mem)
struct _RGNDATAHEADER RGNDATAHEADER
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipClonePath(GpPath *path, GpPath **clone)
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count)
DWORD write_region_data(const GpRegion *region, void *data)
static GpStatus get_region_hrgn(struct region_element *element, GpGraphics *graphics, HRGN *hrgn)
GpStatus WINGDIPAPI GdipIsVisibleRegionRect(GpRegion *region, REAL x, REAL y, REAL w, REAL h, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipCombineRegionPath(GpRegion *region, GpPath *path, CombineMode mode)
static GpStatus clone_element(const region_element *element, region_element **element2)
static GpStatus get_region_scans_data(GpRegion *region, GpMatrix *matrix, LPRGNDATA *data)
static void translate_region_element(region_element *element, REAL dx, REAL dy)
static void write_element(const region_element *element, DWORD *buffer, INT *filled)
GpStatus WINGDIPAPI GdipIsEmptyRegion(GpRegion *region, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipIsInfiniteRegion(GpRegion *region, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipSetInfinite(GpRegion *region)
GpStatus WINGDIPAPI GdipSetEmpty(GpRegion *region)
GpStatus WINGDIPAPI GdipTranslateRegionI(GpRegion *region, INT dx, INT dy)
GpStatus WINGDIPAPI GdipGetRegionHRgn(GpRegion *region, GpGraphics *graphics, HRGN *hrgn)
GpStatus WINGDIPAPI GdipGetRegionBoundsI(GpRegion *region, GpGraphics *graphics, GpRect *rect)
GpStatus WINGDIPAPI GdipTransformRegion(GpRegion *region, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF *rect, GpRegion **region)
GpStatus WINGDIPAPI GdipIsVisibleRegionPoint(GpRegion *region, REAL x, REAL y, GpGraphics *graphics, BOOL *res)
static GpStatus init_region(GpRegion *region, const RegionType type)
GpStatus WINGDIPAPI GdipCreateRegionRgnData(GDIPCONST BYTE *data, INT size, GpRegion **region)
static GpStatus transform_region_element(region_element *element, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsVisibleRegionRectI(GpRegion *region, INT x, INT y, INT w, INT h, GpGraphics *graphics, BOOL *res)
static INT get_element_size(const region_element *element)
GpStatus WINGDIPAPI GdipTranslateRegion(GpRegion *region, REAL dx, REAL dy)
GpStatus WINGDIPAPI GdipGetRegionScans(GpRegion *region, GpRectF *scans, INT *count, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipIsEqualRegion(GpRegion *region, GpRegion *region2, GpGraphics *graphics, BOOL *res)
static void write_float(DWORD *location, INT *offset, const FLOAT write)
GpStatus WINGDIPAPI GdipCombineRegionRectI(GpRegion *region, GDIPCONST GpRect *rect, CombineMode mode)
GpStatus WINGDIPAPI GdipCreateRegion(GpRegion **region)
static void fuse_region(GpRegion *region, region_element *left, region_element *right, const CombineMode mode)
GpStatus WINGDIPAPI GdipGetRegionDataSize(GpRegion *region, UINT *needed)
GpStatus WINGDIPAPI GdipCombineRegionRect(GpRegion *region, GDIPCONST GpRectF *rect, CombineMode mode)
GpStatus WINGDIPAPI GdipGetRegionScansCount(GpRegion *region, UINT *count, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateRegionHrgn(HRGN hrgn, GpRegion **region)
GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1, GpRegion *region2, CombineMode mode)
static void write_dword(DWORD *location, INT *offset, const DWORD write)
static GpStatus read_element(struct memory_buffer *mbuf, GpRegion *region, region_element *node, INT *count)
GpStatus WINGDIPAPI GdipIsVisibleRegionPointI(GpRegion *region, INT x, INT y, GpGraphics *graphics, BOOL *res)
GpStatus WINGDIPAPI GdipGetRegionData(GpRegion *region, BYTE *buffer, UINT size, UINT *needed)
GpStatus WINGDIPAPI GdipGetRegionScansI(GpRegion *region, GpRect *scans, INT *count, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipGetRegionBounds(GpRegion *region, GpGraphics *graphics, GpRectF *rect)
static GpStatus get_path_hrgn(GpPath *path, GpGraphics *graphics, HRGN *hrgn)
GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath *path, GpRegion **region)
GpStatus WINGDIPAPI GdipDeleteRegion(GpRegion *region)
GpStatus WINGDIPAPI GdipCreateRegionRectI(GDIPCONST GpRect *rect, GpRegion **region)
GpStatus WINGDIPAPI GdipCloneRegion(GpRegion *region, GpRegion **clone)
void delete_element(region_element *element)
const char * debugstr_rectf(const RectF *rc)
BOOL lengthen_path(GpPath *path, INT len)
DWORD write_path_data(GpPath *path, void *data) DECLSPEC_HIDDEN
static INT gdip_round(REAL x)
static void init_memory_buffer(struct memory_buffer *mbuf, const BYTE *buffer, INT size)
static const void * buffer_read(struct memory_buffer *mbuf, INT size)
GpStatus gdi_transform_acquire(GpGraphics *graphics)
GpStatus gdi_transform_release(GpGraphics *graphics)
GpStatus trace_path(GpGraphics *graphics, GpPath *path) DECLSPEC_HIDDEN
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLubyte GLubyte GLubyte GLubyte w
GLsizei const GLfloat * points
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
union region_element::@412 elementdata
struct region_element::@412::@413 combine
#define FIELD_OFFSET(t, f)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI EqualRgn(_In_ HRGN, _In_ HRGN)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI PtInRegion(_In_ HRGN, _In_ int, _In_ int)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
BOOL WINAPI RestoreDC(_In_ HDC, _In_ int)
HRGN WINAPI PathToRegion(_In_ HDC)
BOOL WINAPI RectInRegion(_In_ HRGN, _In_ LPCRECT)
DWORD WINAPI GetRegionData(_In_ HRGN hrgn, _In_ DWORD nCount, _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI EndPath(_In_ HDC)
int WINAPI SaveDC(_In_ HDC)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
int WINAPI SetPolyFillMode(_In_ HDC, _In_ int)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)