Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ed13120
Commit
7ed13120
authored
Feb 27, 2010
by
Dylan Smith
Committed by
Alexandre Julliard
Mar 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Make zooming affect all pictures.
parent
1f2575ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
34 deletions
+31
-34
richole.c
dlls/riched20/richole.c
+31
-34
No files found.
dlls/riched20/richole.c
View file @
7ed13120
...
...
@@ -1729,6 +1729,11 @@ void ME_GetOLEObjectSize(ME_Context *c, ME_Run *run, SIZE *pSize)
if
(
run
->
ole_obj
->
sizel
.
cx
!=
0
||
run
->
ole_obj
->
sizel
.
cy
!=
0
)
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
pSize
);
if
(
c
->
editor
->
nZoomNumerator
!=
0
)
{
pSize
->
cx
=
MulDiv
(
pSize
->
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
pSize
->
cy
=
MulDiv
(
pSize
->
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
return
;
}
...
...
@@ -1819,53 +1824,45 @@ 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
);
if
(
!
has_size
&&
c
->
editor
->
nZoomNumerator
==
0
)
if
(
has_size
)
{
sz
.
cx
=
dibsect
.
dsBm
.
bmWidth
;
sz
.
cy
=
dibsect
.
dsBm
.
bmHeight
;
BitBlt
(
c
->
hDC
,
x
,
y
-
dibsect
.
dsBm
.
bmHeight
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
hMemDC
,
0
,
0
,
SRCCOPY
);
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
}
else
{
sz
.
cx
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
c
->
dpi
.
cx
,
96
);
sz
.
cy
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
c
->
dpi
.
cy
,
96
);
}
if
(
c
->
editor
->
nZoomNumerator
!=
0
)
{
sz
.
cx
=
MulDiv
(
sz
.
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
sz
.
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
else
if
(
sz
.
cx
==
dibsect
.
dsBm
.
bmWidth
&&
sz
.
cy
==
dibsect
.
dsBm
.
bmHeight
)
{
if
(
has_size
)
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
}
else
{
sz
.
cx
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
BitBlt
(
c
->
hDC
,
x
,
y
-
sz
.
cy
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
hMemDC
,
0
,
0
,
SRCCOPY
);
}
else
{
StretchBlt
(
c
->
hDC
,
x
,
y
-
sz
.
cy
,
sz
.
cx
,
sz
.
cy
,
hMemDC
,
0
,
0
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
SRCCOPY
);
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
);
if
(
!
has_size
&&
c
->
editor
->
nZoomNumerator
==
0
)
if
(
has_size
)
{
sz
.
cy
=
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
;
sz
.
cx
=
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
;
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
}
else
{
sz
.
cy
=
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
c
->
dpi
.
cx
,
96
);
sz
.
cx
=
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
c
->
dpi
.
cy
,
96
);
}
else
if
(
c
->
editor
->
nZoomNumerator
!=
0
)
{
if
(
has_size
)
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
}
else
{
sz
.
cy
=
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cx
=
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
sz
.
cx
=
MulDiv
(
sz
.
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
sz
.
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
{
RECT
rc
;
...
...
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