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
51cf90d8
Commit
51cf90d8
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: Move bitmap interpolation into a separate function.
parent
33807ac0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
graphics.c
dlls/gdiplus/graphics.c
+19
-5
No files found.
dlls/gdiplus/graphics.c
View file @
51cf90d8
...
...
@@ -526,6 +526,24 @@ static ARGB sample_bitmap_pixel(GDIPCONST GpRect *src_rect, LPBYTE bits, UINT wi
return
((
DWORD
*
)(
bits
))[(
x
-
src_rect
->
X
)
+
(
y
-
src_rect
->
Y
)
*
src_rect
->
Width
];
}
static
ARGB
resample_bitmap_pixel
(
GDIPCONST
GpRect
*
src_rect
,
LPBYTE
bits
,
UINT
width
,
UINT
height
,
GpPointF
*
point
,
GDIPCONST
GpImageAttributes
*
attributes
,
InterpolationMode
interpolation
)
{
static
int
fixme
;
switch
(
interpolation
)
{
default:
if
(
!
fixme
++
)
FIXME
(
"Unimplemented interpolation %i
\n
"
,
interpolation
);
/* fall-through */
case
InterpolationModeNearestNeighbor
:
return
sample_bitmap_pixel
(
src_rect
,
bits
,
width
,
height
,
roundr
(
point
->
X
),
roundr
(
point
->
Y
),
attributes
);
}
}
static
void
brush_fill_path
(
GpGraphics
*
graphics
,
GpBrush
*
brush
)
{
switch
(
brush
->
bt
)
...
...
@@ -2528,19 +2546,15 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
for
(
y
=
dst_area
.
top
;
y
<
dst_area
.
bottom
;
y
++
)
{
GpPointF
src_pointf
;
INT
src_x
,
src_y
;
ARGB
*
dst_color
;
src_pointf
.
X
=
dst_to_src_points
[
0
].
X
+
x
*
x_dx
+
y
*
y_dx
;
src_pointf
.
Y
=
dst_to_src_points
[
0
].
Y
+
x
*
x_dy
+
y
*
y_dy
;
src_x
=
roundr
(
src_pointf
.
X
);
src_y
=
roundr
(
src_pointf
.
Y
);
dst_color
=
(
ARGB
*
)(
dst_data
+
dst_stride
*
(
y
-
dst_area
.
top
)
+
sizeof
(
ARGB
)
*
(
x
-
dst_area
.
left
));
if
(
src_pointf
.
X
>=
srcx
&&
src_pointf
.
X
<
srcx
+
srcwidth
&&
src_pointf
.
Y
>=
srcy
&&
src_pointf
.
Y
<
srcy
+
srcheight
)
*
dst_color
=
sample_bitmap_pixel
(
&
src_area
,
src_data
,
bitmap
->
width
,
bitmap
->
height
,
src_x
,
src_y
,
imageAttributes
);
*
dst_color
=
resample_bitmap_pixel
(
&
src_area
,
src_data
,
bitmap
->
width
,
bitmap
->
height
,
&
src_pointf
,
imageAttributes
,
interpolation
);
else
*
dst_color
=
0
;
}
...
...
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