gdi32: Store brush origin in DC_ATTR.
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
215a352edd
commit
8029070257
|
@ -390,10 +390,10 @@ BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
|||
|
||||
if (!dc) return FALSE;
|
||||
if (oldorg)
|
||||
*oldorg = dc->brush_org;
|
||||
*oldorg = dc->attr->brush_org;
|
||||
|
||||
dc->brush_org.x = x;
|
||||
dc->brush_org.y = y;
|
||||
dc->attr->brush_org.x = x;
|
||||
dc->attr->brush_org.y = y;
|
||||
release_dc_ptr( dc );
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ static void set_initial_dc_state( DC *dc )
|
|||
dc->attr->brush_color = RGB( 255, 255, 255 );
|
||||
dc->attr->pen_color = RGB( 0, 0, 0 );
|
||||
dc->attr->text_color = RGB( 0, 0, 0 );
|
||||
dc->brush_org.x = 0;
|
||||
dc->brush_org.y = 0;
|
||||
dc->attr->brush_org.x = 0;
|
||||
dc->attr->brush_org.y = 0;
|
||||
dc->mapperFlags = 0;
|
||||
dc->attr->text_align = TA_LEFT | TA_TOP | TA_NOUPDATECP;
|
||||
dc->charExtra = 0;
|
||||
|
@ -410,7 +410,7 @@ BOOL CDECL nulldrv_RestoreDC( PHYSDEV dev, INT level )
|
|||
dc->attr->text_color = dcs->attr->text_color;
|
||||
dc->attr->brush_color = dcs->attr->brush_color;
|
||||
dc->attr->pen_color = dcs->attr->pen_color;
|
||||
dc->brush_org = dcs->brush_org;
|
||||
dc->attr->brush_org = dcs->attr->brush_org;
|
||||
dc->mapperFlags = dcs->mapperFlags;
|
||||
dc->attr->text_align = dcs->attr->text_align;
|
||||
dc->charExtra = dcs->charExtra;
|
||||
|
@ -544,7 +544,6 @@ INT WINAPI NtGdiSaveDC( HDC hdc )
|
|||
newdc->hFont = dc->hFont;
|
||||
newdc->hBitmap = dc->hBitmap;
|
||||
newdc->hPalette = dc->hPalette;
|
||||
newdc->brush_org = dc->brush_org;
|
||||
newdc->mapperFlags = dc->mapperFlags;
|
||||
newdc->charExtra = dc->charExtra;
|
||||
newdc->breakExtra = dc->breakExtra;
|
||||
|
@ -1274,19 +1273,6 @@ UINT WINAPI NtGdiSetBoundsRect( HDC hdc, const RECT *rect, UINT flags )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetBrushOrgEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI GetBrushOrgEx( HDC hdc, LPPOINT pt )
|
||||
{
|
||||
DC * dc = get_dc_ptr( hdc );
|
||||
if (!dc) return FALSE;
|
||||
*pt = dc->brush_org;
|
||||
release_dc_ptr( dc );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetLayout (GDI32.@)
|
||||
*
|
||||
|
|
|
@ -1030,7 +1030,7 @@ DWORD CDECL dibdrv_PutImage( PHYSDEV dev, HRGN clip, BITMAPINFO *info,
|
|||
}
|
||||
else
|
||||
ret = execute_rop( pdev, &dst->visrect, &src_dib, &src->visrect, &clipped_rects,
|
||||
&dc->brush_org, rop );
|
||||
&dc->attr->brush_org, rop );
|
||||
free_clipped_rects( &clipped_rects );
|
||||
}
|
||||
free_dib_info( &src_dib );
|
||||
|
|
|
@ -73,7 +73,7 @@ static BOOL brush_rect( dibdrv_physdev *pdev, dib_brush *brush, const RECT *rect
|
|||
|
||||
if (!get_clipped_rects( &pdev->dib, rect, clip, &clipped_rects )) return TRUE;
|
||||
ret = brush->rects( pdev, brush, &pdev->dib, clipped_rects.count, clipped_rects.rects,
|
||||
&dc->brush_org, dc->attr->rop_mode );
|
||||
&dc->attr->brush_org, dc->attr->rop_mode );
|
||||
free_clipped_rects( &clipped_rects );
|
||||
return ret;
|
||||
}
|
||||
|
@ -1203,7 +1203,7 @@ BOOL CDECL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
|
|||
break;
|
||||
default:
|
||||
ret = brush->rects( pdev, brush, &pdev->dib, clipped_rects.count, clipped_rects.rects,
|
||||
&dc->brush_org, rop2 );
|
||||
&dc->attr->brush_org, rop2 );
|
||||
break;
|
||||
}
|
||||
free_clipped_rects( &clipped_rects );
|
||||
|
|
|
@ -330,6 +330,17 @@ INT WINAPI GetStretchBltMode( HDC hdc )
|
|||
return dc_attr ? dc_attr->stretch_blt_mode : 0;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetBrushOrgEx (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI GetBrushOrgEx( HDC hdc, POINT *point )
|
||||
{
|
||||
DC_ATTR *dc_attr;
|
||||
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
|
||||
*point = dc_attr->brush_org;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetDCOrgEx (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -110,8 +110,6 @@ typedef struct tagDC
|
|||
const struct font_gamma_ramp *font_gamma_ramp;
|
||||
|
||||
UINT font_code_page;
|
||||
POINT brush_org;
|
||||
|
||||
DWORD mapperFlags; /* Font mapper flags */
|
||||
INT charExtra; /* Spacing from SetTextCharacterExtra() */
|
||||
INT breakExtra; /* breakTotalExtra / breakCount */
|
||||
|
|
|
@ -116,6 +116,7 @@ typedef struct DC_ATTR
|
|||
INT map_mode;
|
||||
RECT vis_rect; /* visible rectangle in screen coords */
|
||||
FLOAT miter_limit;
|
||||
POINT brush_org; /* brush origin */
|
||||
POINT wnd_org; /* window origin */
|
||||
SIZE wnd_ext; /* window extent */
|
||||
POINT vport_org; /* viewport origin */
|
||||
|
|
Loading…
Reference in New Issue