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
c6f6c3f7
Commit
c6f6c3f7
authored
Aug 19, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Aug 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement Polyline and PolyPolyline in the dib driver.
parent
0f40ad8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+2
-2
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+3
-0
graphics.c
dlls/gdi32/dibdrv/graphics.c
+55
-0
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
c6f6c3f7
...
...
@@ -773,9 +773,9 @@ const DC_FUNCTIONS dib_driver =
NULL
,
/* pPolyBezierTo */
NULL
,
/* pPolyDraw */
NULL
,
/* pPolyPolygon */
NULL
,
/* pPolyPolyline */
dibdrv_PolyPolyline
,
/* pPolyPolyline */
NULL
,
/* pPolygon */
NULL
,
/* pPolyline */
dibdrv_Polyline
,
/* pPolyline */
NULL
,
/* pPolylineTo */
dibdrv_PutImage
,
/* pPutImage */
NULL
,
/* pRealizeDefaultPalette */
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
c6f6c3f7
...
...
@@ -21,6 +21,9 @@
extern
BOOL
dibdrv_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_PaintRgn
(
PHYSDEV
dev
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_PolyPolyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_Rectangle
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
DECLSPEC_HIDDEN
;
extern
HBRUSH
dibdrv_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
hbrush
)
DECLSPEC_HIDDEN
;
extern
HPEN
dibdrv_SelectPen
(
PHYSDEV
dev
,
HPEN
hpen
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
c6f6c3f7
...
...
@@ -147,6 +147,61 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
}
/***********************************************************************
* dibdrv_PolyPolyline
*/
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
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pPolyPolyline
(
next
,
pt
,
counts
,
polylines
);
for
(
i
=
0
;
i
<
polylines
;
i
++
)
max_points
=
max
(
counts
[
i
],
max_points
);
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
max_points
*
sizeof
(
*
pt
)
);
if
(
!
points
)
return
FALSE
;
for
(
i
=
0
;
i
<
polylines
;
i
++
)
{
memcpy
(
points
,
pt
,
counts
[
i
]
*
sizeof
(
*
pt
)
);
pt
+=
counts
[
i
];
LPtoDP
(
dev
->
hdc
,
points
,
counts
[
i
]
);
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
);
}
HeapFree
(
GetProcessHeap
(),
0
,
points
);
return
TRUE
;
}
/***********************************************************************
* dibdrv_Polyline
*/
BOOL
dibdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pPolyline
);
POINT
*
points
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pPolyline
(
next
,
pt
,
count
);
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
pt
)
);
if
(
!
points
)
return
FALSE
;
memcpy
(
points
,
pt
,
count
*
sizeof
(
*
pt
)
);
LPtoDP
(
dev
->
hdc
,
points
,
count
);
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
count
,
points
);
HeapFree
(
GetProcessHeap
(),
0
,
points
);
return
TRUE
;
}
/***********************************************************************
* dibdrv_Rectangle
*/
BOOL
dibdrv_Rectangle
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
...
...
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