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
8b2ce0f9
Commit
8b2ce0f9
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 GdipSetSolidFillColor/GdipGetSolidFillColor.
parent
777d661f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
brush.c
dlls/gdiplus/brush.c
+19
-5
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
pen.c
dlls/gdiplus/tests/pen.c
+0
-1
No files found.
dlls/gdiplus/brush.c
View file @
8b2ce0f9
...
...
@@ -26,12 +26,18 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
if
(
!
brush
||
!
clone
)
return
InvalidParameter
;
*
clone
=
GdipAlloc
(
sizeof
(
GpBrush
));
switch
(
brush
->
bt
){
case
BrushTypeSolidColor
:
*
clone
=
GdipAlloc
(
sizeof
(
GpSolidFill
));
if
(
!*
clone
)
return
OutOfMemory
;
memcpy
(
*
clone
,
brush
,
sizeof
(
GpBrush
));
memcpy
(
*
clone
,
brush
,
sizeof
(
GpSolidFill
));
(
*
clone
)
->
gdibrush
=
CreateBrushIndirect
(
&
(
*
clone
)
->
lb
);
break
;
default:
return
NotImplemented
;
}
return
Ok
;
}
...
...
@@ -51,7 +57,7 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
(
*
sf
)
->
brush
.
gdibrush
=
CreateSolidBrush
(
col
);
(
*
sf
)
->
brush
.
bt
=
BrushTypeSolidColor
;
(
*
sf
)
->
brush
.
color
=
col
;
(
*
sf
)
->
color
=
color
;
return
Ok
;
}
...
...
@@ -80,7 +86,9 @@ GpStatus WINGDIPAPI GdipGetSolidFillColor(GpSolidFill *sf, ARGB *argb)
if
(
!
sf
||
!
argb
)
return
InvalidParameter
;
return
NotImplemented
;
*
argb
=
sf
->
color
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetSolidFillColor
(
GpSolidFill
*
sf
,
ARGB
argb
)
...
...
@@ -88,5 +96,11 @@ GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill *sf, ARGB argb)
if
(
!
sf
)
return
InvalidParameter
;
return
NotImplemented
;
sf
->
color
=
argb
;
sf
->
brush
.
lb
.
lbColor
=
ARGB2COLORREF
(
argb
);
DeleteObject
(
sf
->
brush
.
gdibrush
);
sf
->
brush
.
gdibrush
=
CreateSolidBrush
(
sf
->
brush
.
lb
.
lbColor
);
return
Ok
;
}
dlls/gdiplus/gdiplus_private.h
View file @
8b2ce0f9
...
...
@@ -71,12 +71,12 @@ struct GpGraphics{
struct
GpBrush
{
HBRUSH
gdibrush
;
GpBrushType
bt
;
COLORREF
color
;
LOGBRUSH
lb
;
};
struct
GpSolidFill
{
GpBrush
brush
;
ARGB
color
;
};
struct
GpPath
{
...
...
dlls/gdiplus/tests/pen.c
View file @
8b2ce0f9
...
...
@@ -107,7 +107,6 @@ static void test_brushfill(void)
GdipGetPenBrushFill
(
pen
,
&
brush2
);
ok
(
brush
!=
brush2
,
"Expected to get a clone, not a copy of the reference
\n
"
);
GdipGetSolidFillColor
((
GpSolidFill
*
)
brush2
,
&
color
);
todo_wine
expect
(
0xabaddeed
,
color
);
GdipDeleteBrush
(
brush
);
GdipDeleteBrush
(
brush2
);
...
...
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