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
c486e814
Commit
c486e814
authored
May 19, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
May 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement GdipTransformPointsI.
parent
2af29ed9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
graphics.c
dlls/gdiplus/graphics.c
+27
-2
graphics.c
dlls/gdiplus/tests/graphics.c
+12
-0
No files found.
dlls/gdiplus/graphics.c
View file @
c486e814
...
...
@@ -3662,9 +3662,34 @@ GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace
GpStatus
WINGDIPAPI
GdipTransformPointsI
(
GpGraphics
*
graphics
,
GpCoordinateSpace
dst_space
,
GpCoordinateSpace
src_space
,
GpPoint
*
points
,
INT
count
)
{
FIXME
(
"(%p, %d, %d, %p, %d): stub
\n
"
,
graphics
,
dst_space
,
src_space
,
points
,
count
);
GpPointF
*
pointsF
;
GpStatus
ret
;
INT
i
;
return
NotImplemented
;
TRACE
(
"(%p, %d, %d, %p, %d)
\n
"
,
graphics
,
dst_space
,
src_space
,
points
,
count
);
if
(
count
<=
0
)
return
InvalidParameter
;
pointsF
=
GdipAlloc
(
sizeof
(
GpPointF
)
*
count
);
if
(
!
pointsF
)
return
OutOfMemory
;
for
(
i
=
0
;
i
<
count
;
i
++
){
pointsF
[
i
].
X
=
(
REAL
)
points
[
i
].
X
;
pointsF
[
i
].
Y
=
(
REAL
)
points
[
i
].
Y
;
}
ret
=
GdipTransformPoints
(
graphics
,
dst_space
,
src_space
,
pointsF
,
count
);
if
(
ret
==
Ok
)
for
(
i
=
0
;
i
<
count
;
i
++
){
points
[
i
].
X
=
roundr
(
pointsF
[
i
].
X
);
points
[
i
].
Y
=
roundr
(
pointsF
[
i
].
Y
);
}
GdipFree
(
pointsF
);
return
ret
;
}
HPALETTE
WINGDIPAPI
GdipCreateHalftonePalette
(
void
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
c486e814
...
...
@@ -770,6 +770,7 @@ static void test_transformpoints(void)
GpGraphics
*
graphics
=
NULL
;
HDC
hdc
=
GetDC
(
0
);
GpPointF
ptf
[
2
];
GpPoint
pt
[
2
];
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
...
...
@@ -868,6 +869,17 @@ static void test_transformpoints(void)
expectf
(
0
.
0
,
ptf
[
1
].
X
);
expectf
(
1
.
0
,
ptf
[
1
].
Y
);
pt
[
0
].
X
=
1
;
pt
[
0
].
Y
=
0
;
pt
[
1
].
X
=
0
;
pt
[
1
].
Y
=
1
;
status
=
GdipTransformPointsI
(
graphics
,
CoordinateSpaceDevice
,
CoordinateSpaceWorld
,
pt
,
2
);
expect
(
Ok
,
status
);
expect
(
18
,
pt
[
0
].
X
);
expect
(
15
,
pt
[
0
].
Y
);
expect
(
15
,
pt
[
1
].
X
);
expect
(
18
,
pt
[
1
].
Y
);
GdipDeleteGraphics
(
graphics
);
ReleaseDC
(
0
,
hdc
);
}
...
...
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