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
5488ea14
Commit
5488ea14
authored
Mar 09, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Mar 10, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement tiling wrap modes.
parent
d891a8c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
8 deletions
+31
-8
graphics.c
dlls/gdiplus/graphics.c
+31
-8
No files found.
dlls/gdiplus/graphics.c
View file @
5488ea14
...
...
@@ -481,17 +481,40 @@ static void get_bitmap_sample_size(InterpolationMode interpolation, WrapMode wra
static
ARGB
sample_bitmap_pixel
(
GDIPCONST
GpRect
*
src_rect
,
LPBYTE
bits
,
UINT
width
,
UINT
height
,
INT
x
,
INT
y
,
GDIPCONST
GpImageAttributes
*
attributes
)
{
static
int
fixme
[
4
];
switch
(
attributes
->
wrap
)
if
(
attributes
->
wrap
==
WrapModeClamp
)
{
default:
if
(
!
fixme
[
attributes
->
wrap
]
++
)
FIXME
(
"not implemented for wrap mode %i
\n
"
,
attributes
->
wrap
);
case
WrapModeClamp
:
if
(
x
<
0
||
y
<
0
||
x
>=
width
||
y
>=
height
)
return
attributes
->
outside_color
;
break
;
}
else
{
/* Tiling. Make sure co-ordinates are positive as it simplifies the math. */
if
(
x
<
0
)
x
=
width
*
2
+
x
%
(
width
*
2
);
if
(
y
<
0
)
y
=
height
*
2
+
y
%
(
height
*
2
);
if
((
attributes
->
wrap
&
1
)
==
1
)
{
/* Flip X */
if
((
x
/
width
)
%
2
==
0
)
x
=
x
%
width
;
else
x
=
width
-
1
-
x
%
width
;
}
else
x
=
x
%
width
;
if
((
attributes
->
wrap
&
2
)
==
2
)
{
/* Flip Y */
if
((
y
/
height
)
%
2
==
0
)
y
=
y
%
height
;
else
y
=
height
-
1
-
y
%
height
;
}
else
y
=
y
%
height
;
}
if
(
x
<
src_rect
->
X
||
y
<
src_rect
->
Y
||
x
>=
src_rect
->
X
+
src_rect
->
Width
||
y
>=
src_rect
->
Y
+
src_rect
->
Height
)
...
...
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