mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
gdi32: Get rid of the pen deferring support, all pen styles are implemented now.
This commit is contained in:
parent
c82d2a034f
commit
d858041a19
@ -363,7 +363,6 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
|
||||
return 0;
|
||||
}
|
||||
pdev->dib = dib;
|
||||
pdev->defer = 0;
|
||||
GDI_ReleaseObj( bitmap );
|
||||
|
||||
return next->funcs->pSelectBitmap( next, bitmap );
|
||||
|
@ -96,7 +96,6 @@ typedef struct dibdrv_physdev
|
||||
dib_brush brush;
|
||||
|
||||
HRGN clip;
|
||||
DWORD defer;
|
||||
|
||||
/* pen */
|
||||
DWORD pen_style, pen_endcap, pen_join;
|
||||
@ -109,8 +108,6 @@ typedef struct dibdrv_physdev
|
||||
BOOL (* pen_lines)(struct dibdrv_physdev *pdev, int num, POINT *pts, BOOL close, HRGN region);
|
||||
} dibdrv_physdev;
|
||||
|
||||
#define DEFER_PEN 2
|
||||
|
||||
extern BOOL dibdrv_AlphaBlend( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
||||
PHYSDEV src_dev, struct bitblt_coords *src, BLENDFUNCTION blend ) DECLSPEC_HIDDEN;
|
||||
extern DWORD dibdrv_BlendImage( PHYSDEV dev, BITMAPINFO *info, const struct gdi_image_bits *bits,
|
||||
@ -261,8 +258,3 @@ static inline int edge_coord( int y, int x1, int y1, int x2, int y2 )
|
||||
else
|
||||
return x1 + (y - y1) * (x2 - x1) / (y2 - y1);
|
||||
}
|
||||
|
||||
static inline BOOL defer_pen(dibdrv_physdev *pdev)
|
||||
{
|
||||
return pdev->defer & DEFER_PEN;
|
||||
}
|
||||
|
@ -441,14 +441,11 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y )
|
||||
*/
|
||||
BOOL dibdrv_LineTo( PHYSDEV dev, INT x, INT y )
|
||||
{
|
||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pLineTo );
|
||||
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||
POINT pts[2];
|
||||
HRGN region = 0;
|
||||
BOOL ret;
|
||||
|
||||
if(defer_pen(pdev)) return next->funcs->pLineTo( next, x, y );
|
||||
|
||||
GetCurrentPositionEx(dev->hdc, pts);
|
||||
pts[1].x = x;
|
||||
pts[1].y = y;
|
||||
@ -525,14 +522,11 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
|
||||
BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD polygons )
|
||||
{
|
||||
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyPolygon );
|
||||
DWORD total, i, pos;
|
||||
BOOL ret = TRUE;
|
||||
POINT *points;
|
||||
HRGN outline = 0, interior = 0;
|
||||
|
||||
if (defer_pen( pdev )) return next->funcs->pPolyPolygon( next, pt, counts, polygons );
|
||||
|
||||
for (i = total = 0; i < polygons; i++)
|
||||
{
|
||||
if (counts[i] < 2) return FALSE;
|
||||
@ -589,14 +583,11 @@ BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD
|
||||
BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines )
|
||||
{
|
||||
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pPolyPolyline );
|
||||
DWORD max_points = 0, i;
|
||||
POINT *points;
|
||||
BOOL ret = TRUE;
|
||||
HRGN outline = 0;
|
||||
|
||||
if (defer_pen( pdev )) return next->funcs->pPolyPolyline( next, pt, counts, polylines );
|
||||
|
||||
for (i = 0; i < polylines; i++)
|
||||
{
|
||||
if (counts[i] < 2) return FALSE;
|
||||
@ -659,7 +650,6 @@ BOOL dibdrv_Polyline( PHYSDEV dev, const POINT* pt, INT count )
|
||||
*/
|
||||
BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
||||
{
|
||||
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pRectangle );
|
||||
dibdrv_physdev *pdev = get_dibdrv_pdev(dev);
|
||||
RECT rect = get_device_rect( dev->hdc, left, top, right, bottom, TRUE );
|
||||
POINT pts[4];
|
||||
@ -670,9 +660,6 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
|
||||
|
||||
if(rect.left == rect.right || rect.top == rect.bottom) return TRUE;
|
||||
|
||||
if(defer_pen(pdev))
|
||||
return next->funcs->pRectangle( next, left, top, right, bottom );
|
||||
|
||||
if (pdev->pen_style == PS_INSIDEFRAME)
|
||||
{
|
||||
rect.left += pdev->pen_width / 2;
|
||||
|
@ -2088,8 +2088,6 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
|
||||
set_dash_pattern( &pdev->pen_pattern, 0, NULL );
|
||||
select_brush( &pdev->pen_brush, &logbrush, pattern );
|
||||
|
||||
pdev->defer |= DEFER_PEN;
|
||||
|
||||
pdev->pen_style = logpen.lopnStyle & PS_STYLE_MASK;
|
||||
|
||||
switch (pdev->pen_style)
|
||||
@ -2107,40 +2105,34 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
|
||||
pdev->pen_lines = dashed_wide_pen_lines;
|
||||
}
|
||||
else pdev->pen_lines = dashed_pen_lines;
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
}
|
||||
if (pdev->pen_width == 1) /* wide cosmetic pens are not dashed */
|
||||
{
|
||||
pdev->pen_lines = dashed_pen_lines;
|
||||
pdev->pen_pattern = dash_patterns_cosmetic[pdev->pen_style - 1];
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
}
|
||||
/* fall through */
|
||||
case PS_SOLID:
|
||||
case PS_INSIDEFRAME:
|
||||
pdev->pen_lines = (pdev->pen_width == 1) ? solid_pen_lines : wide_pen_lines;
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
|
||||
case PS_NULL:
|
||||
pdev->pen_width = 0;
|
||||
pdev->pen_lines = null_pen_lines;
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
|
||||
case PS_ALTERNATE:
|
||||
pdev->pen_lines = dashed_pen_lines;
|
||||
pdev->pen_pattern = dash_patterns_geometric[PS_DOT - 1];
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
|
||||
case PS_USERSTYLE:
|
||||
pdev->pen_lines = (pdev->pen_width == 1) ? dashed_pen_lines : dashed_wide_pen_lines;
|
||||
set_dash_pattern( &pdev->pen_pattern, elp->elpNumEntries, elp->elpStyleEntry );
|
||||
if (!(logpen.lopnStyle & PS_GEOMETRIC)) scale_dash_pattern( &pdev->pen_pattern, 3, PS_ENDCAP_FLAT );
|
||||
pdev->defer &= ~DEFER_PEN;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user