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
271c2bd6
Commit
271c2bd6
authored
Aug 03, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implement metafile recording for ScaleWorldTransform.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
272ebf86
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
graphics.c
dlls/gdiplus/graphics.c
+9
-0
metafile.c
dlls/gdiplus/metafile.c
+31
-0
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
271c2bd6
...
@@ -90,6 +90,7 @@ extern GpStatus METAFILE_GraphicsClear(GpMetafile* metafile, ARGB color) DECLSPE
...
@@ -90,6 +90,7 @@ extern GpStatus METAFILE_GraphicsClear(GpMetafile* metafile, ARGB color) DECLSPE
extern
GpStatus
METAFILE_FillRectangles
(
GpMetafile
*
metafile
,
GpBrush
*
brush
,
extern
GpStatus
METAFILE_FillRectangles
(
GpMetafile
*
metafile
,
GpBrush
*
brush
,
GDIPCONST
GpRectF
*
rects
,
INT
count
)
DECLSPEC_HIDDEN
;
GDIPCONST
GpRectF
*
rects
,
INT
count
)
DECLSPEC_HIDDEN
;
extern
GpStatus
METAFILE_SetPageTransform
(
GpMetafile
*
metafile
,
GpUnit
unit
,
REAL
scale
)
DECLSPEC_HIDDEN
;
extern
GpStatus
METAFILE_SetPageTransform
(
GpMetafile
*
metafile
,
GpUnit
unit
,
REAL
scale
)
DECLSPEC_HIDDEN
;
extern
GpStatus
METAFILE_ScaleWorldTransform
(
GpMetafile
*
metafile
,
REAL
sx
,
REAL
sy
,
MatrixOrder
order
)
DECLSPEC_HIDDEN
;
extern
GpStatus
METAFILE_GraphicsDeleted
(
GpMetafile
*
metafile
)
DECLSPEC_HIDDEN
;
extern
GpStatus
METAFILE_GraphicsDeleted
(
GpMetafile
*
metafile
)
DECLSPEC_HIDDEN
;
extern
void
calc_curve_bezier
(
const
GpPointF
*
pts
,
REAL
tension
,
REAL
*
x1
,
extern
void
calc_curve_bezier
(
const
GpPointF
*
pts
,
REAL
tension
,
REAL
*
x1
,
...
...
dlls/gdiplus/graphics.c
View file @
271c2bd6
...
@@ -5242,6 +5242,8 @@ GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsContainer sta
...
@@ -5242,6 +5242,8 @@ GpStatus WINGDIPAPI GdipEndContainer(GpGraphics *graphics, GraphicsContainer sta
GpStatus
WINGDIPAPI
GdipScaleWorldTransform
(
GpGraphics
*
graphics
,
REAL
sx
,
GpStatus
WINGDIPAPI
GdipScaleWorldTransform
(
GpGraphics
*
graphics
,
REAL
sx
,
REAL
sy
,
GpMatrixOrder
order
)
REAL
sy
,
GpMatrixOrder
order
)
{
{
GpStatus
stat
;
TRACE
(
"(%p, %.2f, %.2f, %d)
\n
"
,
graphics
,
sx
,
sy
,
order
);
TRACE
(
"(%p, %.2f, %.2f, %d)
\n
"
,
graphics
,
sx
,
sy
,
order
);
if
(
!
graphics
)
if
(
!
graphics
)
...
@@ -5250,6 +5252,13 @@ GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx,
...
@@ -5250,6 +5252,13 @@ GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx,
if
(
graphics
->
busy
)
if
(
graphics
->
busy
)
return
ObjectBusy
;
return
ObjectBusy
;
if
(
graphics
->
image
&&
graphics
->
image
->
type
==
ImageTypeMetafile
)
{
stat
=
METAFILE_ScaleWorldTransform
((
GpMetafile
*
)
graphics
->
image
,
sx
,
sy
,
order
);
if
(
stat
!=
Ok
)
return
stat
;
}
return
GdipScaleMatrix
(
&
graphics
->
worldtrans
,
sx
,
sy
,
order
);
return
GdipScaleMatrix
(
&
graphics
->
worldtrans
,
sx
,
sy
,
order
);
}
}
...
...
dlls/gdiplus/metafile.c
View file @
271c2bd6
...
@@ -84,6 +84,13 @@ typedef struct EmfPlusRect
...
@@ -84,6 +84,13 @@ typedef struct EmfPlusRect
SHORT
Height
;
SHORT
Height
;
}
EmfPlusRect
;
}
EmfPlusRect
;
typedef
struct
EmfPlusScaleWorldTransform
{
EmfPlusRecordHeader
Header
;
REAL
Sx
;
REAL
Sy
;
}
EmfPlusScaleWorldTransform
;
static
GpStatus
METAFILE_AllocateRecord
(
GpMetafile
*
metafile
,
DWORD
size
,
void
**
result
)
static
GpStatus
METAFILE_AllocateRecord
(
GpMetafile
*
metafile
,
DWORD
size
,
void
**
result
)
{
{
DWORD
size_needed
;
DWORD
size_needed
;
...
@@ -555,6 +562,30 @@ GpStatus METAFILE_SetPageTransform(GpMetafile* metafile, GpUnit unit, REAL scale
...
@@ -555,6 +562,30 @@ GpStatus METAFILE_SetPageTransform(GpMetafile* metafile, GpUnit unit, REAL scale
return
Ok
;
return
Ok
;
}
}
GpStatus
METAFILE_ScaleWorldTransform
(
GpMetafile
*
metafile
,
REAL
sx
,
REAL
sy
,
MatrixOrder
order
)
{
if
(
metafile
->
metafile_type
==
MetafileTypeEmfPlusOnly
||
metafile
->
metafile_type
==
MetafileTypeEmfPlusDual
)
{
EmfPlusScaleWorldTransform
*
record
;
GpStatus
stat
;
stat
=
METAFILE_AllocateRecord
(
metafile
,
sizeof
(
EmfPlusScaleWorldTransform
),
(
void
**
)
&
record
);
if
(
stat
!=
Ok
)
return
stat
;
record
->
Header
.
Type
=
EmfPlusRecordTypeScaleWorldTransform
;
record
->
Header
.
Flags
=
(
order
==
MatrixOrderAppend
?
4
:
0
);
record
->
Sx
=
sx
;
record
->
Sy
=
sy
;
METAFILE_WriteRecords
(
metafile
);
}
return
Ok
;
}
GpStatus
METAFILE_ReleaseDC
(
GpMetafile
*
metafile
,
HDC
hdc
)
GpStatus
METAFILE_ReleaseDC
(
GpMetafile
*
metafile
,
HDC
hdc
)
{
{
if
(
hdc
!=
metafile
->
record_dc
)
if
(
hdc
!=
metafile
->
record_dc
)
...
...
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