Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d858041a
Commit
d858041a
authored
Jan 04, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of the pen deferring support, all pen styles are implemented now.
parent
c82d2a03
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
30 deletions
+0
-30
dc.c
dlls/gdi32/dibdrv/dc.c
+0
-1
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+0
-8
graphics.c
dlls/gdi32/dibdrv/graphics.c
+0
-13
objects.c
dlls/gdi32/dibdrv/objects.c
+0
-8
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
d858041a
...
@@ -363,7 +363,6 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
...
@@ -363,7 +363,6 @@ static HBITMAP dibdrv_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
return
0
;
return
0
;
}
}
pdev
->
dib
=
dib
;
pdev
->
dib
=
dib
;
pdev
->
defer
=
0
;
GDI_ReleaseObj
(
bitmap
);
GDI_ReleaseObj
(
bitmap
);
return
next
->
funcs
->
pSelectBitmap
(
next
,
bitmap
);
return
next
->
funcs
->
pSelectBitmap
(
next
,
bitmap
);
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
d858041a
...
@@ -96,7 +96,6 @@ typedef struct dibdrv_physdev
...
@@ -96,7 +96,6 @@ typedef struct dibdrv_physdev
dib_brush
brush
;
dib_brush
brush
;
HRGN
clip
;
HRGN
clip
;
DWORD
defer
;
/* pen */
/* pen */
DWORD
pen_style
,
pen_endcap
,
pen_join
;
DWORD
pen_style
,
pen_endcap
,
pen_join
;
...
@@ -109,8 +108,6 @@ typedef struct dibdrv_physdev
...
@@ -109,8 +108,6 @@ typedef struct dibdrv_physdev
BOOL
(
*
pen_lines
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
,
HRGN
region
);
BOOL
(
*
pen_lines
)(
struct
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
,
HRGN
region
);
}
dibdrv_physdev
;
}
dibdrv_physdev
;
#define DEFER_PEN 2
extern
BOOL
dibdrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
extern
BOOL
dibdrv_AlphaBlend
(
PHYSDEV
dst_dev
,
struct
bitblt_coords
*
dst
,
PHYSDEV
src_dev
,
struct
bitblt_coords
*
src
,
BLENDFUNCTION
blend
)
DECLSPEC_HIDDEN
;
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
,
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 )
...
@@ -261,8 +258,3 @@ static inline int edge_coord( int y, int x1, int y1, int x2, int y2 )
else
else
return
x1
+
(
y
-
y1
)
*
(
x2
-
x1
)
/
(
y2
-
y1
);
return
x1
+
(
y
-
y1
)
*
(
x2
-
x1
)
/
(
y2
-
y1
);
}
}
static
inline
BOOL
defer_pen
(
dibdrv_physdev
*
pdev
)
{
return
pdev
->
defer
&
DEFER_PEN
;
}
dlls/gdi32/dibdrv/graphics.c
View file @
d858041a
...
@@ -441,14 +441,11 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y )
...
@@ -441,14 +441,11 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y )
*/
*/
BOOL
dibdrv_LineTo
(
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
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
POINT
pts
[
2
];
POINT
pts
[
2
];
HRGN
region
=
0
;
HRGN
region
=
0
;
BOOL
ret
;
BOOL
ret
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pLineTo
(
next
,
x
,
y
);
GetCurrentPositionEx
(
dev
->
hdc
,
pts
);
GetCurrentPositionEx
(
dev
->
hdc
,
pts
);
pts
[
1
].
x
=
x
;
pts
[
1
].
x
=
x
;
pts
[
1
].
y
=
y
;
pts
[
1
].
y
=
y
;
...
@@ -525,14 +522,11 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
...
@@ -525,14 +522,11 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
BOOL
dibdrv_PolyPolygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
INT
*
counts
,
DWORD
polygons
)
BOOL
dibdrv_PolyPolygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
INT
*
counts
,
DWORD
polygons
)
{
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pPolyPolygon
);
DWORD
total
,
i
,
pos
;
DWORD
total
,
i
,
pos
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
POINT
*
points
;
POINT
*
points
;
HRGN
outline
=
0
,
interior
=
0
;
HRGN
outline
=
0
,
interior
=
0
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pPolyPolygon
(
next
,
pt
,
counts
,
polygons
);
for
(
i
=
total
=
0
;
i
<
polygons
;
i
++
)
for
(
i
=
total
=
0
;
i
<
polygons
;
i
++
)
{
{
if
(
counts
[
i
]
<
2
)
return
FALSE
;
if
(
counts
[
i
]
<
2
)
return
FALSE
;
...
@@ -589,14 +583,11 @@ BOOL dibdrv_PolyPolygon( PHYSDEV dev, const POINT *pt, const INT *counts, DWORD
...
@@ -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
)
BOOL
dibdrv_PolyPolyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
{
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pPolyPolyline
);
DWORD
max_points
=
0
,
i
;
DWORD
max_points
=
0
,
i
;
POINT
*
points
;
POINT
*
points
;
BOOL
ret
=
TRUE
;
BOOL
ret
=
TRUE
;
HRGN
outline
=
0
;
HRGN
outline
=
0
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pPolyPolyline
(
next
,
pt
,
counts
,
polylines
);
for
(
i
=
0
;
i
<
polylines
;
i
++
)
for
(
i
=
0
;
i
<
polylines
;
i
++
)
{
{
if
(
counts
[
i
]
<
2
)
return
FALSE
;
if
(
counts
[
i
]
<
2
)
return
FALSE
;
...
@@ -659,7 +650,6 @@ BOOL dibdrv_Polyline( PHYSDEV dev, const POINT* pt, INT count )
...
@@ -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
)
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
);
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
left
,
top
,
right
,
bottom
,
TRUE
);
RECT
rect
=
get_device_rect
(
dev
->
hdc
,
left
,
top
,
right
,
bottom
,
TRUE
);
POINT
pts
[
4
];
POINT
pts
[
4
];
...
@@ -670,9 +660,6 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
...
@@ -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
(
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
)
if
(
pdev
->
pen_style
==
PS_INSIDEFRAME
)
{
{
rect
.
left
+=
pdev
->
pen_width
/
2
;
rect
.
left
+=
pdev
->
pen_width
/
2
;
...
...
dlls/gdi32/dibdrv/objects.c
View file @
d858041a
...
@@ -2088,8 +2088,6 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
...
@@ -2088,8 +2088,6 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
set_dash_pattern
(
&
pdev
->
pen_pattern
,
0
,
NULL
);
set_dash_pattern
(
&
pdev
->
pen_pattern
,
0
,
NULL
);
select_brush
(
&
pdev
->
pen_brush
,
&
logbrush
,
pattern
);
select_brush
(
&
pdev
->
pen_brush
,
&
logbrush
,
pattern
);
pdev
->
defer
|=
DEFER_PEN
;
pdev
->
pen_style
=
logpen
.
lopnStyle
&
PS_STYLE_MASK
;
pdev
->
pen_style
=
logpen
.
lopnStyle
&
PS_STYLE_MASK
;
switch
(
pdev
->
pen_style
)
switch
(
pdev
->
pen_style
)
...
@@ -2107,40 +2105,34 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
...
@@ -2107,40 +2105,34 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
pdev
->
pen_lines
=
dashed_wide_pen_lines
;
pdev
->
pen_lines
=
dashed_wide_pen_lines
;
}
}
else
pdev
->
pen_lines
=
dashed_pen_lines
;
else
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
}
}
if
(
pdev
->
pen_width
==
1
)
/* wide cosmetic pens are not dashed */
if
(
pdev
->
pen_width
==
1
)
/* wide cosmetic pens are not dashed */
{
{
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_pattern
=
dash_patterns_cosmetic
[
pdev
->
pen_style
-
1
];
pdev
->
pen_pattern
=
dash_patterns_cosmetic
[
pdev
->
pen_style
-
1
];
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
}
}
/* fall through */
/* fall through */
case
PS_SOLID
:
case
PS_SOLID
:
case
PS_INSIDEFRAME
:
case
PS_INSIDEFRAME
:
pdev
->
pen_lines
=
(
pdev
->
pen_width
==
1
)
?
solid_pen_lines
:
wide_pen_lines
;
pdev
->
pen_lines
=
(
pdev
->
pen_width
==
1
)
?
solid_pen_lines
:
wide_pen_lines
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
case
PS_NULL
:
case
PS_NULL
:
pdev
->
pen_width
=
0
;
pdev
->
pen_width
=
0
;
pdev
->
pen_lines
=
null_pen_lines
;
pdev
->
pen_lines
=
null_pen_lines
;
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
case
PS_ALTERNATE
:
case
PS_ALTERNATE
:
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_lines
=
dashed_pen_lines
;
pdev
->
pen_pattern
=
dash_patterns_geometric
[
PS_DOT
-
1
];
pdev
->
pen_pattern
=
dash_patterns_geometric
[
PS_DOT
-
1
];
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
case
PS_USERSTYLE
:
case
PS_USERSTYLE
:
pdev
->
pen_lines
=
(
pdev
->
pen_width
==
1
)
?
dashed_pen_lines
:
dashed_wide_pen_lines
;
pdev
->
pen_lines
=
(
pdev
->
pen_width
==
1
)
?
dashed_pen_lines
:
dashed_wide_pen_lines
;
set_dash_pattern
(
&
pdev
->
pen_pattern
,
elp
->
elpNumEntries
,
elp
->
elpStyleEntry
);
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
);
if
(
!
(
logpen
.
lopnStyle
&
PS_GEOMETRIC
))
scale_dash_pattern
(
&
pdev
->
pen_pattern
,
3
,
PS_ENDCAP_FLAT
);
pdev
->
defer
&=
~
DEFER_PEN
;
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment