Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4d9cc241
Commit
4d9cc241
authored
Oct 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement the arc entry points in the path driver.
parent
f8040958
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
111 deletions
+117
-111
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-3
painting.c
dlls/gdi32/painting.c
+17
-53
path.c
dlls/gdi32/path.c
+100
-55
No files found.
dlls/gdi32/gdi_private.h
View file @
4d9cc241
...
...
@@ -327,9 +327,6 @@ extern BOOL PATH_RestorePath( DC *dst, DC *src ) DECLSPEC_HIDDEN;
extern
BOOL
PATH_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprc
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_Ellipse
(
DC
*
dc
,
INT
x1
,
INT
y1
,
INT
x2
,
INT
y2
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_Arc
(
DC
*
dc
,
INT
x1
,
INT
y1
,
INT
x2
,
INT
y2
,
INT
xStart
,
INT
yStart
,
INT
xEnd
,
INT
yEnd
,
INT
lines
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolyBezierTo
(
DC
*
dc
,
const
POINT
*
pt
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolyBezier
(
DC
*
dc
,
const
POINT
*
pt
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_PolyDraw
(
DC
*
dc
,
const
POINT
*
pts
,
const
BYTE
*
types
,
DWORD
cbCount
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/painting.c
View file @
4d9cc241
...
...
@@ -287,14 +287,9 @@ BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right,
if
(
dc
)
{
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_Arc
(
dc
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
,
0
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pArc
);
update_dc
(
dc
);
ret
=
physdev
->
funcs
->
pArc
(
physdev
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
);
}
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
@@ -316,18 +311,15 @@ BOOL WINAPI ArcTo( HDC hdc,
xcenter
=
right
>
left
?
left
+
xradius
:
right
+
xradius
,
ycenter
=
bottom
>
top
?
top
+
yradius
:
bottom
+
yradius
,
angle
;
PHYSDEV
physdev
;
BOOL
result
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
result
=
PATH_Arc
(
dc
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
,
-
1
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pArcTo
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pArcTo
);
result
=
physdev
->
funcs
->
pArcTo
(
physdev
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
);
}
if
(
result
)
{
angle
=
atan2
(((
yend
-
ycenter
)
/
height
),
((
xend
-
xcenter
)
/
width
));
...
...
@@ -346,18 +338,14 @@ BOOL WINAPI Pie( HDC hdc, INT left, INT top,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
{
BOOL
ret
=
FALSE
;
BOOL
ret
;
PHYSDEV
physdev
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_Arc
(
dc
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
,
2
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPie
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pPie
);
ret
=
physdev
->
funcs
->
pPie
(
physdev
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
);
}
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -370,18 +358,14 @@ BOOL WINAPI Chord( HDC hdc, INT left, INT top,
INT
right
,
INT
bottom
,
INT
xstart
,
INT
ystart
,
INT
xend
,
INT
yend
)
{
BOOL
ret
=
FALSE
;
BOOL
ret
;
PHYSDEV
physdev
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_Arc
(
dc
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
,
1
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pChord
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pChord
);
ret
=
physdev
->
funcs
->
pChord
(
physdev
,
left
,
top
,
right
,
bottom
,
xstart
,
ystart
,
xend
,
yend
);
}
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -393,19 +377,14 @@ BOOL WINAPI Chord( HDC hdc, INT left, INT top,
BOOL
WINAPI
Ellipse
(
HDC
hdc
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
{
BOOL
ret
=
FALSE
;
BOOL
ret
;
PHYSDEV
physdev
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_Ellipse
(
dc
,
left
,
top
,
right
,
bottom
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pEllipse
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pEllipse
);
ret
=
physdev
->
funcs
->
pEllipse
(
physdev
,
left
,
top
,
right
,
bottom
);
}
release_dc_ptr
(
dc
);
return
ret
;
}
...
...
@@ -966,7 +945,7 @@ BOOL WINAPI PolyBezierTo( HDC hdc, const POINT* lppt, DWORD cPoints )
*/
BOOL
WINAPI
AngleArc
(
HDC
hdc
,
INT
x
,
INT
y
,
DWORD
dwRadius
,
FLOAT
eStartAngle
,
FLOAT
eSweepAngle
)
{
INT
x1
,
y1
,
x2
,
y2
,
arcdir
;
PHYSDEV
physdev
;
BOOL
result
;
DC
*
dc
;
...
...
@@ -976,28 +955,13 @@ BOOL WINAPI AngleArc(HDC hdc, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, F
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
/* Calculate the end point */
x2
=
GDI_ROUND
(
x
+
cos
((
eStartAngle
+
eSweepAngle
)
*
M_PI
/
180
)
*
dwRadius
);
y2
=
GDI_ROUND
(
y
-
sin
((
eStartAngle
+
eSweepAngle
)
*
M_PI
/
180
)
*
dwRadius
);
update_dc
(
dc
);
if
(
!
PATH_IsPathOpen
(
dc
->
path
))
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pAngleArc
);
physdev
=
GET_DC_PHYSDEV
(
dc
,
pAngleArc
);
result
=
physdev
->
funcs
->
pAngleArc
(
physdev
,
x
,
y
,
dwRadius
,
eStartAngle
,
eSweepAngle
);
}
else
{
/* do it using ArcTo */
x1
=
GDI_ROUND
(
x
+
cos
(
eStartAngle
*
M_PI
/
180
)
*
dwRadius
);
y1
=
GDI_ROUND
(
y
-
sin
(
eStartAngle
*
M_PI
/
180
)
*
dwRadius
);
arcdir
=
SetArcDirection
(
hdc
,
eSweepAngle
>=
0
?
AD_COUNTERCLOCKWISE
:
AD_CLOCKWISE
);
result
=
ArcTo
(
hdc
,
x
-
dwRadius
,
y
-
dwRadius
,
x
+
dwRadius
,
y
+
dwRadius
,
x1
,
y1
,
x2
,
y2
);
SetArcDirection
(
hdc
,
arcdir
);
}
if
(
result
)
{
dc
->
CursPosX
=
x2
;
dc
->
CursPosY
=
y2
;
dc
->
CursPosX
=
GDI_ROUND
(
x
+
cos
((
eStartAngle
+
eSweepAngle
)
*
M_PI
/
180
)
*
dwRadius
)
;
dc
->
CursPosY
=
GDI_ROUND
(
y
-
sin
((
eStartAngle
+
eSweepAngle
)
*
M_PI
/
180
)
*
dwRadius
)
;
}
release_dc_ptr
(
dc
);
return
result
;
...
...
dlls/gdi32/path.c
View file @
4d9cc241
This diff is collapsed.
Click to expand it.
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