Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
cfd03d96
Commit
cfd03d96
authored
Dec 10, 2013
by
Daniel Wendt
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: fix for rotated ellipse
Bug:
http://bugs.winehq.org/show_bug.cgi?id=35331
parent
b6966665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
18 deletions
+42
-18
graphics.c
dlls/win32u/dibdrv/graphics.c
+42
-18
No files found.
dlls/win32u/dibdrv/graphics.c
View file @
cfd03d96
...
...
@@ -1535,6 +1535,23 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
BOOL
ret
=
TRUE
;
HRGN
outline
=
0
,
interior
=
0
;
BOOL
exclude_rotation_translation
=
FALSE
;
XFORM
old
;
XFORM
rotation_and_translation
;
if
(
dc
->
attr
->
graphics_mode
==
GM_ADVANCED
)
{
XFORM
xf
;
NtGdiGetTransform
(
pdev
->
dev
.
hdc
,
0x203
,
&
old
);
xf
=
old
;
if
(
xform_has_rotate_and_uniform_scale_and_shear
(
&
xf
)
&&
xform_decompose_rotation_and_translation
(
&
xf
,
&
rotation_and_translation
))
{
NtGdiModifyWorldTransform
(
pdev
->
dev
.
hdc
,
&
xf
,
MWT_SET
);
exclude_rotation_translation
=
TRUE
;
}
}
if
(
!
get_pen_device_rect
(
dc
,
pdev
,
&
rect
,
left
,
top
,
right
,
bottom
))
return
TRUE
;
pt
[
0
].
x
=
pt
[
0
].
y
=
0
;
...
...
@@ -1555,23 +1572,6 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
return
FALSE
;
}
if
(
pdev
->
brush
.
style
!=
BS_NULL
&&
!
(
interior
=
NtGdiCreateRoundRectRgn
(
rect
.
left
,
rect
.
top
,
rect
.
right
+
1
,
rect
.
bottom
+
1
,
ellipse_width
,
ellipse_height
)))
{
free
(
points
);
if
(
outline
)
NtGdiDeleteObjectApp
(
outline
);
return
FALSE
;
}
/* if not using a region, paint the interior first so the outline can overlap it */
if
(
interior
&&
!
outline
)
{
ret
=
brush_region
(
pdev
,
interior
);
NtGdiDeleteObjectApp
(
interior
);
interior
=
0
;
}
count
=
ellipse_first_quadrant
(
ellipse_width
,
ellipse_height
,
points
);
if
(
dc
->
attr
->
arc_direction
==
AD_CLOCKWISE
)
...
...
@@ -1615,13 +1615,37 @@ BOOL CDECL dibdrv_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bott
}
count
=
end
+
1
;
if
(
exclude_rotation_translation
==
TRUE
)
{
NtGdiModifyWorldTransform
(
pdev
->
dev
.
hdc
,
&
rotation_and_translation
,
MWT_SET
);
/* apply rotation and translation to calculated points */
NtGdiTransformPoints
(
dev
->
hdc
,
points
,
points
,
count
,
NtGdiLPtoDP
);
/* restore origin matrix */
NtGdiModifyWorldTransform
(
pdev
->
dev
.
hdc
,
&
old
,
MWT_SET
);
}
if
(
pdev
->
brush
.
style
!=
BS_NULL
&&
!
(
interior
=
ULongToHandle
(
NtGdiPolyPolyDraw
(
ULongToHandle
(
ALTERNATE
),
points
,
(
const
UINT
*
)
&
count
,
1
,
NtGdiPolyPolygonRgn
))))
{
free
(
points
);
if
(
outline
)
NtGdiDeleteObjectApp
(
outline
);
return
FALSE
;
}
/* if not using a region, paint the interior first so the outline can overlap it */
if
(
interior
&&
!
outline
)
{
ret
=
brush_region
(
pdev
,
interior
);
NtGdiDeleteObjectApp
(
interior
);
interior
=
0
;
}
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
count
,
points
,
TRUE
,
outline
);
add_pen_lines_bounds
(
pdev
,
count
,
points
,
outline
);
if
(
interior
)
{
NtGdiCombineRgn
(
interior
,
interior
,
outline
,
RGN_DIFF
);
ret
=
brush_region
(
pdev
,
interior
);
NtGdiDeleteObjectApp
(
interior
);
}
...
...
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