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
52bf030b
Commit
52bf030b
authored
Mar 31, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipGetPathGradientTransform.
parent
aed62dbf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
+37
-5
brush.c
dlls/gdiplus/brush.c
+24
-5
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
graphics.c
dlls/gdiplus/graphics.c
+12
-0
No files found.
dlls/gdiplus/brush.c
View file @
52bf030b
...
...
@@ -78,6 +78,14 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
return
stat
;
}
stat
=
GdipCloneMatrix
(
src
->
transform
,
&
dest
->
transform
);
if
(
stat
!=
Ok
){
GdipDeletePath
(
dest
->
path
);
GdipFree
(
dest
);
return
stat
;
}
/* blending */
count
=
src
->
blendcount
;
dest
->
blendcount
=
count
;
...
...
@@ -94,6 +102,7 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
if
(
!
dest
->
blendfac
||
!
dest
->
blendpos
||
!
dest
->
surroundcolors
||
(
pcount
&&
(
!
dest
->
pblendcolor
||
!
dest
->
pblendpos
))){
GdipDeletePath
(
dest
->
path
);
GdipDeleteMatrix
(
dest
->
transform
);
GdipFree
(
dest
->
blendfac
);
GdipFree
(
dest
->
blendpos
);
GdipFree
(
dest
->
surroundcolors
);
...
...
@@ -503,6 +512,7 @@ GpStatus WINGDIPAPI GdipCreateLineBrushFromRectWithAngleI(GDIPCONST GpRect* rect
static
GpStatus
create_path_gradient
(
GpPath
*
path
,
GpPathGradient
**
grad
)
{
GpRectF
bounds
;
GpStatus
stat
;
if
(
!
path
||
!
grad
)
return
InvalidParameter
;
...
...
@@ -515,10 +525,18 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
return
OutOfMemory
;
}
stat
=
GdipCreateMatrix
(
&
(
*
grad
)
->
transform
);
if
(
stat
!=
Ok
)
{
GdipFree
(
*
grad
);
return
stat
;
}
(
*
grad
)
->
blendfac
=
GdipAlloc
(
sizeof
(
REAL
));
(
*
grad
)
->
blendpos
=
GdipAlloc
(
sizeof
(
REAL
));
(
*
grad
)
->
surroundcolors
=
GdipAlloc
(
sizeof
(
ARGB
));
if
(
!
(
*
grad
)
->
blendfac
||
!
(
*
grad
)
->
blendpos
||
!
(
*
grad
)
->
surroundcolors
){
GdipDeleteMatrix
((
*
grad
)
->
transform
);
GdipFree
((
*
grad
)
->
blendfac
);
GdipFree
((
*
grad
)
->
blendpos
);
GdipFree
((
*
grad
)
->
surroundcolors
);
...
...
@@ -890,6 +908,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush)
{
case
BrushTypePathGradient
:
GdipDeletePath
(((
GpPathGradient
*
)
brush
)
->
path
);
GdipDeleteMatrix
(((
GpPathGradient
*
)
brush
)
->
transform
);
GdipFree
(((
GpPathGradient
*
)
brush
)
->
blendfac
);
GdipFree
(((
GpPathGradient
*
)
brush
)
->
blendpos
);
GdipFree
(((
GpPathGradient
*
)
brush
)
->
surroundcolors
);
...
...
@@ -1641,14 +1660,14 @@ GpStatus WINGDIPAPI GdipSetPathGradientTransform(GpPathGradient *grad,
GpStatus
WINGDIPAPI
GdipGetPathGradientTransform
(
GpPathGradient
*
grad
,
GpMatrix
*
matrix
)
{
static
int
calls
;
TRACE
(
"(%p,%p)
\n
"
,
grad
,
matrix
);
if
(
!
(
calls
++
)
)
FIXME
(
"not implemented
\n
"
)
;
if
(
!
grad
||
!
matrix
)
return
InvalidParameter
;
return
NotImplemented
;
memcpy
(
matrix
,
grad
->
transform
,
sizeof
(
GpMatrix
));
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipMultiplyPathGradientTransform
(
GpPathGradient
*
grad
,
...
...
dlls/gdiplus/gdiplus_private.h
View file @
52bf030b
...
...
@@ -201,6 +201,7 @@ struct GpPathGradient{
ARGB
*
pblendcolor
;
/* preset blend colors */
REAL
*
pblendpos
;
/* preset blend positions */
INT
pblendcount
;
GpMatrix
*
transform
;
};
struct
GpLineGradient
{
...
...
dlls/gdiplus/graphics.c
View file @
52bf030b
...
...
@@ -1192,6 +1192,7 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
INT
min_y
,
max_y
,
min_x
,
max_x
;
INT
x
,
y
;
ARGB
outer_color
;
static
int
transform_fixme_once
;
if
(
fill
->
focus
.
X
!=
0
.
0
||
fill
->
focus
.
Y
!=
0
.
0
)
{
...
...
@@ -1221,6 +1222,17 @@ static GpStatus brush_fill_pixels(GpGraphics *graphics, GpBrush *brush,
FIXME
(
"path gradient preset blend not implemented
\n
"
);
}
if
(
!
transform_fixme_once
)
{
BOOL
is_identity
=
TRUE
;
GdipIsMatrixIdentity
(
fill
->
transform
,
&
is_identity
);
if
(
!
is_identity
)
{
FIXME
(
"path gradient transform not implemented
\n
"
);
transform_fixme_once
=
1
;
}
}
stat
=
GdipClonePath
(
fill
->
path
,
&
flat_path
);
if
(
stat
!=
Ok
)
...
...
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