gdi32: Use DC_ATTR for SetBrushOrgEx implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8029070257
commit
be71f33146
|
@ -370,49 +370,6 @@ HBRUSH WINAPI CreateSolidBrush( COLORREF color )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetBrushOrgEx (GDI32.@)
|
||||
*
|
||||
* Set the brush origin for a device context.
|
||||
*
|
||||
* PARAMS
|
||||
* hdc [I] Device context to set the brush origin for
|
||||
* x [I] New x origin
|
||||
* y [I] New y origin
|
||||
* oldorg [O] If non NULL, destination for previously set brush origin.
|
||||
*
|
||||
* RETURNS
|
||||
* Success: TRUE. The origin is set to (x,y), and oldorg is updated if given.
|
||||
*/
|
||||
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
||||
{
|
||||
DC *dc = get_dc_ptr( hdc );
|
||||
|
||||
if (!dc) return FALSE;
|
||||
if (oldorg)
|
||||
*oldorg = dc->attr->brush_org;
|
||||
|
||||
dc->attr->brush_org.x = x;
|
||||
dc->attr->brush_org.y = y;
|
||||
release_dc_ptr( dc );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FixBrushOrgEx (GDI32.@)
|
||||
*
|
||||
* See SetBrushOrgEx.
|
||||
*
|
||||
* NOTES
|
||||
* This function is no longer documented by MSDN, but in Win95 GDI32 it
|
||||
* is the same as SetBrushOrgEx().
|
||||
*/
|
||||
BOOL WINAPI FixBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
||||
{
|
||||
return SetBrushOrgEx(hdc,x,y,oldorg);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* NtGdiSelectBrush (win32u.@)
|
||||
*/
|
||||
|
|
|
@ -341,6 +341,27 @@ BOOL WINAPI GetBrushOrgEx( HDC hdc, POINT *point )
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* SetBrushOrgEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, POINT *oldorg )
|
||||
{
|
||||
DC_ATTR *dc_attr;
|
||||
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
|
||||
if (oldorg) *oldorg = dc_attr->brush_org;
|
||||
dc_attr->brush_org.x = x;
|
||||
dc_attr->brush_org.y = y;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* FixBrushOrgEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI FixBrushOrgEx( HDC hdc, INT x, INT y, POINT *oldorg )
|
||||
{
|
||||
return SetBrushOrgEx( hdc, x, y, oldorg );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCOrgEx (GDI32.@)
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue