Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
8b6dafda
Commit
8b6dafda
authored
Mar 10, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement bilinear interpolation.
parent
51cf90d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
graphics.c
dlls/gdiplus/graphics.c
+34
-0
No files found.
dlls/gdiplus/graphics.c
View file @
8b6dafda
...
...
@@ -538,6 +538,40 @@ static ARGB resample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT
if
(
!
fixme
++
)
FIXME
(
"Unimplemented interpolation %i
\n
"
,
interpolation
);
/* fall-through */
case
InterpolationModeBilinear
:
{
REAL
leftxf
,
topyf
;
INT
leftx
,
rightx
,
topy
,
bottomy
;
ARGB
topleft
,
topright
,
bottomleft
,
bottomright
;
ARGB
top
,
bottom
;
float
x_offset
;
leftxf
=
floorf
(
point
->
X
);
leftx
=
(
INT
)
leftxf
;
rightx
=
(
INT
)
ceilf
(
point
->
X
);
topyf
=
floorf
(
point
->
Y
);
topy
=
(
INT
)
topyf
;
bottomy
=
(
INT
)
ceilf
(
point
->
Y
);
if
(
leftx
==
rightx
&&
topy
==
bottomy
)
return
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
leftx
,
topy
,
attributes
);
topleft
=
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
leftx
,
topy
,
attributes
);
topright
=
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
rightx
,
topy
,
attributes
);
bottomleft
=
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
leftx
,
bottomy
,
attributes
);
bottomright
=
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
rightx
,
bottomy
,
attributes
);
x_offset
=
point
->
X
-
leftxf
;
top
=
blend_colors
(
topleft
,
topright
,
x_offset
);
bottom
=
blend_colors
(
bottomleft
,
bottomright
,
x_offset
);
return
blend_colors
(
top
,
bottom
,
point
->
Y
-
topyf
);
}
case
InterpolationModeNearestNeighbor
:
return
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
roundr
(
point
->
X
),
roundr
(
point
->
Y
),
attributes
);
...
...
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