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
8c5bcef9
Commit
8c5bcef9
authored
Jul 20, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added rendering of fill-path type custom line caps.
parent
1cec4e3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
customlinecap.c
dlls/gdiplus/customlinecap.c
+7
-0
graphics.c
dlls/gdiplus/graphics.c
+12
-8
No files found.
dlls/gdiplus/customlinecap.c
View file @
8c5bcef9
...
...
@@ -23,6 +23,9 @@
#include "gdiplus.h"
#include "gdiplus_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
gdiplus
);
GpStatus
WINGDIPAPI
GdipCloneCustomLineCap
(
GpCustomLineCap
*
from
,
GpCustomLineCap
**
to
)
...
...
@@ -52,11 +55,15 @@ GpStatus WINGDIPAPI GdipCloneCustomLineCap(GpCustomLineCap* from,
return
Ok
;
}
/* FIXME: Sometimes when fillPath is non-null and stroke path is null, the native
* version of this function returns NotImplemented. I cannot figure out why. */
GpStatus
WINGDIPAPI
GdipCreateCustomLineCap
(
GpPath
*
fillPath
,
GpPath
*
strokePath
,
GpLineCap
baseCap
,
REAL
baseInset
,
GpCustomLineCap
**
customCap
)
{
GpPathData
*
pathdata
;
TRACE
(
"%p %p %d %f %p
\n
"
,
fillPath
,
strokePath
,
baseCap
,
baseInset
,
customCap
);
if
(
!
customCap
||
!
(
fillPath
||
strokePath
))
return
InvalidParameter
;
...
...
dlls/gdiplus/graphics.c
View file @
8c5bcef9
...
...
@@ -130,7 +130,8 @@ static void calc_curve_bezier_endp(REAL xend, REAL yend, REAL xadj, REAL yadj,
}
/* Draws the linecap the specified color and size on the hdc. The linecap is in
* direction of the line from x1, y1 to x2, y2 and is anchored on x2, y2. */
* direction of the line from x1, y1 to x2, y2 and is anchored on x2, y2. Probably
* should not be called on an hdc that has a path you care about. */
static
void
draw_cap
(
HDC
hdc
,
COLORREF
color
,
GpLineCap
cap
,
REAL
size
,
const
GpCustomLineCap
*
custom
,
REAL
x1
,
REAL
y1
,
REAL
x2
,
REAL
y2
)
{
...
...
@@ -158,7 +159,8 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
lb
.
lbColor
=
color
;
lb
.
lbHatch
=
0
;
pen
=
ExtCreatePen
(
PS_GEOMETRIC
|
PS_SOLID
|
PS_ENDCAP_FLAT
,
(
cap
==
LineCapCustom
?
size
:
1
),
&
lb
,
0
,
NULL
);
((
cap
==
LineCapCustom
)
&&
custom
&&
(
custom
->
fill
))
?
size
:
1
,
&
lb
,
0
,
NULL
);
oldbrush
=
SelectObject
(
hdc
,
brush
);
oldpen
=
SelectObject
(
hdc
,
pen
);
...
...
@@ -267,11 +269,6 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
if
(
!
custom
)
break
;
if
(
custom
->
fill
){
FIXME
(
"fill-path custom line caps not implemented
\n
"
);
break
;
}
count
=
custom
->
pathdata
.
Count
;
custptf
=
GdipAlloc
(
count
*
sizeof
(
PointF
));
custpt
=
GdipAlloc
(
count
*
sizeof
(
POINT
));
...
...
@@ -294,7 +291,14 @@ static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size,
tp
[
i
]
=
convert_path_point_type
(
custom
->
pathdata
.
Types
[
i
]);
}
PolyDraw
(
hdc
,
custpt
,
tp
,
count
);
if
(
custom
->
fill
){
BeginPath
(
hdc
);
PolyDraw
(
hdc
,
custpt
,
tp
,
count
);
EndPath
(
hdc
);
StrokeAndFillPath
(
hdc
);
}
else
PolyDraw
(
hdc
,
custpt
,
tp
,
count
);
custend:
GdipFree
(
custptf
);
...
...
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