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
27124d5d
Commit
27124d5d
authored
Jul 23, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 24, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipSetPenColor.
parent
8b2ce0f9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
13 deletions
+24
-13
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+0
-1
graphics.c
dlls/gdiplus/graphics.c
+8
-8
pen.c
dlls/gdiplus/pen.c
+14
-1
pen.c
dlls/gdiplus/tests/pen.c
+0
-2
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
27124d5d
...
@@ -542,7 +542,7 @@
...
@@ -542,7 +542,7 @@
@ stub GdipSetPathGradientWrapMode
@ stub GdipSetPathGradientWrapMode
@ stub GdipSetPathMarker
@ stub GdipSetPathMarker
@ stdcall GdipSetPenBrushFill(ptr ptr)
@ stdcall GdipSetPenBrushFill(ptr ptr)
@ st
ub GdipSetPenColor
@ st
dcall GdipSetPenColor(ptr long)
@ stub GdipSetPenCompoundArray
@ stub GdipSetPenCompoundArray
@ stdcall GdipSetPenCustomEndCap(ptr ptr)
@ stdcall GdipSetPenCustomEndCap(ptr ptr)
@ stdcall GdipSetPenCustomStartCap(ptr ptr)
@ stdcall GdipSetPenCustomStartCap(ptr ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
27124d5d
...
@@ -44,7 +44,6 @@ static inline REAL deg2rad(REAL degrees)
...
@@ -44,7 +44,6 @@ static inline REAL deg2rad(REAL degrees)
struct
GpPen
{
struct
GpPen
{
UINT
style
;
UINT
style
;
COLORREF
color
;
GpUnit
unit
;
GpUnit
unit
;
REAL
width
;
REAL
width
;
HPEN
gdipen
;
HPEN
gdipen
;
...
...
dlls/gdiplus/graphics.c
View file @
27124d5d
...
@@ -394,9 +394,9 @@ static GpStatus draw_polyline(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -394,9 +394,9 @@ static GpStatus draw_polyline(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
&
ptcopy
[
0
].
X
,
&
ptcopy
[
0
].
Y
,
&
ptcopy
[
0
].
X
,
&
ptcopy
[
0
].
Y
,
pen
->
customend
->
inset
*
pen
->
width
);
pen
->
customend
->
inset
*
pen
->
width
);
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
pt
[
count
-
2
].
X
,
pt
[
count
-
2
].
Y
,
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
pt
[
count
-
2
].
X
,
pt
[
count
-
2
].
Y
,
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
pt
[
1
].
X
,
pt
[
1
].
Y
,
pt
[
0
].
X
,
pt
[
0
].
Y
);
pt
[
1
].
X
,
pt
[
1
].
Y
,
pt
[
0
].
X
,
pt
[
0
].
Y
);
}
}
...
@@ -512,12 +512,12 @@ static GpStatus draw_polybezier(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -512,12 +512,12 @@ static GpStatus draw_polybezier(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
/* the direction of the line cap is parallel to the direction at the
/* the direction of the line cap is parallel to the direction at the
* end of the bezier (which, if it has been shortened, is not the same
* end of the bezier (which, if it has been shortened, is not the same
* as the direction from pt[count-2] to pt[count-1]) */
* as the direction from pt[count-2] to pt[count-1]) */
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
pt
[
count
-
1
].
X
-
(
ptcopy
[
count
-
1
].
X
-
ptcopy
[
count
-
2
].
X
),
pt
[
count
-
1
].
X
-
(
ptcopy
[
count
-
1
].
X
-
ptcopy
[
count
-
2
].
X
),
pt
[
count
-
1
].
Y
-
(
ptcopy
[
count
-
1
].
Y
-
ptcopy
[
count
-
2
].
Y
),
pt
[
count
-
1
].
Y
-
(
ptcopy
[
count
-
1
].
Y
-
ptcopy
[
count
-
2
].
Y
),
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
pt
[
0
].
X
-
(
ptcopy
[
0
].
X
-
ptcopy
[
1
].
X
),
pt
[
0
].
X
-
(
ptcopy
[
0
].
X
-
ptcopy
[
1
].
X
),
pt
[
0
].
Y
-
(
ptcopy
[
0
].
Y
-
ptcopy
[
1
].
Y
),
pt
[
0
].
X
,
pt
[
0
].
Y
);
pt
[
0
].
Y
-
(
ptcopy
[
0
].
Y
-
ptcopy
[
1
].
Y
),
pt
[
0
].
X
,
pt
[
0
].
Y
);
}
}
...
@@ -588,7 +588,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -588,7 +588,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
MoveToEx
(
hdc
,
curpos
.
x
,
curpos
.
y
,
NULL
);
MoveToEx
(
hdc
,
curpos
.
x
,
curpos
.
y
,
NULL
);
}
}
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
pt
[
count
-
1
].
X
-
(
ptcopy
[
count
-
1
].
X
-
ptcopy
[
count
-
2
].
X
),
pt
[
count
-
1
].
X
-
(
ptcopy
[
count
-
1
].
X
-
ptcopy
[
count
-
2
].
X
),
pt
[
count
-
1
].
Y
-
(
ptcopy
[
count
-
1
].
Y
-
ptcopy
[
count
-
2
].
Y
),
pt
[
count
-
1
].
Y
-
(
ptcopy
[
count
-
1
].
Y
-
ptcopy
[
count
-
2
].
Y
),
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
...
@@ -604,7 +604,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -604,7 +604,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
&
ptcopy
[
count
-
1
].
X
,
&
ptcopy
[
count
-
1
].
Y
,
&
ptcopy
[
count
-
1
].
X
,
&
ptcopy
[
count
-
1
].
Y
,
pen
->
customend
->
inset
*
pen
->
width
);
pen
->
customend
->
inset
*
pen
->
width
);
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customend
,
pt
[
count
-
2
].
X
,
pt
[
count
-
2
].
Y
,
pt
[
count
-
1
].
X
,
pt
[
count
-
2
].
X
,
pt
[
count
-
2
].
Y
,
pt
[
count
-
1
].
X
,
pt
[
count
-
1
].
Y
);
pt
[
count
-
1
].
Y
);
...
@@ -632,7 +632,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -632,7 +632,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
MoveToEx
(
hdc
,
curpos
.
x
,
curpos
.
y
,
NULL
);
MoveToEx
(
hdc
,
curpos
.
x
,
curpos
.
y
,
NULL
);
}
}
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
startcap
,
pen
->
width
,
pen
->
customstart
,
pt
[
j
-
1
].
X
-
(
ptcopy
[
j
-
1
].
X
-
ptcopy
[
j
].
X
),
pt
[
j
-
1
].
X
-
(
ptcopy
[
j
-
1
].
X
-
ptcopy
[
j
].
X
),
pt
[
j
-
1
].
Y
-
(
ptcopy
[
j
-
1
].
Y
-
ptcopy
[
j
].
Y
),
pt
[
j
-
1
].
Y
-
(
ptcopy
[
j
-
1
].
Y
-
ptcopy
[
j
].
Y
),
pt
[
j
-
1
].
X
,
pt
[
j
-
1
].
Y
);
pt
[
j
-
1
].
X
,
pt
[
j
-
1
].
Y
);
...
@@ -648,7 +648,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
...
@@ -648,7 +648,7 @@ static GpStatus draw_poly(HDC hdc, GpPen *pen, GDIPCONST GpPointF * pt,
&
ptcopy
[
j
-
1
].
X
,
&
ptcopy
[
j
-
1
].
Y
,
&
ptcopy
[
j
-
1
].
X
,
&
ptcopy
[
j
-
1
].
Y
,
pen
->
customstart
->
inset
*
pen
->
width
);
pen
->
customstart
->
inset
*
pen
->
width
);
draw_cap
(
hdc
,
pen
->
c
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customstart
,
draw_cap
(
hdc
,
pen
->
brush
->
lb
.
lbC
olor
,
pen
->
endcap
,
pen
->
width
,
pen
->
customstart
,
pt
[
j
].
X
,
pt
[
j
].
Y
,
pt
[
j
-
1
].
X
,
pt
[
j
].
X
,
pt
[
j
].
Y
,
pt
[
j
-
1
].
X
,
pt
[
j
-
1
].
Y
);
pt
[
j
-
1
].
Y
);
...
...
dlls/gdiplus/pen.c
View file @
27124d5d
...
@@ -98,7 +98,6 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
...
@@ -98,7 +98,6 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
if
(
!
gp_pen
)
return
OutOfMemory
;
if
(
!
gp_pen
)
return
OutOfMemory
;
gp_pen
->
style
=
GP_DEFAULT_PENSTYLE
;
gp_pen
->
style
=
GP_DEFAULT_PENSTYLE
;
gp_pen
->
color
=
ARGB2COLORREF
(
color
);
gp_pen
->
width
=
width
;
gp_pen
->
width
=
width
;
gp_pen
->
unit
=
unit
;
gp_pen
->
unit
=
unit
;
gp_pen
->
endcap
=
LineCapFlat
;
gp_pen
->
endcap
=
LineCapFlat
;
...
@@ -147,7 +146,10 @@ GpStatus WINGDIPAPI GdipGetPenColor(GpPen *pen, ARGB *argb)
...
@@ -147,7 +146,10 @@ GpStatus WINGDIPAPI GdipGetPenColor(GpPen *pen, ARGB *argb)
if
(
!
pen
||
!
argb
)
if
(
!
pen
||
!
argb
)
return
InvalidParameter
;
return
InvalidParameter
;
if
(
pen
->
brush
->
bt
!=
BrushTypeSolidColor
)
return
NotImplemented
;
return
NotImplemented
;
return
GdipGetSolidFillColor
(((
GpSolidFill
*
)
pen
->
brush
),
argb
);
}
}
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
pen
,
GpDashStyle
*
dash
)
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
pen
,
GpDashStyle
*
dash
)
...
@@ -179,6 +181,17 @@ GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush)
...
@@ -179,6 +181,17 @@ GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush)
return
Ok
;
return
Ok
;
}
}
GpStatus
WINGDIPAPI
GdipSetPenColor
(
GpPen
*
pen
,
ARGB
argb
)
{
if
(
!
pen
)
return
InvalidParameter
;
if
(
pen
->
brush
->
bt
!=
BrushTypeSolidColor
)
return
NotImplemented
;
return
GdipSetSolidFillColor
(((
GpSolidFill
*
)
pen
->
brush
),
argb
);
}
GpStatus
WINGDIPAPI
GdipSetPenCustomEndCap
(
GpPen
*
pen
,
GpCustomLineCap
*
customCap
)
GpStatus
WINGDIPAPI
GdipSetPenCustomEndCap
(
GpPen
*
pen
,
GpCustomLineCap
*
customCap
)
{
{
GpCustomLineCap
*
cap
;
GpCustomLineCap
*
cap
;
...
...
dlls/gdiplus/tests/pen.c
View file @
27124d5d
...
@@ -87,7 +87,6 @@ static void test_brushfill(void)
...
@@ -87,7 +87,6 @@ static void test_brushfill(void)
GdipGetBrushType
(
brush
,
&
type
);
GdipGetBrushType
(
brush
,
&
type
);
expect
(
BrushTypeSolidColor
,
type
);
expect
(
BrushTypeSolidColor
,
type
);
GdipGetPenColor
(
pen
,
&
color
);
GdipGetPenColor
(
pen
,
&
color
);
todo_wine
expect
(
0xdeadbeef
,
color
);
expect
(
0xdeadbeef
,
color
);
GdipDeleteBrush
(
brush
);
GdipDeleteBrush
(
brush
);
...
@@ -96,7 +95,6 @@ static void test_brushfill(void)
...
@@ -96,7 +95,6 @@ static void test_brushfill(void)
status
=
GdipSetPenBrushFill
(
pen
,
brush
);
status
=
GdipSetPenBrushFill
(
pen
,
brush
);
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
GdipGetPenColor
(
pen
,
&
color
);
GdipGetPenColor
(
pen
,
&
color
);
todo_wine
expect
(
0xabaddeed
,
color
);
expect
(
0xabaddeed
,
color
);
GdipDeleteBrush
(
brush
);
GdipDeleteBrush
(
brush
);
color
=
0
;
color
=
0
;
...
...
include/gdiplusflat.h
View file @
27124d5d
...
@@ -34,6 +34,7 @@ GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**);
...
@@ -34,6 +34,7 @@ GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen*,GpBrush**);
GpStatus
WINGDIPAPI
GdipGetPenColor
(
GpPen
*
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipGetPenColor
(
GpPen
*
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
,
GpDashStyle
*
);
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
,
GpDashStyle
*
);
GpStatus
WINGDIPAPI
GdipSetPenBrushFill
(
GpPen
*
,
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipSetPenBrushFill
(
GpPen
*
,
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipSetPenColor
(
GpPen
*
,
ARGB
);
GpStatus
WINGDIPAPI
GdipSetPenCustomEndCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenCustomEndCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenCustomStartCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenCustomStartCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
,
GpDashStyle
);
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
,
GpDashStyle
);
...
...
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