Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
74dc990b
Commit
74dc990b
authored
Jul 23, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipGetPathGradientRect with test.
parent
ff870e01
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
2 deletions
+80
-2
brush.c
dlls/gdiplus/brush.c
+45
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
brush.c
dlls/gdiplus/tests/brush.c
+31
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/brush.c
View file @
74dc990b
...
...
@@ -641,6 +641,51 @@ GpStatus WINGDIPAPI GdipGetPathGradientPointCount(GpPathGradient *grad,
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPathGradientRect
(
GpPathGradient
*
brush
,
GpRectF
*
rect
)
{
GpRectF
r
;
GpPath
*
path
;
GpStatus
stat
;
if
(
!
brush
||
!
rect
)
return
InvalidParameter
;
stat
=
GdipCreatePath2
(
brush
->
pathdata
.
Points
,
brush
->
pathdata
.
Types
,
brush
->
pathdata
.
Count
,
FillModeAlternate
,
&
path
);
if
(
stat
!=
Ok
)
return
stat
;
stat
=
GdipGetPathWorldBounds
(
path
,
&
r
,
NULL
,
NULL
);
if
(
stat
!=
Ok
){
GdipDeletePath
(
path
);
return
stat
;
}
memcpy
(
rect
,
&
r
,
sizeof
(
GpRectF
));
GdipDeletePath
(
path
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPathGradientRectI
(
GpPathGradient
*
brush
,
GpRect
*
rect
)
{
GpRectF
rectf
;
GpStatus
stat
;
if
(
!
brush
||
!
rect
)
return
InvalidParameter
;
stat
=
GdipGetPathGradientRect
(
brush
,
&
rectf
);
if
(
stat
!=
Ok
)
return
stat
;
rect
->
X
=
roundr
(
rectf
.
X
);
rect
->
Y
=
roundr
(
rectf
.
Y
);
rect
->
Width
=
roundr
(
rectf
.
Width
);
rect
->
Height
=
roundr
(
rectf
.
Height
);
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPathGradientSurroundColorsWithCount
(
GpPathGradient
*
grad
,
ARGB
*
argb
,
INT
*
count
)
{
...
...
dlls/gdiplus/gdiplus.spec
View file @
74dc990b
...
...
@@ -336,8 +336,8 @@
@ stdcall GdipGetPathGradientPointCount(ptr ptr)
@ stub GdipGetPathGradientPresetBlend
@ stub GdipGetPathGradientPresetBlendCount
@ st
ub GdipGetPathGradientRect
@ st
ub GdipGetPathGradientRectI
@ st
dcall GdipGetPathGradientRect(ptr ptr)
@ st
dcall GdipGetPathGradientRectI(ptr ptr)
@ stub GdipGetPathGradientSurroundColorCount
@ stdcall GdipGetPathGradientSurroundColorsWithCount(ptr ptr ptr)
@ stub GdipGetPathGradientTransform
...
...
dlls/gdiplus/tests/brush.c
View file @
74dc990b
...
...
@@ -115,6 +115,36 @@ static void test_getblend(void)
GdipDeleteBrush
((
GpBrush
*
)
brush
);
}
static
GpPointF
getbounds_ptf
[]
=
{{
0
.
0
,
20
.
0
},
{
50
.
0
,
50
.
0
},
{
21
.
0
,
25
.
0
},
{
25
.
0
,
46
.
0
}};
static
void
test_getbounds
(
void
)
{
GpStatus
status
;
GpPathGradient
*
brush
;
GpRectF
bounds
;
status
=
GdipCreatePathGradient
(
getbounds_ptf
,
4
,
WrapModeClamp
,
&
brush
);
expect
(
Ok
,
status
);
status
=
GdipGetPathGradientRect
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPathGradientRect
(
brush
,
NULL
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPathGradientRect
(
NULL
,
&
bounds
);
expect
(
InvalidParameter
,
status
);
status
=
GdipGetPathGradientRect
(
brush
,
&
bounds
);
expect
(
Ok
,
status
);
expectf
(
0
.
0
,
bounds
.
X
);
expectf
(
20
.
0
,
bounds
.
Y
);
expectf
(
50
.
0
,
bounds
.
Width
);
expectf
(
30
.
0
,
bounds
.
Height
);
GdipDeleteBrush
((
GpBrush
*
)
brush
);
}
START_TEST
(
brush
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -131,6 +161,7 @@ START_TEST(brush)
test_type
();
test_gradientblendcount
();
test_getblend
();
test_getbounds
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
74dc990b
...
...
@@ -207,6 +207,8 @@ GpStatus WINGDIPAPI GdipGetPathGradientCenterPointI(GpPathGradient*,GpPoint*);
GpStatus
WINGDIPAPI
GdipGetPathGradientFocusScales
(
GpPathGradient
*
,
REAL
*
,
REAL
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientGammaCorrection
(
GpPathGradient
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientPointCount
(
GpPathGradient
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientRect
(
GpPathGradient
*
,
GpRectF
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientRectI
(
GpPathGradient
*
,
GpRect
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientSurroundColorsWithCount
(
GpPathGradient
*
,
ARGB
*
,
INT
*
);
GpStatus
WINGDIPAPI
GdipGetPathGradientWrapMode
(
GpPathGradient
*
,
GpWrapMode
*
);
...
...
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