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
8273d58a
Commit
8273d58a
authored
Apr 24, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipSetPathGradientSigmaBlend.
parent
d0a85604
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
4 deletions
+44
-4
brush.c
dlls/gdiplus/brush.c
+44
-4
No files found.
dlls/gdiplus/brush.c
View file @
8273d58a
...
...
@@ -1642,17 +1642,57 @@ GpStatus WINGDIPAPI GdipSetPathGradientGammaCorrection(GpPathGradient *grad,
GpStatus
WINGDIPAPI
GdipSetPathGradientSigmaBlend
(
GpPathGradient
*
grad
,
REAL
focus
,
REAL
scale
)
{
static
int
calls
;
REAL
factors
[
33
];
REAL
positions
[
33
];
int
num_points
=
0
;
int
i
;
const
int
precision
=
16
;
REAL
erf_range
;
/* we use values erf(-erf_range) through erf(+erf_range) */
REAL
min_erf
;
REAL
scale_erf
;
TRACE
(
"(%p,%0.2f,%0.2f)
\n
"
,
grad
,
focus
,
scale
);
if
(
!
grad
||
focus
<
0
.
0
||
focus
>
1
.
0
||
scale
<
0
.
0
||
scale
>
1
.
0
)
return
InvalidParameter
;
if
(
!
(
calls
++
))
FIXME
(
"not implemented
\n
"
);
/* we want 2 standard deviations */
erf_range
=
2
.
0
/
sqrt
(
2
);
return
NotImplemented
;
/* calculate the constants we need to normalize the error function to be
between 0.0 and scale over the range we need */
min_erf
=
erf
(
-
erf_range
);
scale_erf
=
scale
/
(
-
2
.
0
*
min_erf
);
if
(
focus
!=
0
.
0
)
{
positions
[
0
]
=
0
.
0
;
factors
[
0
]
=
0
.
0
;
for
(
i
=
1
;
i
<
precision
;
i
++
)
{
positions
[
i
]
=
focus
*
i
/
precision
;
factors
[
i
]
=
scale_erf
*
(
erf
(
2
*
erf_range
*
i
/
precision
-
erf_range
)
-
min_erf
);
}
num_points
+=
precision
;
}
positions
[
num_points
]
=
focus
;
factors
[
num_points
]
=
scale
;
num_points
+=
1
;
if
(
focus
!=
1
.
0
)
{
for
(
i
=
1
;
i
<
precision
;
i
++
)
{
positions
[
i
+
num_points
-
1
]
=
(
focus
+
((
1
.
0
-
focus
)
*
i
/
precision
));
factors
[
i
+
num_points
-
1
]
=
scale_erf
*
(
erf
(
erf_range
-
2
*
erf_range
*
i
/
precision
)
-
min_erf
);
}
num_points
+=
precision
;
positions
[
num_points
-
1
]
=
1
.
0
;
factors
[
num_points
-
1
]
=
0
.
0
;
}
return
GdipSetPathGradientBlend
(
grad
,
factors
,
positions
,
num_points
);
}
GpStatus
WINGDIPAPI
GdipSetPathGradientSurroundColorsWithCount
(
GpPathGradient
...
...
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