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
065ac4de
Commit
065ac4de
authored
Apr 07, 2003
by
Maxime Bellengé
Committed by
Alexandre Julliard
Apr 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the GRADIENT_FILL_RECT{H|V} cases of GdiGradientFill.
parent
b70b8326
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
14 deletions
+72
-14
gdi32.spec
dlls/gdi/gdi32.spec
+1
-0
msimg32.spec
dlls/msimg32/msimg32.spec
+1
-1
msimg32_main.c
dlls/msimg32/msimg32_main.c
+0
-13
painting.c
graphics/painting.c
+70
-0
No files found.
dlls/gdi/gdi32.spec
View file @
065ac4de
...
...
@@ -157,6 +157,7 @@
@ stub GdiGetLocalBrush
@ stub GdiGetLocalDC
@ stub GdiGetLocalFont
@ stdcall GdiGradientFill(long ptr long ptr long long)
@ stub GdiIsMetaFileDC
@ stub GdiPlayDCScript
@ stub GdiPlayJournal
...
...
dlls/msimg32/msimg32.spec
View file @
065ac4de
@ stdcall AlphaBlend(long long long long long long long long long long long)
@ stub DllInitialize
@ stdcall GradientFill(long ptr long ptr long long)
@ stdcall GradientFill(long ptr long ptr long long)
gdi32.GdiGradientFill
@ stdcall TransparentBlt(long long long long long long long long long long long)
@ stdcall vSetDdrawflag()
dlls/msimg32/msimg32_main.c
View file @
065ac4de
...
...
@@ -23,19 +23,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msimg32
);
/******************************************************************************
* GradientFill (MSIMG32.@)
*/
BOOL
WINAPI
GradientFill
(
HDC
hdc
,
TRIVERTEX
*
vert_array
,
ULONG
nvert
,
void
*
grad_array
,
ULONG
ngrad
,
ULONG
mode
)
{
FIXME
(
"stub: %ld vertices %ld gradients mode %lx
\n
"
,
nvert
,
ngrad
,
mode
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/******************************************************************************
* AlphaBlend (MSIMG32.@)
*/
...
...
graphics/painting.c
View file @
065ac4de
...
...
@@ -1065,3 +1065,73 @@ POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut )
TRACE
(
"Produced %d points
\n
"
,
*
nPtsOut
);
return
out
;
}
/******************************************************************************
* GradientFill (GDI32.@)
*/
BOOL
WINAPI
GdiGradientFill
(
HDC
hdc
,
TRIVERTEX
*
vert_array
,
ULONG
nvert
,
void
*
grad_array
,
ULONG
ngrad
,
ULONG
mode
)
{
int
i
,
j
,
y
,
x
;
GRADIENT_RECT
*
rect
;
double
ired
,
igreen
,
iblue
;
double
red
,
green
,
blue
;
TRACE
(
"vert_array:0x%08lx nvert:%ld grad_array:0x%08lx ngrad:%ld
\n
"
,(
long
)
vert_array
,
nvert
,(
long
)
grad_array
,
ngrad
);
switch
(
mode
)
{
case
GRADIENT_FILL_RECT_H
:
for
(
i
=
0
;
i
<
ngrad
;
i
++
)
{
rect
=
(
GRADIENT_RECT
*
)((
long
)
grad_array
+
i
*
sizeof
(
GRADIENT_RECT
));
y
=
vert_array
[
rect
->
UpperLeft
].
y
;
/* Precompute some stuffs to speed up a little bit */
ired
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Red
-
vert_array
[
rect
->
UpperLeft
].
Red
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
);
igreen
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Green
-
vert_array
[
rect
->
UpperLeft
].
Green
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
);
iblue
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Blue
-
vert_array
[
rect
->
UpperLeft
].
Blue
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
);
red
=
vert_array
[
rect
->
UpperLeft
].
Red
;
green
=
vert_array
[
rect
->
UpperLeft
].
Green
;
blue
=
vert_array
[
rect
->
UpperLeft
].
Blue
;
/* Draw the first line */
for
(
j
=
vert_array
[
rect
->
UpperLeft
].
x
;
j
<=
vert_array
[
rect
->
LowerRight
].
x
;
j
++
)
{
SetPixel
(
hdc
,
j
,
y
,
RGB
(((
int
)
red
)
>>
8
,((
int
)
green
)
>>
8
,((
int
)
blue
)
>>
8
));
red
+=
ired
;
green
+=
igreen
;
blue
+=
iblue
;
}
/* Extends to the correct size */
StretchBlt
(
hdc
,
vert_array
[
rect
->
UpperLeft
].
x
,
y
+
1
,(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
),
(
vert_array
[
rect
->
LowerRight
].
y
-
y
-
1
),
hdc
,
vert_array
[
rect
->
UpperLeft
].
x
,
y
,
(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
),
1
,
SRCCOPY
);
}
break
;
case
GRADIENT_FILL_RECT_V
:
for
(
i
=
0
;
i
<
ngrad
;
i
++
)
{
rect
=
(
GRADIENT_RECT
*
)((
long
)
grad_array
+
i
*
sizeof
(
GRADIENT_RECT
));
x
=
vert_array
[
rect
->
UpperLeft
].
x
;
/* Precompute some stuffs to speed up a little bit */
ired
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Red
-
vert_array
[
rect
->
UpperLeft
].
Red
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
y
-
vert_array
[
rect
->
UpperLeft
].
y
);
igreen
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Green
-
vert_array
[
rect
->
UpperLeft
].
Green
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
y
-
vert_array
[
rect
->
UpperLeft
].
y
);
iblue
=
(
double
)(
vert_array
[
rect
->
LowerRight
].
Blue
-
vert_array
[
rect
->
UpperLeft
].
Blue
)
/
(
double
)(
vert_array
[
rect
->
LowerRight
].
y
-
vert_array
[
rect
->
UpperLeft
].
y
);
red
=
vert_array
[
rect
->
UpperLeft
].
Red
;
green
=
vert_array
[
rect
->
UpperLeft
].
Green
;
blue
=
vert_array
[
rect
->
UpperLeft
].
Blue
;
/* Draw the first line */
for
(
j
=
vert_array
[
rect
->
UpperLeft
].
y
;
j
<=
vert_array
[
rect
->
LowerRight
].
y
;
j
++
)
{
SetPixel
(
hdc
,
x
,
j
,
RGB
(((
int
)
red
)
>>
8
,((
int
)
green
)
>>
8
,((
int
)
blue
)
>>
8
));
red
+=
ired
;
green
+=
igreen
;
blue
+=
iblue
;
}
/* Extends to the correct size */
StretchBlt
(
hdc
,
x
+
1
,
vert_array
[
rect
->
UpperLeft
].
y
,
(
vert_array
[
rect
->
LowerRight
].
x
-
vert_array
[
rect
->
UpperLeft
].
x
)
-
1
,
(
vert_array
[
rect
->
LowerRight
].
y
-
vert_array
[
rect
->
UpperLeft
].
y
),
hdc
,
x
,
vert_array
[
rect
->
UpperLeft
].
y
,
1
,
(
vert_array
[
rect
->
LowerRight
].
y
-
vert_array
[
rect
->
UpperLeft
].
y
),
SRCCOPY
);
}
break
;
case
GRADIENT_FILL_TRIANGLE
:
FIXME
(
"GRADIENT_FILL_TRIANGLE stub
\n
"
);
default:
return
FALSE
;
}
return
TRUE
;
}
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