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
0a81a346
Commit
0a81a346
authored
Nov 07, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Avoid GdipCloneMatrix calls for the graphics transformation matrix.
parent
250ce222
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
96 deletions
+49
-96
font.c
dlls/gdiplus/font.c
+4
-5
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+5
-5
graphics.c
dlls/gdiplus/graphics.c
+40
-86
No files found.
dlls/gdiplus/font.c
View file @
0a81a346
...
...
@@ -455,7 +455,7 @@ GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics,
GpStatus
WINGDIPAPI
GdipGetLogFontW
(
GpFont
*
font
,
GpGraphics
*
graphics
,
LOGFONTW
*
lf
)
{
REAL
angle
,
rel_height
,
height
;
GpMatrix
*
matrix
;
GpMatrix
matrix
;
GpPointF
pt
[
3
];
TRACE
(
"(%p, %p, %p)
\n
"
,
font
,
graphics
,
lf
);
...
...
@@ -463,13 +463,13 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW
if
(
!
font
||
!
graphics
||
!
lf
)
return
InvalidParameter
;
GdipCloneMatrix
(
graphics
->
worldtrans
,
&
matrix
)
;
matrix
=
graphics
->
worldtrans
;
if
(
font
->
unit
==
UnitPixel
)
{
height
=
units_to_pixels
(
font
->
emSize
,
graphics
->
unit
,
graphics
->
yres
);
if
(
graphics
->
unit
!=
UnitDisplay
)
GdipScaleMatrix
(
matrix
,
graphics
->
scale
,
graphics
->
scale
,
MatrixOrderAppend
);
GdipScaleMatrix
(
&
matrix
,
graphics
->
scale
,
graphics
->
scale
,
MatrixOrderAppend
);
}
else
{
...
...
@@ -485,11 +485,10 @@ GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics, LOGFONTW
pt
[
1
].
Y
=
0
.
0
;
pt
[
2
].
X
=
0
.
0
;
pt
[
2
].
Y
=
1
.
0
;
GdipTransformMatrixPoints
(
matrix
,
pt
,
3
);
GdipTransformMatrixPoints
(
&
matrix
,
pt
,
3
);
angle
=
-
gdiplus_atan2
((
pt
[
1
].
Y
-
pt
[
0
].
Y
),
(
pt
[
1
].
X
-
pt
[
0
].
X
));
rel_height
=
sqrt
((
pt
[
2
].
Y
-
pt
[
0
].
Y
)
*
(
pt
[
2
].
Y
-
pt
[
0
].
Y
)
+
(
pt
[
2
].
X
-
pt
[
0
].
X
)
*
(
pt
[
2
].
X
-
pt
[
0
].
X
));
GdipDeleteMatrix
(
matrix
);
lf
->
lfHeight
=
-
gdip_round
(
height
*
rel_height
);
lf
->
lfWidth
=
0
;
...
...
dlls/gdiplus/gdiplus_private.h
View file @
0a81a346
...
...
@@ -125,6 +125,10 @@ extern GpStatus convert_pixels(INT width, INT height,
INT
dst_stride
,
BYTE
*
dst_bits
,
PixelFormat
dst_format
,
INT
src_stride
,
const
BYTE
*
src_bits
,
PixelFormat
src_format
,
ColorPalette
*
palette
)
DECLSPEC_HIDDEN
;
struct
GpMatrix
{
REAL
matrix
[
6
];
};
struct
GpPen
{
UINT
style
;
GpUnit
unit
;
...
...
@@ -158,7 +162,7 @@ struct GpGraphics{
GpUnit
unit
;
/* page unit */
REAL
scale
;
/* page scale */
REAL
xres
,
yres
;
GpMatrix
*
worldtrans
;
/* world transform */
GpMatrix
worldtrans
;
/* world transform */
BOOL
busy
;
/* hdc handle obtained by GdipGetDC */
GpRegion
*
clip
;
UINT
textcontrast
;
/* not used yet. get/set only */
...
...
@@ -240,10 +244,6 @@ struct GpPath{
INT
datalen
;
/* size of the arrays in pathdata */
};
struct
GpMatrix
{
REAL
matrix
[
6
];
};
struct
GpPathIterator
{
GpPathData
pathdata
;
INT
subpath_pos
;
/* for NextSubpath methods */
...
...
dlls/gdiplus/graphics.c
View file @
0a81a346
This diff is collapsed.
Click to expand it.
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