Commit a214a3c3 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Store a pointer to the path in the DC and make the path structure opaque.

parent ddc9860a
......@@ -110,6 +110,7 @@ DC *alloc_dc_ptr( WORD magic )
dc->hDevice = 0;
dc->hPalette = GetStockObject( DEFAULT_PALETTE );
dc->gdiFont = 0;
dc->path = NULL;
dc->font_code_page = CP_ACP;
dc->ROPmode = R2_COPYPEN;
dc->polyFillMode = ALTERNATE;
......@@ -146,7 +147,6 @@ DC *alloc_dc_ptr( WORD magic )
dc->BoundsRect.top = 0;
dc->BoundsRect.right = 0;
dc->BoundsRect.bottom = 0;
PATH_InitGdiPath(&dc->path);
if (!(dc->hSelf = alloc_gdi_handle( &dc->header, magic, &dc_funcs )))
{
......@@ -174,7 +174,7 @@ static void free_dc_state( DC *dc )
if (dc->hMetaRgn) DeleteObject( dc->hMetaRgn );
if (dc->hMetaClipRgn) DeleteObject( dc->hMetaClipRgn );
if (dc->hVisRgn) DeleteObject( dc->hVisRgn );
PATH_DestroyGdiPath( &dc->path );
if (dc->path) free_gdi_path( dc->path );
HeapFree( GetProcessHeap(), 0, dc );
}
......
......@@ -72,27 +72,6 @@ typedef struct tagGDIOBJHDR
struct hdc_list *hdcs;
} GDIOBJHDR;
/* It should not be necessary to access the contents of the GdiPath
* structure directly; if you find that the exported functions don't
* allow you to do what you want, then please place a new exported
* function that does this job in path.c.
*/
typedef enum tagGdiPathState
{
PATH_Null,
PATH_Open,
PATH_Closed
} GdiPathState;
typedef struct gdi_path
{
GdiPathState state;
POINT *pPoints;
BYTE *pFlags;
int numEntriesUsed, numEntriesAllocated;
BOOL newStroke;
} GdiPath;
typedef struct tagGdiFont GdiFont;
typedef struct tagDC
......@@ -137,7 +116,7 @@ typedef struct tagDC
HPALETTE hPalette;
GdiFont *gdiFont;
GdiPath path;
struct gdi_path *path;
UINT font_code_page;
WORD ROPmode;
......@@ -320,8 +299,7 @@ extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOO
/* path.c */
extern void PATH_InitGdiPath(GdiPath *pPath) DECLSPEC_HIDDEN;
extern void PATH_DestroyGdiPath(GdiPath *pPath) DECLSPEC_HIDDEN;
extern void free_gdi_path( struct gdi_path *path ) DECLSPEC_HIDDEN;
extern BOOL PATH_SavePath( DC *dst, DC *src ) DECLSPEC_HIDDEN;
extern BOOL PATH_RestorePath( DC *dst, DC *src ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment