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
00b48f1d
Commit
00b48f1d
authored
Jan 27, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Handle the zoom in OLE objects.
parent
00de7751
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
4 deletions
+30
-4
richole.c
dlls/riched20/richole.c
+30
-4
No files found.
dlls/riched20/richole.c
View file @
00b48f1d
...
...
@@ -603,6 +603,11 @@ void ME_GetOLEObjectSize(ME_TextEditor *editor, ME_Run *run, SIZE *pSize)
break
;
}
IDataObject_Release
(
ido
);
if
(
editor
->
nZoomNumerator
!=
0
)
{
pSize
->
cx
=
MulDiv
(
pSize
->
cx
,
editor
->
nZoomNumerator
,
editor
->
nZoomDenominator
);
pSize
->
cy
=
MulDiv
(
pSize
->
cy
,
editor
->
nZoomNumerator
,
editor
->
nZoomDenominator
);
}
}
void
ME_DrawOLE
(
ME_Context
*
c
,
int
x
,
int
y
,
ME_Run
*
run
,
...
...
@@ -645,16 +650,37 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
GetObjectW
(
stgm
.
u
.
hBitmap
,
sizeof
(
dibsect
),
&
dibsect
);
hMemDC
=
CreateCompatibleDC
(
c
->
hDC
);
SelectObject
(
hMemDC
,
stgm
.
u
.
hBitmap
);
BitBlt
(
c
->
hDC
,
x
,
y
-
dibsect
.
dsBm
.
bmHeight
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
hMemDC
,
0
,
0
,
SRCCOPY
);
DeleteDC
(
hMemDC
);
if
(
c
->
editor
->
nZoomNumerator
==
0
)
BitBlt
(
c
->
hDC
,
x
,
y
-
dibsect
.
dsBm
.
bmHeight
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
hMemDC
,
0
,
0
,
SRCCOPY
);
else
{
int
w
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
int
h
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
StretchBlt
(
c
->
hDC
,
x
,
y
-
h
,
w
,
h
,
hMemDC
,
0
,
0
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
SRCCOPY
);
}
if
(
!
stgm
.
pUnkForRelease
)
DeleteObject
(
stgm
.
u
.
hBitmap
);
break
;
case
TYMED_ENHMF
:
GetEnhMetaFileHeader
(
stgm
.
u
.
hEnhMetaFile
,
sizeof
(
emh
),
&
emh
);
rc
.
left
=
x
;
rc
.
top
=
y
-
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
);
rc
.
right
=
x
+
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
;
rc
.
bottom
=
y
;
if
(
c
->
editor
->
nZoomNumerator
==
0
)
{
rc
.
top
=
y
-
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
);
rc
.
right
=
x
+
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
);
}
else
{
rc
.
top
=
y
-
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
rc
.
right
=
x
+
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
PlayEnhMetaFile
(
c
->
hDC
,
stgm
.
u
.
hEnhMetaFile
,
&
rc
);
if
(
!
stgm
.
pUnkForRelease
)
DeleteEnhMetaFile
(
stgm
.
u
.
hEnhMetaFile
);
break
;
...
...
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