---
name: "GdipGetRegionData"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/GdipGetRegionData"
---

# GdipGetRegionData(3w)

## NAME

**GdipGetRegionData** (GDIPLUS.@)

## SYNOPSIS

GpStatus WINGDIPAPI  GdipGetRegionData\
  (\
   GpRegion\* *region*,\
   BYTE\*     *buffer*,\
   UINT      *size*,\
   UINT\*     *needed*\
  )

## DESCRIPTION

Returns the header, followed by combining ops and *region* elements.

## PARAMS

*region* **\[In\]**  *region* to retrieve from.

*buffer* **\[Out\]**  *buffer* to hold the resulting data.

*size* **\[In\]**  *size* of the *buffer*.

*needed* **\[Out\]**  (optional) how much data was written.

## RETURNS

**SUCCESS:** Ok

**FAILURE:** InvalidParameter.

## NOTES

The header contains the *size*, a checksum, a version string, and the number of children. The *size* does not count itself or the checksum. Version is always something like 0xdbc01001 or 0xdbc01002.

An element is a **RECT**, or PATH; Combining ops are stored as their CombineMode value. Special regions (infinite, empty) emit just their op-code; GpRectFs emit their code followed by their points; GpPaths emit their code followed by a second header for the path followed by the actual path data. Followed by the flags for each point. The pathheader contains the *size* of the data to follow, a version number again, followed by a count of how many points, and any special flags which may apply. 0x4000 means its a path of shorts instead of **FLOAT**.

Combining Ops are stored in reverse order from when they were constructed; the output is a tree where the left side combining area is always taken first.

## IMPLEMENTATION

Declared in **"gdiplusflat.h"**.

Implemented in **"dlls/gdiplus/region.c"**.

Debug channel **"gdiplus"**.
