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
579afe5c
Commit
579afe5c
authored
Dec 29, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement PolyPolygon in the DIB driver.
parent
f5549ae1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
2 deletions
+72
-2
dc.c
dlls/gdi32/dibdrv/dc.c
+2
-2
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+2
-0
graphics.c
dlls/gdi32/dibdrv/graphics.c
+68
-0
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
579afe5c
...
...
@@ -474,9 +474,9 @@ const struct gdi_dc_funcs dib_driver =
NULL
,
/* pPolyBezier */
NULL
,
/* pPolyBezierTo */
NULL
,
/* pPolyDraw */
NULL
,
/* pPolyPolygon */
dibdrv_PolyPolygon
,
/* pPolyPolygon */
dibdrv_PolyPolyline
,
/* pPolyPolyline */
NULL
,
/* pPolygon */
dibdrv_Polygon
,
/* pPolygon */
dibdrv_Polyline
,
/* pPolyline */
NULL
,
/* pPolylineTo */
dibdrv_PutImage
,
/* pPutImage */
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
579afe5c
...
...
@@ -122,8 +122,10 @@ extern COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
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_PolyPolygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
INT
*
counts
,
DWORD
polygons
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_PolyPolyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_Polygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
DWORD
dibdrv_PutImage
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
HRGN
clip
,
BITMAPINFO
*
info
,
const
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
,
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
579afe5c
...
...
@@ -520,6 +520,64 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
}
/***********************************************************************
* dibdrv_PolyPolygon
*/
BOOL
dibdrv_PolyPolygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
INT
*
counts
,
DWORD
polygons
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
PHYSDEV
next
=
GET_NEXT_PHYSDEV
(
dev
,
pPolyPolygon
);
DWORD
total
,
i
,
pos
;
BOOL
ret
=
FALSE
;
POINT
*
points
;
INT
rop
=
GetROP2
(
dev
->
hdc
);
HRGN
outline
=
0
,
interior
;
if
(
defer_pen
(
pdev
))
return
next
->
funcs
->
pPolyPolygon
(
next
,
pt
,
counts
,
polygons
);
for
(
i
=
total
=
0
;
i
<
polygons
;
i
++
)
{
if
(
counts
[
i
]
<
2
)
return
FALSE
;
total
+=
counts
[
i
];
}
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
*
pt
)
);
if
(
!
points
)
return
FALSE
;
memcpy
(
points
,
pt
,
total
*
sizeof
(
*
pt
)
);
LPtoDP
(
dev
->
hdc
,
points
,
total
);
if
(
!
(
interior
=
CreatePolyPolygonRgn
(
points
,
counts
,
polygons
,
GetPolyFillMode
(
dev
->
hdc
))))
{
HeapFree
(
GetProcessHeap
(),
0
,
points
);
return
FALSE
;
}
if
(
pdev
->
clip
)
CombineRgn
(
interior
,
interior
,
pdev
->
clip
,
RGN_AND
);
/* if not using a region, paint the interior first so the outline can overlap it */
if
(
!
pdev
->
pen_uses_region
||
!
(
outline
=
CreateRectRgn
(
0
,
0
,
0
,
0
)))
ret
=
brush_rect
(
pdev
,
NULL
,
interior
,
rop
);
for
(
i
=
pos
=
0
;
i
<
polygons
;
i
++
)
{
reset_dash_origin
(
pdev
);
pdev
->
pen_lines
(
pdev
,
counts
[
i
],
points
+
pos
,
TRUE
,
outline
);
pos
+=
counts
[
i
];
}
if
(
outline
)
{
if
(
pdev
->
clip
)
CombineRgn
(
outline
,
outline
,
pdev
->
clip
,
RGN_AND
);
CombineRgn
(
interior
,
interior
,
outline
,
RGN_DIFF
);
ret
=
pen_rect
(
pdev
,
NULL
,
outline
,
rop
)
&&
brush_rect
(
pdev
,
NULL
,
interior
,
rop
);
DeleteObject
(
outline
);
}
DeleteObject
(
interior
);
HeapFree
(
GetProcessHeap
(),
0
,
points
);
return
ret
;
}
/***********************************************************************
* dibdrv_PolyPolyline
*/
BOOL
dibdrv_PolyPolyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
const
DWORD
*
counts
,
DWORD
polylines
)
...
...
@@ -571,6 +629,16 @@ BOOL dibdrv_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWO
}
/***********************************************************************
* dibdrv_Polygon
*/
BOOL
dibdrv_Polygon
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
{
INT
counts
[
1
]
=
{
count
};
return
dibdrv_PolyPolygon
(
dev
,
pt
,
counts
,
1
);
}
/***********************************************************************
* dibdrv_Polyline
*/
BOOL
dibdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pt
,
INT
count
)
...
...
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