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
0cbec550
Commit
0cbec550
authored
Oct 31, 2012
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement drawing metafiles with an emf handle.
parent
954b4938
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
graphics.c
dlls/gdiplus/graphics.c
+21
-2
metafile.c
dlls/gdiplus/tests/metafile.c
+4
-4
No files found.
dlls/gdiplus/graphics.c
View file @
0cbec550
...
@@ -3085,6 +3085,13 @@ GpStatus WINGDIPAPI GdipDrawImagePointsI(GpGraphics *graphics, GpImage *image,
...
@@ -3085,6 +3085,13 @@ GpStatus WINGDIPAPI GdipDrawImagePointsI(GpGraphics *graphics, GpImage *image,
return
GdipDrawImagePoints
(
graphics
,
image
,
ptf
,
count
);
return
GdipDrawImagePoints
(
graphics
,
image
,
ptf
,
count
);
}
}
static
BOOL
CALLBACK
play_metafile_proc
(
EmfPlusRecordType
record_type
,
unsigned
int
flags
,
unsigned
int
dataSize
,
const
unsigned
char
*
pStr
,
void
*
userdata
)
{
GdipPlayMetafileRecord
(
userdata
,
record_type
,
flags
,
dataSize
,
pStr
);
return
TRUE
;
}
GpStatus
WINGDIPAPI
GdipDrawImagePointsRect
(
GpGraphics
*
graphics
,
GpImage
*
image
,
GpStatus
WINGDIPAPI
GdipDrawImagePointsRect
(
GpGraphics
*
graphics
,
GpImage
*
image
,
GDIPCONST
GpPointF
*
points
,
INT
count
,
REAL
srcx
,
REAL
srcy
,
REAL
srcwidth
,
GDIPCONST
GpPointF
*
points
,
INT
count
,
REAL
srcx
,
REAL
srcy
,
REAL
srcwidth
,
REAL
srcheight
,
GpUnit
srcUnit
,
GDIPCONST
GpImageAttributes
*
imageAttributes
,
REAL
srcheight
,
GpUnit
srcUnit
,
GDIPCONST
GpImageAttributes
*
imageAttributes
,
...
@@ -3379,10 +3386,22 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
...
@@ -3379,10 +3386,22 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
DeleteObject
(
hbitmap
);
DeleteObject
(
hbitmap
);
}
}
}
}
else
if
(
image
->
type
==
ImageTypeMetafile
&&
((
GpMetafile
*
)
image
)
->
hemf
)
{
GpRectF
rc
;
rc
.
X
=
srcx
;
rc
.
Y
=
srcy
;
rc
.
Width
=
srcwidth
;
rc
.
Height
=
srcheight
;
return
GdipEnumerateMetafileSrcRectDestPoints
(
graphics
,
(
GpMetafile
*
)
image
,
points
,
count
,
&
rc
,
srcUnit
,
play_metafile_proc
,
image
,
imageAttributes
);
}
else
else
{
{
ERR
(
"GpImage with no IPicture or HBITMAP?!
\n
"
);
WARN
(
"GpImage with nothing we can draw (metafile in wrong state?)
\n
"
);
return
NotImplemented
;
return
InvalidParameter
;
}
}
return
Ok
;
return
Ok
;
...
...
dlls/gdiplus/tests/metafile.c
View file @
0cbec550
...
@@ -431,7 +431,7 @@ static void test_getdc(void)
...
@@ -431,7 +431,7 @@ static void test_getdc(void)
stat
=
GdipDrawImagePointsRect
(
graphics
,
(
GpImage
*
)
metafile
,
dst_points
,
3
,
stat
=
GdipDrawImagePointsRect
(
graphics
,
(
GpImage
*
)
metafile
,
dst_points
,
3
,
0
.
0
,
0
.
0
,
100
.
0
,
100
.
0
,
UnitPixel
,
NULL
,
NULL
,
NULL
);
0
.
0
,
0
.
0
,
100
.
0
,
100
.
0
,
UnitPixel
,
NULL
,
NULL
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
15
,
15
,
&
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
15
,
15
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
@@ -439,7 +439,7 @@ static void test_getdc(void)
...
@@ -439,7 +439,7 @@ static void test_getdc(void)
stat
=
GdipBitmapGetPixel
(
bitmap
,
50
,
50
,
&
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
50
,
50
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff0000ff
,
color
);
expect
(
0xff0000ff
,
color
);
stat
=
GdipDeleteGraphics
(
graphics
);
stat
=
GdipDeleteGraphics
(
graphics
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
@@ -550,7 +550,7 @@ static void test_emfonly(void)
...
@@ -550,7 +550,7 @@ static void test_emfonly(void)
stat
=
GdipDrawImagePointsRect
(
graphics
,
(
GpImage
*
)
metafile
,
dst_points
,
3
,
stat
=
GdipDrawImagePointsRect
(
graphics
,
(
GpImage
*
)
metafile
,
dst_points
,
3
,
0
.
0
,
0
.
0
,
100
.
0
,
100
.
0
,
UnitPixel
,
NULL
,
NULL
,
NULL
);
0
.
0
,
0
.
0
,
100
.
0
,
100
.
0
,
UnitPixel
,
NULL
,
NULL
,
NULL
);
todo_wine
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
15
,
15
,
&
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
15
,
15
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
@@ -558,7 +558,7 @@ static void test_emfonly(void)
...
@@ -558,7 +558,7 @@ static void test_emfonly(void)
stat
=
GdipBitmapGetPixel
(
bitmap
,
50
,
50
,
&
color
);
stat
=
GdipBitmapGetPixel
(
bitmap
,
50
,
50
,
&
color
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
todo_wine
expect
(
0xff0000ff
,
color
);
expect
(
0xff0000ff
,
color
);
stat
=
GdipDeleteGraphics
(
graphics
);
stat
=
GdipDeleteGraphics
(
graphics
);
expect
(
Ok
,
stat
);
expect
(
Ok
,
stat
);
...
...
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