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
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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
29 deletions
+26
-29
richole.c
dlls/riched20/richole.c
+26
-29
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)
...
@@ -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
)
if
(
run
->
ole_obj
->
sizel
.
cx
!=
0
||
run
->
ole_obj
->
sizel
.
cy
!=
0
)
{
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
pSize
);
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
;
return
;
}
}
...
@@ -1819,53 +1824,45 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
...
@@ -1819,53 +1824,45 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
GetObjectW
(
stgm
.
u
.
hBitmap
,
sizeof
(
dibsect
),
&
dibsect
);
GetObjectW
(
stgm
.
u
.
hBitmap
,
sizeof
(
dibsect
),
&
dibsect
);
hMemDC
=
CreateCompatibleDC
(
c
->
hDC
);
hMemDC
=
CreateCompatibleDC
(
c
->
hDC
);
SelectObject
(
hMemDC
,
stgm
.
u
.
hBitmap
);
SelectObject
(
hMemDC
,
stgm
.
u
.
hBitmap
);
if
(
!
has_size
&&
c
->
editor
->
nZoomNumerator
==
0
)
{
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
);
}
else
{
if
(
has_size
)
if
(
has_size
)
{
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
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
);
}
}
else
if
(
c
->
editor
->
nZoomNumerator
!=
0
)
{
{
sz
.
cx
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
sz
.
cx
=
MulDiv
(
sz
.
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
sz
.
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
}
if
(
sz
.
cx
==
dibsect
.
dsBm
.
bmWidth
&&
sz
.
cy
==
dibsect
.
dsBm
.
bmHeight
)
{
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
,
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
);
if
(
!
stgm
.
pUnkForRelease
)
DeleteObject
(
stgm
.
u
.
hBitmap
);
break
;
break
;
case
TYMED_ENHMF
:
case
TYMED_ENHMF
:
GetEnhMetaFileHeader
(
stgm
.
u
.
hEnhMetaFile
,
sizeof
(
emh
),
&
emh
);
GetEnhMetaFileHeader
(
stgm
.
u
.
hEnhMetaFile
,
sizeof
(
emh
),
&
emh
);
if
(
!
has_size
&&
c
->
editor
->
nZoomNumerator
==
0
)
{
sz
.
cy
=
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
;
sz
.
cx
=
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
;
}
else
{
if
(
has_size
)
if
(
has_size
)
{
{
convert_sizel
(
c
,
&
run
->
ole_obj
->
sizel
,
&
sz
);
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
)
{
{
sz
.
cy
=
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
sz
.
cx
=
MulDiv
(
sz
.
cx
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cy
=
MulDiv
(
sz
.
cy
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
sz
.
cx
=
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
}
}
{
{
RECT
rc
;
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