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
2cdc48a4
Commit
2cdc48a4
authored
Jul 11, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipSetLineLinearBlend.
parent
849af30e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
4 deletions
+92
-4
brush.c
dlls/gdiplus/brush.c
+25
-4
brush.c
dlls/gdiplus/tests/brush.c
+66
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/brush.c
View file @
2cdc48a4
...
@@ -1531,12 +1531,33 @@ GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture* brush, REAL angle,
...
@@ -1531,12 +1531,33 @@ GpStatus WINGDIPAPI GdipRotateTextureTransform(GpTexture* brush, REAL angle,
GpStatus
WINGDIPAPI
GdipSetLineLinearBlend
(
GpLineGradient
*
brush
,
REAL
focus
,
GpStatus
WINGDIPAPI
GdipSetLineLinearBlend
(
GpLineGradient
*
brush
,
REAL
focus
,
REAL
scale
)
REAL
scale
)
{
{
static
int
calls
;
REAL
factors
[
3
];
REAL
positions
[
3
];
int
num_points
=
0
;
if
(
!
(
calls
++
))
TRACE
(
"(%p,%.2f,%.2f)
\n
"
,
brush
,
focus
,
scale
);
FIXME
(
"not implemented
\n
"
);
return
NotImplemented
;
if
(
!
brush
)
return
InvalidParameter
;
if
(
focus
!=
0
.
0
)
{
factors
[
num_points
]
=
0
.
0
;
positions
[
num_points
]
=
0
.
0
;
num_points
++
;
}
factors
[
num_points
]
=
scale
;
positions
[
num_points
]
=
focus
;
num_points
++
;
if
(
focus
!=
1
.
0
)
{
factors
[
num_points
]
=
0
.
0
;
positions
[
num_points
]
=
1
.
0
;
num_points
++
;
}
return
GdipSetLineBlend
(
brush
,
factors
,
positions
,
num_points
);
}
}
GpStatus
WINGDIPAPI
GdipSetLinePresetBlend
(
GpLineGradient
*
brush
,
GpStatus
WINGDIPAPI
GdipSetLinePresetBlend
(
GpLineGradient
*
brush
,
...
...
dlls/gdiplus/tests/brush.c
View file @
2cdc48a4
...
@@ -493,6 +493,71 @@ static void test_lineblend(void)
...
@@ -493,6 +493,71 @@ static void test_lineblend(void)
expect
(
Ok
,
status
);
expect
(
Ok
,
status
);
}
}
static
void
test_linelinearblend
(
void
)
{
GpLineGradient
*
brush
;
GpStatus
status
;
GpPointF
pt1
,
pt2
;
INT
count
=
10
;
REAL
res_factors
[
3
]
=
{
0
.
3
f
};
REAL
res_positions
[
3
]
=
{
0
.
3
f
};
status
=
GdipSetLineLinearBlend
(
NULL
,
0
.
6
,
0
.
8
);
expect
(
InvalidParameter
,
status
);
pt1
.
X
=
pt1
.
Y
=
1
.
0
;
pt2
.
X
=
pt2
.
Y
=
100
.
0
;
status
=
GdipCreateLineBrush
(
&
pt1
,
&
pt2
,
0
,
0
,
WrapModeTile
,
&
brush
);
expect
(
Ok
,
status
);
status
=
GdipSetLineLinearBlend
(
brush
,
0
.
6
,
0
.
8
);
expect
(
Ok
,
status
);
status
=
GdipGetLineBlendCount
(
brush
,
&
count
);
expect
(
Ok
,
status
);
expect
(
3
,
count
);
status
=
GdipGetLineBlend
(
brush
,
res_factors
,
res_positions
,
3
);
expect
(
Ok
,
status
);
expectf
(
0
.
0
,
res_factors
[
0
]);
expectf
(
0
.
0
,
res_positions
[
0
]);
expectf
(
0
.
8
,
res_factors
[
1
]);
expectf
(
0
.
6
,
res_positions
[
1
]);
expectf
(
0
.
0
,
res_factors
[
2
]);
expectf
(
1
.
0
,
res_positions
[
2
]);
status
=
GdipSetLineLinearBlend
(
brush
,
0
.
0
,
0
.
8
);
expect
(
Ok
,
status
);
status
=
GdipGetLineBlendCount
(
brush
,
&
count
);
expect
(
Ok
,
status
);
expect
(
2
,
count
);
status
=
GdipGetLineBlend
(
brush
,
res_factors
,
res_positions
,
3
);
expect
(
Ok
,
status
);
expectf
(
0
.
8
,
res_factors
[
0
]);
expectf
(
0
.
0
,
res_positions
[
0
]);
expectf
(
0
.
0
,
res_factors
[
1
]);
expectf
(
1
.
0
,
res_positions
[
1
]);
status
=
GdipSetLineLinearBlend
(
brush
,
1
.
0
,
0
.
8
);
expect
(
Ok
,
status
);
status
=
GdipGetLineBlendCount
(
brush
,
&
count
);
expect
(
Ok
,
status
);
expect
(
2
,
count
);
status
=
GdipGetLineBlend
(
brush
,
res_factors
,
res_positions
,
3
);
expect
(
Ok
,
status
);
expectf
(
0
.
0
,
res_factors
[
0
]);
expectf
(
0
.
0
,
res_positions
[
0
]);
expectf
(
0
.
8
,
res_factors
[
1
]);
expectf
(
1
.
0
,
res_positions
[
1
]);
}
START_TEST
(
brush
)
START_TEST
(
brush
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -515,6 +580,7 @@ START_TEST(brush)
...
@@ -515,6 +580,7 @@ START_TEST(brush)
test_texturewrap
();
test_texturewrap
();
test_gradientgetrect
();
test_gradientgetrect
();
test_lineblend
();
test_lineblend
();
test_linelinearblend
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
include/gdiplusflat.h
View file @
2cdc48a4
...
@@ -409,6 +409,7 @@ GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*);
...
@@ -409,6 +409,7 @@ GpStatus WINGDIPAPI GdipGetLineBlendCount(GpLineGradient*,INT*);
GpStatus
WINGDIPAPI
GdipSetLineColors
(
GpLineGradient
*
,
ARGB
,
ARGB
);
GpStatus
WINGDIPAPI
GdipSetLineColors
(
GpLineGradient
*
,
ARGB
,
ARGB
);
GpStatus
WINGDIPAPI
GdipSetLineGammaCorrection
(
GpLineGradient
*
,
BOOL
);
GpStatus
WINGDIPAPI
GdipSetLineGammaCorrection
(
GpLineGradient
*
,
BOOL
);
GpStatus
WINGDIPAPI
GdipSetLineSigmaBlend
(
GpLineGradient
*
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipSetLineSigmaBlend
(
GpLineGradient
*
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipSetLineLinearBlend
(
GpLineGradient
*
,
REAL
,
REAL
);
GpStatus
WINGDIPAPI
GdipSetLineWrapMode
(
GpLineGradient
*
,
GpWrapMode
);
GpStatus
WINGDIPAPI
GdipSetLineWrapMode
(
GpLineGradient
*
,
GpWrapMode
);
/* Matrix */
/* Matrix */
...
...
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