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
fc5e2948
Commit
fc5e2948
authored
Oct 26, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement the LineTo entry point in the path driver.
parent
2c1ec7fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
40 deletions
+26
-40
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-1
painting.c
dlls/gdi32/painting.c
+4
-7
path.c
dlls/gdi32/path.c
+22
-32
No files found.
dlls/gdi32/gdi_private.h
View file @
fc5e2948
...
...
@@ -325,7 +325,6 @@ extern void PATH_DestroyGdiPath(GdiPath *pPath) DECLSPEC_HIDDEN;
extern
BOOL
PATH_SavePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_RestorePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_LineTo
(
DC
*
dc
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_Rectangle
(
DC
*
dc
,
INT
x1
,
INT
y1
,
INT
x2
,
INT
y2
)
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
;
...
...
dlls/gdi32/painting.c
View file @
fc5e2948
...
...
@@ -232,18 +232,15 @@ BOOL nulldrv_PolylineTo( PHYSDEV dev, const POINT *points, INT count )
BOOL
WINAPI
LineTo
(
HDC
hdc
,
INT
x
,
INT
y
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
PHYSDEV
physdev
;
BOOL
ret
;
if
(
!
dc
)
return
FALSE
;
update_dc
(
dc
);
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_LineTo
(
dc
,
x
,
y
);
else
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pLineTo
);
ret
=
physdev
->
funcs
->
pLineTo
(
physdev
,
x
,
y
);
}
physdev
=
GET_DC_PHYSDEV
(
dc
,
pLineTo
);
ret
=
physdev
->
funcs
->
pLineTo
(
physdev
,
x
,
y
);
if
(
ret
)
{
dc
->
CursPosX
=
x
;
dc
->
CursPosY
=
y
;
...
...
dlls/gdi32/path.c
View file @
fc5e2948
...
...
@@ -895,42 +895,32 @@ static BOOL pathdrv_MoveTo( PHYSDEV dev, INT x, INT y )
return
TRUE
;
}
/* PATH_LineTo
*
* Should be called when a LineTo is performed on a DC that has an
* open path. This adds a PT_LINETO entry to the path (and possibly
* a PT_MOVETO entry, if this is the first LineTo in a stroke).
* Returns TRUE if successful, else FALSE.
/*************************************************************
* pathdrv_LineTo
*/
BOOL
PATH_LineTo
(
DC
*
dc
,
INT
x
,
INT
y
)
static
BOOL
pathdrv_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
{
GdiPath
*
pPath
=
&
dc
->
path
;
POINT
point
,
pointCurPos
;
/* Check that path is open */
if
(
pPath
->
state
!=
PATH_Open
)
return
FALSE
;
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
POINT
point
,
pointCurPos
;
/* Convert point to device coordinates */
point
.
x
=
x
;
point
.
y
=
y
;
if
(
!
LPtoDP
(
dc
->
hSelf
,
&
point
,
1
))
return
FALSE
;
/* Convert point to device coordinates */
point
.
x
=
x
;
point
.
y
=
y
;
LPtoDP
(
dev
->
hdc
,
&
point
,
1
);
/* Add a PT_MOVETO if necessary */
if
(
pPath
->
newStroke
)
{
pPath
->
newStroke
=
FALSE
;
pointCurPos
.
x
=
dc
->
CursPosX
;
pointCurPos
.
y
=
dc
->
CursPosY
;
if
(
!
LPtoDP
(
dc
->
hSelf
,
&
pointCurPos
,
1
))
return
FALSE
;
if
(
!
PATH_AddEntry
(
pPath
,
&
pointCurPos
,
PT_MOVETO
))
return
FALSE
;
}
/* Add a PT_MOVETO if necessary */
if
(
physdev
->
path
->
newStroke
)
{
physdev
->
path
->
newStroke
=
FALSE
;
GetCurrentPositionEx
(
dev
->
hdc
,
&
pointCurPos
);
LPtoDP
(
dev
->
hdc
,
&
pointCurPos
,
1
);
if
(
!
PATH_AddEntry
(
physdev
->
path
,
&
pointCurPos
,
PT_MOVETO
))
return
FALSE
;
}
/* Add a PT_LINETO entry */
return
PATH_AddEntry
(
pP
ath
,
&
point
,
PT_LINETO
);
/* Add a PT_LINETO entry */
return
PATH_AddEntry
(
physdev
->
p
ath
,
&
point
,
PT_LINETO
);
}
/* PATH_RoundRect
...
...
@@ -2360,7 +2350,7 @@ const struct gdi_dc_funcs path_driver =
NULL
,
/* pGetTextMetrics */
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
NULL
,
/* pLineTo */
pathdrv_LineTo
,
/* pLineTo */
NULL
,
/* pModifyWorldTransform */
pathdrv_MoveTo
,
/* pMoveTo */
NULL
,
/* pOffsetClipRgn */
...
...
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