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
c9c568dd
Commit
c9c568dd
authored
Oct 31, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Stroke and fill GDI paths using Postscript paths.
parent
da3511fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
3 deletions
+77
-3
graphics.c
dlls/wineps.drv/graphics.c
+71
-0
init.c
dlls/wineps.drv/init.c
+3
-3
psdrv.h
dlls/wineps.drv/psdrv.h
+3
-0
No files found.
dlls/wineps.drv/graphics.c
View file @
c9c568dd
...
@@ -525,3 +525,74 @@ BOOL PSDRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
...
@@ -525,3 +525,74 @@ BOOL PSDRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
HeapFree
(
GetProcessHeap
(),
0
,
rgndata
);
return
TRUE
;
return
TRUE
;
}
}
static
BOOL
paint_path
(
PHYSDEV
dev
,
BOOL
stroke
,
BOOL
fill
)
{
POINT
*
points
;
BYTE
*
types
;
BOOL
ret
=
FALSE
;
int
i
,
size
=
GetPath
(
dev
->
hdc
,
NULL
,
NULL
,
0
);
if
(
size
==
-
1
)
return
FALSE
;
if
(
!
size
)
return
TRUE
;
points
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
points
)
);
types
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
types
)
);
if
(
!
points
||
!
types
)
goto
done
;
if
(
GetPath
(
dev
->
hdc
,
points
,
types
,
size
)
==
-
1
)
goto
done
;
if
(
fill
)
PSDRV_SetPen
(
dev
);
PSDRV_SetClip
(
dev
);
for
(
i
=
0
;
i
<
size
;
i
++
)
{
switch
(
types
[
i
]
&
~
PT_CLOSEFIGURE
)
{
case
PT_MOVETO
:
PSDRV_WriteMoveTo
(
dev
,
points
[
i
].
x
,
points
[
i
].
y
);
break
;
case
PT_LINETO
:
case
PT_LINETO
|
PT_CLOSEFIGURE
:
PSDRV_WriteLineTo
(
dev
,
points
[
i
].
x
,
points
[
i
].
y
);
if
(
types
[
i
]
&
PT_CLOSEFIGURE
)
PSDRV_WriteClosePath
(
dev
);
break
;
case
PT_BEZIERTO
:
case
PT_BEZIERTO
|
PT_CLOSEFIGURE
:
PSDRV_WriteCurveTo
(
dev
,
points
+
i
);
if
(
types
[
i
]
&
PT_CLOSEFIGURE
)
PSDRV_WriteClosePath
(
dev
);
i
+=
2
;
break
;
}
}
if
(
fill
)
PSDRV_Brush
(
dev
,
GetPolyFillMode
(
dev
->
hdc
)
==
ALTERNATE
);
if
(
stroke
)
PSDRV_DrawLine
(
dev
);
else
PSDRV_WriteNewPath
(
dev
);
PSDRV_ResetClip
(
dev
);
done:
HeapFree
(
GetProcessHeap
(),
0
,
points
);
HeapFree
(
GetProcessHeap
(),
0
,
types
);
return
ret
;
}
/***********************************************************************
* PSDRV_FillPath
*/
BOOL
PSDRV_FillPath
(
PHYSDEV
dev
)
{
return
paint_path
(
dev
,
FALSE
,
TRUE
);
}
/***********************************************************************
* PSDRV_StrokeAndFillPath
*/
BOOL
PSDRV_StrokeAndFillPath
(
PHYSDEV
dev
)
{
return
paint_path
(
dev
,
TRUE
,
TRUE
);
}
/***********************************************************************
* PSDRV_StrokePath
*/
BOOL
PSDRV_StrokePath
(
PHYSDEV
dev
)
{
return
paint_path
(
dev
,
TRUE
,
FALSE
);
}
dlls/wineps.drv/init.c
View file @
c9c568dd
...
@@ -850,7 +850,7 @@ static const struct gdi_dc_funcs psdrv_funcs =
...
@@ -850,7 +850,7 @@ static const struct gdi_dc_funcs psdrv_funcs =
NULL
,
/* pExtFloodFill */
NULL
,
/* pExtFloodFill */
NULL
,
/* pExtSelectClipRgn */
NULL
,
/* pExtSelectClipRgn */
PSDRV_ExtTextOut
,
/* pExtTextOut */
PSDRV_ExtTextOut
,
/* pExtTextOut */
NULL
,
/* pFillPath */
PSDRV_FillPath
,
/* pFillPath */
NULL
,
/* pFillRgn */
NULL
,
/* pFillRgn */
NULL
,
/* pFlattenPath */
NULL
,
/* pFlattenPath */
NULL
,
/* pFontIsLinked */
NULL
,
/* pFontIsLinked */
...
@@ -945,8 +945,8 @@ static const struct gdi_dc_funcs psdrv_funcs =
...
@@ -945,8 +945,8 @@ static const struct gdi_dc_funcs psdrv_funcs =
PSDRV_StartPage
,
/* pStartPage */
PSDRV_StartPage
,
/* pStartPage */
NULL
,
/* pStretchBlt */
NULL
,
/* pStretchBlt */
NULL
,
/* pStretchDIBits */
NULL
,
/* pStretchDIBits */
NULL
,
/* pStrokeAndFillPath */
PSDRV_StrokeAndFillPath
,
/* pStrokeAndFillPath */
NULL
,
/* pStrokePath */
PSDRV_StrokePath
,
/* pStrokePath */
NULL
,
/* pSwapBuffers */
NULL
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
NULL
,
/* pWidenPath */
...
...
dlls/wineps.drv/psdrv.h
View file @
c9c568dd
...
@@ -433,6 +433,7 @@ extern INT PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_da
...
@@ -433,6 +433,7 @@ extern INT PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_da
INT
cbOutput
,
LPVOID
out_data
)
DECLSPEC_HIDDEN
;
INT
cbOutput
,
LPVOID
out_data
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
extern
BOOL
PSDRV_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
DECLSPEC_HIDDEN
;
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_FillPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetCharWidth
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetCharWidth
(
PHYSDEV
dev
,
UINT
firstChar
,
UINT
lastChar
,
LPINT
buffer
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
extern
BOOL
PSDRV_GetTextExtentExPoint
(
PHYSDEV
dev
,
LPCWSTR
str
,
INT
count
,
INT
maxExt
,
LPINT
lpnFit
,
LPINT
alpDx
,
LPSIZE
size
)
DECLSPEC_HIDDEN
;
INT
maxExt
,
LPINT
lpnFit
,
LPINT
alpDx
,
LPSIZE
size
)
DECLSPEC_HIDDEN
;
...
@@ -464,6 +465,8 @@ extern COLORREF PSDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDD
...
@@ -464,6 +465,8 @@ extern COLORREF PSDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDD
extern
COLORREF
PSDRV_SetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
PSDRV_SetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
PSDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
PSDRV_SetTextColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
INT
PSDRV_StartDoc
(
PHYSDEV
dev
,
const
DOCINFOW
*
doc
)
DECLSPEC_HIDDEN
;
extern
INT
PSDRV_StartDoc
(
PHYSDEV
dev
,
const
DOCINFOW
*
doc
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_StrokeAndFillPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_StrokePath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODEA
*
dm1
,
PSDRV_DEVMODEA
*
dm2
,
extern
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODEA
*
dm1
,
PSDRV_DEVMODEA
*
dm2
,
PRINTERINFO
*
pi
)
DECLSPEC_HIDDEN
;
PRINTERINFO
*
pi
)
DECLSPEC_HIDDEN
;
...
...
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