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
556bdf24
Commit
556bdf24
authored
Sep 13, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Sep 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add some tests for scaling an image with various pixel offset modes.
parent
cee8a76e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
7 deletions
+47
-7
image.c
dlls/gdiplus/tests/image.c
+47
-7
No files found.
dlls/gdiplus/tests/image.c
View file @
556bdf24
...
...
@@ -3808,19 +3808,53 @@ static void test_DrawImage_scale(void)
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
};
static
const
BYTE
image_250
[
24
]
=
{
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
};
static
const
BYTE
image_120_half
[
24
]
=
{
0x40
,
0x40
,
0x40
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
};
static
const
BYTE
image_150_half
[
24
]
=
{
0x40
,
0x40
,
0x40
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
};
static
const
BYTE
image_200_half
[
24
]
=
{
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
};
static
const
BYTE
image_250_half
[
24
]
=
{
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x40
,
0x40
,
0x40
};
static
const
struct
test_data
{
REAL
scale_x
;
PixelOffsetMode
pixel_offset_mode
;
const
BYTE
*
image
;
BOOL
todo
;
}
td
[]
=
{
{
0
.
8
,
image_080
},
{
1
.
0
,
image_100
},
{
1
.
2
,
image_120
},
{
1
.
5
,
image_150
},
{
1
.
8
,
image_180
},
{
2
.
0
,
image_200
},
{
2
.
5
,
image_250
}
{
0
.
8
,
PixelOffsetModeNone
,
image_080
},
/* 0 */
{
1
.
0
,
PixelOffsetModeNone
,
image_100
},
{
1
.
2
,
PixelOffsetModeNone
,
image_120
},
{
1
.
5
,
PixelOffsetModeNone
,
image_150
},
{
1
.
8
,
PixelOffsetModeNone
,
image_180
},
{
2
.
0
,
PixelOffsetModeNone
,
image_200
},
{
2
.
5
,
PixelOffsetModeNone
,
image_250
},
{
0
.
8
,
PixelOffsetModeHighSpeed
,
image_080
},
/* 7 */
{
1
.
0
,
PixelOffsetModeHighSpeed
,
image_100
},
{
1
.
2
,
PixelOffsetModeHighSpeed
,
image_120
},
{
1
.
5
,
PixelOffsetModeHighSpeed
,
image_150
},
{
1
.
8
,
PixelOffsetModeHighSpeed
,
image_180
},
{
2
.
0
,
PixelOffsetModeHighSpeed
,
image_200
},
{
2
.
5
,
PixelOffsetModeHighSpeed
,
image_250
},
{
0
.
8
,
PixelOffsetModeHalf
,
image_080
},
/* 14 */
{
1
.
0
,
PixelOffsetModeHalf
,
image_100
},
{
1
.
2
,
PixelOffsetModeHalf
,
image_120_half
,
TRUE
},
{
1
.
5
,
PixelOffsetModeHalf
,
image_150_half
,
TRUE
},
{
1
.
8
,
PixelOffsetModeHalf
,
image_180
},
{
2
.
0
,
PixelOffsetModeHalf
,
image_200_half
,
TRUE
},
{
2
.
5
,
PixelOffsetModeHalf
,
image_250_half
,
TRUE
},
{
0
.
8
,
PixelOffsetModeHighQuality
,
image_080
},
/* 21 */
{
1
.
0
,
PixelOffsetModeHighQuality
,
image_100
},
{
1
.
2
,
PixelOffsetModeHighQuality
,
image_120_half
,
TRUE
},
{
1
.
5
,
PixelOffsetModeHighQuality
,
image_150_half
,
TRUE
},
{
1
.
8
,
PixelOffsetModeHighQuality
,
image_180
},
{
2
.
0
,
PixelOffsetModeHighQuality
,
image_200_half
,
TRUE
},
{
2
.
5
,
PixelOffsetModeHighQuality
,
image_250_half
,
TRUE
},
};
BYTE
src_2x1
[
6
]
=
{
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
};
BYTE
dst_8x1
[
24
];
...
...
@@ -3850,6 +3884,9 @@ static void test_DrawImage_scale(void)
for
(
i
=
0
;
i
<
sizeof
(
td
)
/
sizeof
(
td
[
0
]);
i
++
)
{
status
=
GdipSetPixelOffsetMode
(
graphics
,
td
[
i
].
pixel_offset_mode
);
expect
(
Ok
,
status
);
status
=
GdipCreateMatrix2
(
td
[
i
].
scale_x
,
0
.
0
,
0
.
0
,
1
.
0
,
0
.
0
,
0
.
0
,
&
matrix
);
expect
(
Ok
,
status
);
status
=
GdipSetWorldTransform
(
graphics
,
matrix
);
...
...
@@ -3861,6 +3898,9 @@ static void test_DrawImage_scale(void)
expect
(
Ok
,
status
);
match
=
memcmp
(
dst_8x1
,
td
[
i
].
image
,
sizeof
(
dst_8x1
))
==
0
;
if
(
!
match
&&
td
[
i
].
todo
)
todo_wine
ok
(
match
,
"%d: data should match
\n
"
,
i
);
else
ok
(
match
,
"%d: data should match
\n
"
,
i
);
if
(
!
match
)
{
...
...
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