4 * Copyright 1993 Alexandre Julliard
5 * Copyright 2021 Jacek Caban for CodeWeavers
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __WINE_GDI_PRIVATE_H
23 #define __WINE_GDI_PRIVATE_H
32 void set_gdi_client_ptr( HGDIOBJ handle
, void *ptr
) DECLSPEC_HIDDEN
;
33 void *get_gdi_client_ptr( HGDIOBJ handle
, DWORD type
) DECLSPEC_HIDDEN
;
34 DC_ATTR
*get_dc_attr( HDC hdc
) DECLSPEC_HIDDEN
;
35 HGDIOBJ
get_full_gdi_handle( HGDIOBJ handle
) DECLSPEC_HIDDEN
;
36 void GDI_hdc_using_object( HGDIOBJ obj
, HDC hdc
,
37 void (*delete)( HDC hdc
, HGDIOBJ handle
)) DECLSPEC_HIDDEN
;
38 void GDI_hdc_not_using_object( HGDIOBJ obj
, HDC hdc
) DECLSPEC_HIDDEN
;
40 static inline DWORD
gdi_handle_type( HGDIOBJ obj
)
42 unsigned int handle
= HandleToULong( obj
);
43 return handle
& NTGDI_HANDLE_TYPE_MASK
;
46 /* metafile defines */
48 #define META_EOF 0x0000
50 #define METAFILE_MEMORY 1
51 #define METAFILE_DISK 2
53 #define MFVERSION 0x300
55 /* Undocumented value for DIB's iUsage: Indicates a mono DIB w/o pal entries */
56 #define DIB_PAL_MONO 2
58 /* Format of comment record added by GetWinMetaFileBits */
62 DWORD comment_id
; /* WMFC */
63 DWORD comment_type
; /* Always 0x00000001 */
64 DWORD version
; /* Always 0x00010000 */
66 DWORD flags
; /* Always 0 */
75 static inline BOOL
is_meta_dc( HDC hdc
)
77 return gdi_handle_type( hdc
) == NTGDI_OBJ_METADC
;
80 extern BOOL
METADC_Arc( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
81 INT xstart
, INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
82 extern BOOL
METADC_BitBlt( HDC hdc_dst
, INT x_dst
, INT y_dst
, INT width
, INT height
,
83 HDC hdc_src
, INT x_src
, INT y_src
, DWORD rop
);
84 extern BOOL
METADC_Chord( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
, INT xstart
,
85 INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
86 extern BOOL
METADC_DeleteDC( HDC hdc
);
87 extern BOOL
METADC_Ellipse( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
) DECLSPEC_HIDDEN
;
88 extern BOOL
METADC_ExcludeClipRect( HDC hdc
, INT left
, INT top
, INT right
,
89 INT bottom
) DECLSPEC_HIDDEN
;
90 extern BOOL
METADC_ExtEscape( HDC hdc
, INT escape
, INT input_size
, const void *input
,
91 INT output_size
, void *output
) DECLSPEC_HIDDEN
;
92 extern BOOL
METADC_ExtFloodFill( HDC hdc
, INT x
, INT y
, COLORREF color
,
93 UINT fill_type
) DECLSPEC_HIDDEN
;
94 extern BOOL
METADC_ExtSelectClipRgn( HDC hdc
, HRGN hrgn
, INT mode
) DECLSPEC_HIDDEN
;
95 extern BOOL
METADC_ExtTextOut( HDC hdc
, INT x
, INT y
, UINT flags
, const RECT
*rect
,
96 const WCHAR
*str
, UINT count
, const INT
*dx
) DECLSPEC_HIDDEN
;
97 extern BOOL
METADC_FillRgn( HDC hdc
, HRGN hrgn
, HBRUSH hbrush
) DECLSPEC_HIDDEN
;
98 extern BOOL
METADC_FrameRgn( HDC hdc
, HRGN hrgn
, HBRUSH hbrush
, INT x
, INT y
) DECLSPEC_HIDDEN
;
99 extern INT
METADC_GetDeviceCaps( HDC hdc
, INT cap
);
100 extern BOOL
METADC_IntersectClipRect( HDC hdc
, INT left
, INT top
, INT right
,
101 INT bottom
) DECLSPEC_HIDDEN
;
102 extern BOOL
METADC_InvertRgn( HDC hdc
, HRGN hrgn
) DECLSPEC_HIDDEN
;
103 extern BOOL
METADC_LineTo( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
104 extern BOOL
METADC_MoveTo( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
105 extern BOOL
METADC_OffsetClipRgn( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
106 extern BOOL
METADC_OffsetViewportOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
107 extern BOOL
METADC_OffsetWindowOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
108 extern BOOL
METADC_PaintRgn( HDC hdc
, HRGN hrgn
) DECLSPEC_HIDDEN
;
109 extern BOOL
METADC_PatBlt( HDC hdc
, INT left
, INT top
, INT width
, INT height
, DWORD rop
);
110 extern BOOL
METADC_Pie( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
111 INT xstart
, INT ystart
, INT xend
, INT yend
) DECLSPEC_HIDDEN
;
112 extern BOOL
METADC_PolyPolygon( HDC hdc
, const POINT
*points
, const INT
*counts
,
113 UINT polygons
) DECLSPEC_HIDDEN
;
114 extern BOOL
METADC_Polygon( HDC hdc
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
115 extern BOOL
METADC_Polyline( HDC hdc
, const POINT
*points
,INT count
) DECLSPEC_HIDDEN
;
116 extern BOOL
METADC_RealizePalette( HDC hdc
) DECLSPEC_HIDDEN
;
117 extern BOOL
METADC_Rectangle( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
) DECLSPEC_HIDDEN
;
118 extern BOOL
METADC_RestoreDC( HDC hdc
, INT level
) DECLSPEC_HIDDEN
;
119 extern BOOL
METADC_RoundRect( HDC hdc
, INT left
, INT top
, INT right
, INT bottom
,
120 INT ell_width
, INT ell_height
) DECLSPEC_HIDDEN
;
121 extern BOOL
METADC_SaveDC( HDC hdc
) DECLSPEC_HIDDEN
;
122 extern BOOL
METADC_ScaleViewportExtEx( HDC hdc
, INT x_num
, INT x_denom
, INT y_num
,
123 INT y_denom
) DECLSPEC_HIDDEN
;
124 extern BOOL
METADC_ScaleWindowExtEx( HDC hdc
, INT x_num
, INT x_denom
, INT y_num
,
125 INT y_denom
) DECLSPEC_HIDDEN
;
126 extern HGDIOBJ
METADC_SelectObject( HDC hdc
, HGDIOBJ obj
) DECLSPEC_HIDDEN
;
127 extern BOOL
METADC_SelectPalette( HDC hdc
, HPALETTE palette
) DECLSPEC_HIDDEN
;
128 extern BOOL
METADC_SetBkColor( HDC hdc
, COLORREF color
) DECLSPEC_HIDDEN
;
129 extern BOOL
METADC_SetBkMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
130 extern INT
METADC_SetDIBitsToDevice( HDC hdc
, INT x_dest
, INT y_dest
, DWORD width
, DWORD height
,
131 INT x_src
, INT y_src
, UINT startscan
, UINT lines
,
132 const void *bits
, const BITMAPINFO
*info
,
133 UINT coloruse
) DECLSPEC_HIDDEN
;
134 extern BOOL
METADC_SetLayout( HDC hdc
, DWORD layout
) DECLSPEC_HIDDEN
;
135 extern BOOL
METADC_SetTextCharacterExtra( HDC hdc
, INT extra
) DECLSPEC_HIDDEN
;
136 extern BOOL
METADC_SetMapMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
137 extern BOOL
METADC_SetMapperFlags( HDC hdc
, DWORD flags
) DECLSPEC_HIDDEN
;
138 extern BOOL
METADC_SetPixel( HDC hdc
, INT x
, INT y
, COLORREF color
) DECLSPEC_HIDDEN
;
139 extern BOOL
METADC_SetPolyFillMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
140 extern BOOL
METADC_SetRelAbs( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
141 extern BOOL
METADC_SetROP2( HDC hdc
, INT rop
) DECLSPEC_HIDDEN
;
142 extern BOOL
METADC_SetStretchBltMode( HDC hdc
, INT mode
) DECLSPEC_HIDDEN
;
143 extern BOOL
METADC_SetTextAlign( HDC hdc
, UINT align
) DECLSPEC_HIDDEN
;
144 extern BOOL
METADC_SetTextColor( HDC hdc
, COLORREF color
) DECLSPEC_HIDDEN
;
145 extern BOOL
METADC_SetTextJustification( HDC hdc
, INT extra
, INT breaks
) DECLSPEC_HIDDEN
;
146 extern BOOL
METADC_SetViewportExtEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
147 extern BOOL
METADC_SetViewportOrgEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
148 extern BOOL
METADC_SetWindowExtEx( HDC hdc
, INT x
, INT y
) DECLSPEC_HIDDEN
;
149 extern BOOL
METADC_SetWindowOrgEx( HDC
, INT x
, INT y
) DECLSPEC_HIDDEN
;
150 extern BOOL
METADC_StretchBlt( HDC hdc_dst
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
151 HDC hdc_src
, INT x_src
, INT y_src
, INT width_src
, INT height_src
,
153 extern INT
METADC_StretchDIBits( HDC hdc
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
154 INT x_src
, INT y_src
, INT width_src
, INT height_src
,
155 const void *bits
, const BITMAPINFO
*info
, UINT coloruse
,
156 DWORD rop
) DECLSPEC_HIDDEN
;
158 extern HMETAFILE
MF_Create_HMETAFILE(METAHEADER
*mh
) DECLSPEC_HIDDEN
;
160 /* enhanced metafiles */
162 #define WMFC_MAGIC 0x43464d57
169 } EMRSETTEXTJUSTIFICATION
, *PEMRSETTEXTJUSTIFICATION
;
171 extern BOOL
EMFDC_AbortPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
172 extern BOOL
EMFDC_AlphaBlend( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
173 HDC hdc_src
, INT x_src
, INT y_src
, INT width_src
, INT height_src
,
174 BLENDFUNCTION blend_function
);
175 extern BOOL
EMFDC_AngleArc( DC_ATTR
*dc_attr
, INT x
, INT y
, DWORD radius
, FLOAT start
,
176 FLOAT sweep
) DECLSPEC_HIDDEN
;
177 extern BOOL
EMFDC_ArcChordPie( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
178 INT bottom
, INT xstart
, INT ystart
, INT xend
,
179 INT yend
, DWORD type
) DECLSPEC_HIDDEN
;
180 extern BOOL
EMFDC_BeginPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
181 extern BOOL
EMFDC_BitBlt( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width
, INT height
,
182 HDC hdc_src
, INT x_src
, INT y_src
, DWORD rop
);
183 extern BOOL
EMFDC_CloseFigure( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
184 extern void EMFDC_DeleteDC( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
185 extern BOOL
EMFDC_Ellipse( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
186 INT bottom
) DECLSPEC_HIDDEN
;
187 extern BOOL
EMFDC_EndPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
188 extern BOOL
EMFDC_ExcludeClipRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
189 INT bottom
) DECLSPEC_HIDDEN
;
190 extern BOOL
EMFDC_ExtFloodFill( DC_ATTR
*dc_attr
, INT x
, INT y
, COLORREF color
,
191 UINT fill_type
) DECLSPEC_HIDDEN
;
192 extern BOOL
EMFDC_ExtSelectClipRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, INT mode
) DECLSPEC_HIDDEN
;
193 extern BOOL
EMFDC_ExtTextOut( DC_ATTR
*dc_attr
, INT x
, INT y
, UINT flags
, const RECT
*rect
,
194 const WCHAR
*str
, UINT count
, const INT
*dx
) DECLSPEC_HIDDEN
;
195 extern BOOL
EMFDC_FillPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
196 extern BOOL
EMFDC_FillRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, HBRUSH hbrush
) DECLSPEC_HIDDEN
;
197 extern BOOL
EMFDC_FlattenPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
198 extern BOOL
EMFDC_FrameRgn( DC_ATTR
*dc_attr
, HRGN hrgn
, HBRUSH hbrush
, INT width
,
199 INT height
) DECLSPEC_HIDDEN
;
200 extern BOOL
EMFDC_GradientFill( DC_ATTR
*dc_attr
, TRIVERTEX
*vert_array
, ULONG nvert
,
201 void *grad_array
, ULONG ngrad
, ULONG mode
) DECLSPEC_HIDDEN
;
202 extern BOOL
EMFDC_IntersectClipRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
203 INT bottom
) DECLSPEC_HIDDEN
;
204 extern BOOL
EMFDC_InvertRgn( DC_ATTR
*dc_attr
, HRGN hrgn
) DECLSPEC_HIDDEN
;
205 extern BOOL
EMFDC_LineTo( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
206 extern BOOL
EMFDC_MaskBlt( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
207 HDC hdc_src
, INT x_src
, INT y_src
, HBITMAP mask
,
208 INT x_mask
, INT y_mask
, DWORD rop
) DECLSPEC_HIDDEN
;
209 extern BOOL
EMFDC_ModifyWorldTransform( DC_ATTR
*dc_attr
, const XFORM
*xform
,
210 DWORD mode
) DECLSPEC_HIDDEN
;
211 extern BOOL
EMFDC_MoveTo( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
212 extern BOOL
EMFDC_OffsetClipRgn( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
213 extern BOOL
EMFDC_PaintRgn( DC_ATTR
*dc_attr
, HRGN hrgn
) DECLSPEC_HIDDEN
;
214 extern BOOL
EMFDC_PatBlt( DC_ATTR
*dc_attr
, INT left
, INT top
, INT width
, INT height
, DWORD rop
);
215 extern BOOL
EMFDC_PlgBlt( DC_ATTR
*dc_attr
, const POINT
*point
, HDC hdc_src
, INT x_src
, INT y_src
,
216 INT width
, INT height
, HBITMAP mask
, INT x_mask
, INT y_mask
) DECLSPEC_HIDDEN
;
217 extern BOOL
EMFDC_PolyBezier( DC_ATTR
*dc_attr
, const POINT
*points
, DWORD count
) DECLSPEC_HIDDEN
;
218 extern BOOL
EMFDC_PolyBezierTo( DC_ATTR
*dc_attr
, const POINT
*points
, DWORD count
) DECLSPEC_HIDDEN
;
219 extern BOOL
EMFDC_PolyDraw( DC_ATTR
*dc_attr
, const POINT
*points
, const BYTE
*types
,
220 DWORD count
) DECLSPEC_HIDDEN
;
221 extern BOOL
EMFDC_PolyPolyline( DC_ATTR
*dc_attr
, const POINT
*points
, const DWORD
*counts
,
222 DWORD polys
) DECLSPEC_HIDDEN
;
223 extern BOOL
EMFDC_PolyPolygon( DC_ATTR
*dc_attr
, const POINT
*points
, const INT
*counts
,
224 UINT polys
) DECLSPEC_HIDDEN
;
225 extern BOOL
EMFDC_Polygon( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
226 extern BOOL
EMFDC_Polyline( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
227 extern BOOL
EMFDC_PolylineTo( DC_ATTR
*dc_attr
, const POINT
*points
, INT count
) DECLSPEC_HIDDEN
;
228 extern BOOL
EMFDC_Rectangle( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
,
229 INT bottom
) DECLSPEC_HIDDEN
;
230 extern BOOL
EMFDC_RestoreDC( DC_ATTR
*dc_attr
, INT level
) DECLSPEC_HIDDEN
;
231 extern BOOL
EMFDC_RoundRect( DC_ATTR
*dc_attr
, INT left
, INT top
, INT right
, INT bottom
,
232 INT ell_width
, INT ell_height
) DECLSPEC_HIDDEN
;
233 extern BOOL
EMFDC_SaveDC( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
234 extern BOOL
EMFDC_ScaleViewportExtEx( DC_ATTR
*dc_attr
, INT x_num
, INT x_denom
, INT y_num
,
235 INT y_denom
) DECLSPEC_HIDDEN
;
236 extern BOOL
EMFDC_ScaleWindowExtEx( DC_ATTR
*dc_attr
, INT x_num
, INT x_denom
, INT y_num
,
237 INT y_denom
) DECLSPEC_HIDDEN
;
238 extern BOOL
EMFDC_SelectClipPath( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
239 extern BOOL
EMFDC_SelectObject( DC_ATTR
*dc_attr
, HGDIOBJ obj
) DECLSPEC_HIDDEN
;
240 extern BOOL
EMFDC_SelectPalette( DC_ATTR
*dc_attr
, HPALETTE palette
) DECLSPEC_HIDDEN
;
241 extern BOOL
EMFDC_SetArcDirection( DC_ATTR
*dc_attr
, INT dir
) DECLSPEC_HIDDEN
;
242 extern BOOL
EMFDC_SetBkColor( DC_ATTR
*dc_attr
, COLORREF color
) DECLSPEC_HIDDEN
;
243 extern BOOL
EMFDC_SetBkMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
244 extern BOOL
EMFDC_SetDCBrushColor( DC_ATTR
*dc_attr
, COLORREF color
) DECLSPEC_HIDDEN
;
245 extern BOOL
EMFDC_SetDCPenColor( DC_ATTR
*dc_attr
, COLORREF color
) DECLSPEC_HIDDEN
;
246 extern INT
EMFDC_SetDIBitsToDevice( DC_ATTR
*dc_attr
, INT x_dest
, INT y_dest
, DWORD width
,
247 DWORD height
, INT x_src
, INT y_src
, UINT startscan
,
248 UINT lines
, const void *bits
, const BITMAPINFO
*info
,
249 UINT coloruse
) DECLSPEC_HIDDEN
;
250 extern BOOL
EMFDC_SetLayout( DC_ATTR
*dc_attr
, DWORD layout
) DECLSPEC_HIDDEN
;
251 extern BOOL
EMFDC_SetMapMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
252 extern BOOL
EMFDC_SetMapperFlags( DC_ATTR
*dc_attr
, DWORD flags
) DECLSPEC_HIDDEN
;
253 extern BOOL
EMFDC_SetPixel( DC_ATTR
*dc_attr
, INT x
, INT y
, COLORREF color
) DECLSPEC_HIDDEN
;
254 extern BOOL
EMFDC_SetPolyFillMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
255 extern BOOL
EMFDC_SetROP2( DC_ATTR
*dc_attr
, INT rop
) DECLSPEC_HIDDEN
;
256 extern BOOL
EMFDC_SetStretchBltMode( DC_ATTR
*dc_attr
, INT mode
) DECLSPEC_HIDDEN
;
257 extern BOOL
EMFDC_SetTextAlign( DC_ATTR
*dc_attr
, UINT align
) DECLSPEC_HIDDEN
;
258 extern BOOL
EMFDC_SetTextColor( DC_ATTR
*dc_attr
, COLORREF color
) DECLSPEC_HIDDEN
;
259 extern BOOL
EMFDC_SetTextJustification( DC_ATTR
*dc_attr
, INT extra
, INT breaks
) DECLSPEC_HIDDEN
;
260 extern BOOL
EMFDC_SetViewportExtEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
261 extern BOOL
EMFDC_SetViewportOrgEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
262 extern BOOL
EMFDC_SetWindowExtEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
263 extern BOOL
EMFDC_SetWindowOrgEx( DC_ATTR
*dc_attr
, INT x
, INT y
) DECLSPEC_HIDDEN
;
264 extern BOOL
EMFDC_SetWorldTransform( DC_ATTR
*dc_attr
, const XFORM
*xform
) DECLSPEC_HIDDEN
;
265 extern BOOL
EMFDC_StretchBlt( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width_dst
, INT height_dst
,
266 HDC hdc_src
, INT x_src
, INT y_src
, INT width_src
, INT height_src
,
268 extern BOOL
EMFDC_StretchDIBits( DC_ATTR
*dc_attr
, INT x_dst
, INT y_dst
, INT width_dst
,
269 INT height_dst
, INT x_src
, INT y_src
, INT width_src
,
270 INT height_src
, const void *bits
, const BITMAPINFO
*info
,
271 UINT coloruse
, DWORD rop
) DECLSPEC_HIDDEN
;
272 extern BOOL
EMFDC_StrokeAndFillPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
273 extern BOOL
EMFDC_StrokePath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
274 extern BOOL
EMFDC_TransparentBlt( DC_ATTR
*dc_attr
, int x_dst
, int y_dst
, int width_dst
,
275 int height_dst
, HDC hdc_src
, int x_src
, int y_src
, int width_src
,
276 int height_src
, UINT color
) DECLSPEC_HIDDEN
;
277 extern BOOL
EMFDC_WidenPath( DC_ATTR
*dc_attr
) DECLSPEC_HIDDEN
;
279 extern HENHMETAFILE
EMF_Create_HENHMETAFILE( ENHMETAHEADER
*emh
, DWORD filesize
,
280 BOOL on_disk
) DECLSPEC_HIDDEN
;
282 static inline int get_dib_stride( int width
, int bpp
)
284 return ((width
* bpp
+ 31) >> 3) & ~3;
287 /* only for use on sanitized BITMAPINFO structures */
288 static inline int get_dib_info_size( const BITMAPINFO
*info
, UINT coloruse
)
290 if (info
->bmiHeader
.biCompression
== BI_BITFIELDS
)
291 return sizeof(BITMAPINFOHEADER
) + 3 * sizeof(DWORD
);
292 if (coloruse
== DIB_PAL_COLORS
)
293 return sizeof(BITMAPINFOHEADER
) + info
->bmiHeader
.biClrUsed
* sizeof(WORD
);
294 return FIELD_OFFSET( BITMAPINFO
, bmiColors
[info
->bmiHeader
.biClrUsed
] );
297 extern HMODULE gdi32_module DECLSPEC_HIDDEN
;
299 #endif /* __WINE_GDI_PRIVATE_H */