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
bcd0eda6
Commit
bcd0eda6
authored
Jul 12, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipSetPenLineJoin.
parent
929be934
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
0 deletions
+53
-0
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+2
-0
pen.c
dlls/gdiplus/pen.c
+40
-0
gdiplusenums.h
include/gdiplusenums.h
+9
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+1
-0
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
bcd0eda6
...
...
@@ -47,6 +47,8 @@ struct GpPen{
REAL
width
;
HPEN
gdipen
;
GpLineCap
endcap
;
GpLineJoin
join
;
REAL
miterlimit
;
};
struct
GpGraphics
{
...
...
dlls/gdiplus/pen.c
View file @
bcd0eda6
...
...
@@ -27,6 +27,22 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
gdiplus
);
static
DWORD
gdip_to_gdi_join
(
GpLineJoin
join
)
{
switch
(
join
){
case
LineJoinRound
:
return
PS_JOIN_ROUND
;
case
LineJoinBevel
:
return
PS_JOIN_BEVEL
;
case
LineJoinMiter
:
case
LineJoinMiterClipped
:
return
PS_JOIN_MITER
;
default:
ERR
(
"Not a member of GpLineJoin enumeration
\n
"
);
return
0
;
}
}
GpStatus
WINGDIPAPI
GdipCreatePen1
(
ARGB
color
,
FLOAT
width
,
GpUnit
unit
,
GpPen
**
pen
)
{
...
...
@@ -44,6 +60,8 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
gp_pen
->
width
=
width
;
gp_pen
->
unit
=
unit
;
gp_pen
->
endcap
=
LineCapFlat
;
gp_pen
->
join
=
LineJoinMiter
;
gp_pen
->
miterlimit
=
10
.
0
;
/* FIXME: Currently only solid lines supported. */
lb
.
lbStyle
=
BS_SOLID
;
...
...
@@ -81,3 +99,25 @@ GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
return
Ok
;
}
/* FIXME: Miter line joins behave a bit differently than they do in windows.
* Both kinds of miter joins clip if the angle is less than 11 degrees. */
GpStatus
WINGDIPAPI
GdipSetPenLineJoin
(
GpPen
*
pen
,
GpLineJoin
join
)
{
LOGBRUSH
lb
;
if
(
!
pen
)
return
InvalidParameter
;
DeleteObject
(
pen
->
gdipen
);
pen
->
join
=
join
;
pen
->
style
&=
~
(
PS_JOIN_ROUND
|
PS_JOIN_BEVEL
|
PS_JOIN_MITER
);
pen
->
style
|=
gdip_to_gdi_join
(
join
);
lb
.
lbStyle
=
BS_SOLID
;
lb
.
lbColor
=
pen
->
color
;
lb
.
lbHatch
=
0
;
pen
->
gdipen
=
ExtCreatePen
(
pen
->
style
,
(
INT
)
pen
->
width
,
&
lb
,
0
,
NULL
);
return
Ok
;
}
include/gdiplusenums.h
View file @
bcd0eda6
...
...
@@ -73,6 +73,14 @@ enum PathPointType{
PathPointTypeBezier3
=
3
};
enum
LineJoin
{
LineJoinMiter
=
0
,
LineJoinBevel
=
1
,
LineJoinRound
=
2
,
LineJoinMiterClipped
=
3
};
#ifndef __cplusplus
typedef
enum
Unit
Unit
;
...
...
@@ -80,6 +88,7 @@ typedef enum BrushType BrushType;
typedef
enum
FillMode
FillMode
;
typedef
enum
LineCap
LineCap
;
typedef
enum
PathPointType
PathPointType
;
typedef
enum
LineJoin
LineJoin
;
#endif
/* end of c typedefs */
...
...
include/gdiplusflat.h
View file @
bcd0eda6
...
...
@@ -30,6 +30,7 @@ extern "C" {
GpStatus
WINGDIPAPI
GdipCreatePen1
(
ARGB
,
REAL
,
GpUnit
,
GpPen
**
);
GpStatus
WINGDIPAPI
GdipDeletePen
(
GpPen
*
);
GpStatus
WINGDIPAPI
GdipSetPenEndCap
(
GpPen
*
,
GpLineCap
);
GpStatus
WINGDIPAPI
GdipSetPenLineJoin
(
GpPen
*
,
GpLineJoin
);
GpStatus
WINGDIPAPI
GdipCreateFromHDC
(
HDC
,
GpGraphics
**
);
GpStatus
WINGDIPAPI
GdipCreateFromHWND
(
HWND
,
GpGraphics
**
);
...
...
include/gdiplusgpstubs.h
View file @
bcd0eda6
...
...
@@ -47,5 +47,6 @@ typedef FillMode GpFillMode;
typedef
PathData
GpPathData
;
typedef
LineCap
GpLineCap
;
typedef
RectF
GpRectF
;
typedef
LineJoin
GpLineJoin
;
#endif
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