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
9f25eb35
Commit
9f25eb35
authored
Dec 03, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipGetPenFillType.
parent
74acbf9c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
1 deletion
+95
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
pen.c
dlls/gdiplus/pen.c
+30
-0
pen.c
dlls/gdiplus/tests/pen.c
+51
-0
gdiplusenums.h
include/gdiplusenums.h
+11
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
9f25eb35
...
@@ -360,7 +360,7 @@
...
@@ -360,7 +360,7 @@
@ stdcall GdipGetPenDashOffset(ptr ptr)
@ stdcall GdipGetPenDashOffset(ptr ptr)
@ stdcall GdipGetPenDashStyle(ptr ptr)
@ stdcall GdipGetPenDashStyle(ptr ptr)
@ stdcall GdipGetPenEndCap(ptr ptr)
@ stdcall GdipGetPenEndCap(ptr ptr)
@ st
ub GdipGetPenFillType
@ st
dcall GdipGetPenFillType(ptr ptr)
@ stdcall GdipGetPenLineJoin(ptr ptr)
@ stdcall GdipGetPenLineJoin(ptr ptr)
@ stdcall GdipGetPenMiterLimit(ptr ptr)
@ stdcall GdipGetPenMiterLimit(ptr ptr)
@ stdcall GdipGetPenMode(ptr ptr)
@ stdcall GdipGetPenMode(ptr ptr)
...
...
dlls/gdiplus/pen.c
View file @
9f25eb35
...
@@ -67,6 +67,24 @@ static DWORD gdip_to_gdi_join(GpLineJoin join)
...
@@ -67,6 +67,24 @@ static DWORD gdip_to_gdi_join(GpLineJoin join)
}
}
}
}
static
GpPenType
bt_to_pt
(
GpBrushType
bt
)
{
switch
(
bt
){
case
BrushTypeSolidColor
:
return
PenTypeSolidColor
;
case
BrushTypeHatchFill
:
return
PenTypeHatchFill
;
case
BrushTypeTextureFill
:
return
PenTypeTextureFill
;
case
BrushTypePathGradient
:
return
PenTypePathGradient
;
case
BrushTypeLinearGradient
:
return
PenTypeLinearGradient
;
default:
return
PenTypeUnknown
;
}
}
GpStatus
WINGDIPAPI
GdipClonePen
(
GpPen
*
pen
,
GpPen
**
clonepen
)
GpStatus
WINGDIPAPI
GdipClonePen
(
GpPen
*
pen
,
GpPen
**
clonepen
)
{
{
TRACE
(
"(%p, %p)
\n
"
,
pen
,
clonepen
);
TRACE
(
"(%p, %p)
\n
"
,
pen
,
clonepen
);
...
@@ -283,6 +301,18 @@ GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap)
...
@@ -283,6 +301,18 @@ GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap)
return
Ok
;
return
Ok
;
}
}
GpStatus
WINGDIPAPI
GdipGetPenFillType
(
GpPen
*
pen
,
GpPenType
*
type
)
{
TRACE
(
"(%p, %p)
\n
"
,
pen
,
type
);
if
(
!
pen
||
!
type
)
return
InvalidParameter
;
*
type
=
bt_to_pt
(
pen
->
brush
->
bt
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPenLineJoin
(
GpPen
*
pen
,
GpLineJoin
*
lineJoin
)
GpStatus
WINGDIPAPI
GdipGetPenLineJoin
(
GpPen
*
pen
,
GpLineJoin
*
lineJoin
)
{
{
TRACE
(
"(%p, %p)
\n
"
,
pen
,
lineJoin
);
TRACE
(
"(%p, %p)
\n
"
,
pen
,
lineJoin
);
...
...
dlls/gdiplus/tests/pen.c
View file @
9f25eb35
...
@@ -275,6 +275,56 @@ static void test_customcap(void)
...
@@ -275,6 +275,56 @@ static void test_customcap(void)
GdipDeletePen
(
pen
);
GdipDeletePen
(
pen
);
}
}
static
void
test_penfilltype
(
void
)
{
GpPen
*
pen
;
GpSolidFill
*
solid
;
GpLineGradient
*
line
;
GpPointF
a
,
b
;
GpStatus
status
;
GpPenType
type
;
/* NULL */
status
=
GdipGetPenFillType
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipCreatePen1
((
ARGB
)
0xffff00ff
,
10
.
0
f
,
UnitPixel
,
&
pen
);
expect
(
Ok
,
status
);
status
=
GdipGetPenFillType
(
pen
,
NULL
);
expect
(
InvalidParameter
,
status
);
/* created with GdipCreatePen1() */
status
=
GdipGetPenFillType
(
pen
,
&
type
);
expect
(
Ok
,
status
);
expect
(
PenTypeSolidColor
,
type
);
GdipDeletePen
(
pen
);
/* based on SolidBrush */
status
=
GdipCreateSolidFill
((
ARGB
)
0xffff00ff
,
&
solid
);
expect
(
Ok
,
status
);
status
=
GdipCreatePen2
((
GpBrush
*
)
solid
,
10
.
0
f
,
UnitPixel
,
&
pen
);
expect
(
Ok
,
status
);
status
=
GdipGetPenFillType
(
pen
,
&
type
);
expect
(
Ok
,
status
);
expect
(
PenTypeSolidColor
,
type
);
GdipDeletePen
(
pen
);
GdipDeleteBrush
((
GpBrush
*
)
solid
);
/* based on LinearGradientBrush */
a
.
X
=
a
.
Y
=
0
.
0
;
b
.
X
=
b
.
Y
=
10
.
0
;
status
=
GdipCreateLineBrush
(
&
a
,
&
b
,
(
ARGB
)
0xffff00ff
,
(
ARGB
)
0xffff0000
,
WrapModeTile
,
&
line
);
expect
(
Ok
,
status
);
status
=
GdipCreatePen2
((
GpBrush
*
)
line
,
10
.
0
f
,
UnitPixel
,
&
pen
);
expect
(
Ok
,
status
);
status
=
GdipGetPenFillType
(
pen
,
&
type
);
expect
(
Ok
,
status
);
expect
(
PenTypeLinearGradient
,
type
);
GdipDeletePen
(
pen
);
GdipDeleteBrush
((
GpBrush
*
)
line
);
}
START_TEST
(
pen
)
START_TEST
(
pen
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -294,6 +344,7 @@ START_TEST(pen)
...
@@ -294,6 +344,7 @@ START_TEST(pen)
test_brushfill
();
test_brushfill
();
test_dasharray
();
test_dasharray
();
test_customcap
();
test_customcap
();
test_penfilltype
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
include/gdiplusenums.h
View file @
9f25eb35
...
@@ -76,6 +76,16 @@ enum PathPointType{
...
@@ -76,6 +76,16 @@ enum PathPointType{
PathPointTypeBezier3
=
3
PathPointTypeBezier3
=
3
};
};
enum
PenType
{
PenTypeSolidColor
=
BrushTypeSolidColor
,
PenTypeHatchFill
=
BrushTypeHatchFill
,
PenTypeTextureFill
=
BrushTypeTextureFill
,
PenTypePathGradient
=
BrushTypePathGradient
,
PenTypeLinearGradient
=
BrushTypeLinearGradient
,
PenTypeUnknown
=
-
1
};
enum
LineJoin
enum
LineJoin
{
{
LineJoinMiter
=
0
,
LineJoinMiter
=
0
,
...
@@ -384,6 +394,7 @@ typedef enum FlushIntention FlushIntention;
...
@@ -384,6 +394,7 @@ typedef enum FlushIntention FlushIntention;
typedef
enum
CoordinateSpace
CoordinateSpace
;
typedef
enum
CoordinateSpace
CoordinateSpace
;
typedef
enum
GpTestControlEnum
GpTestControlEnum
;
typedef
enum
GpTestControlEnum
GpTestControlEnum
;
typedef
enum
MetafileFrameUnit
MetafileFrameUnit
;
typedef
enum
MetafileFrameUnit
MetafileFrameUnit
;
typedef
enum
PenType
PenType
;
#endif
/* end of c typedefs */
#endif
/* end of c typedefs */
...
...
include/gdiplusflat.h
View file @
9f25eb35
...
@@ -487,6 +487,7 @@ GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen*,GpDashCap);
...
@@ -487,6 +487,7 @@ GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen*,GpDashCap);
GpStatus
WINGDIPAPI
GdipSetPenDashOffset
(
GpPen
*
,
REAL
);
GpStatus
WINGDIPAPI
GdipSetPenDashOffset
(
GpPen
*
,
REAL
);
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
,
GpDashStyle
);
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
,
GpDashStyle
);
GpStatus
WINGDIPAPI
GdipSetPenEndCap
(
GpPen
*
,
GpLineCap
);
GpStatus
WINGDIPAPI
GdipSetPenEndCap
(
GpPen
*
,
GpLineCap
);
GpStatus
WINGDIPAPI
GdipGetPenFillType
(
GpPen
*
,
GpPenType
*
);
GpStatus
WINGDIPAPI
GdipSetPenLineCap197819
(
GpPen
*
,
GpLineCap
,
GpLineCap
,
GpDashCap
);
GpStatus
WINGDIPAPI
GdipSetPenLineCap197819
(
GpPen
*
,
GpLineCap
,
GpLineCap
,
GpDashCap
);
GpStatus
WINGDIPAPI
GdipSetPenLineJoin
(
GpPen
*
,
GpLineJoin
);
GpStatus
WINGDIPAPI
GdipSetPenLineJoin
(
GpPen
*
,
GpLineJoin
);
GpStatus
WINGDIPAPI
GdipSetPenMode
(
GpPen
*
,
GpPenAlignment
);
GpStatus
WINGDIPAPI
GdipSetPenMode
(
GpPen
*
,
GpPenAlignment
);
...
...
include/gdiplusgpstubs.h
View file @
9f25eb35
...
@@ -90,5 +90,6 @@ typedef WrapMode GpWrapMode;
...
@@ -90,5 +90,6 @@ typedef WrapMode GpWrapMode;
typedef
Color
GpColor
;
typedef
Color
GpColor
;
typedef
FlushIntention
GpFlushIntention
;
typedef
FlushIntention
GpFlushIntention
;
typedef
CoordinateSpace
GpCoordinateSpace
;
typedef
CoordinateSpace
GpCoordinateSpace
;
typedef
PenType
GpPenType
;
#endif
#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