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
25115380
Commit
25115380
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: Invert graphics when they are under the selection.
parent
d014db68
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
richole.c
dlls/riched20/richole.c
+23
-10
No files found.
dlls/riched20/richole.c
View file @
25115380
...
@@ -619,7 +619,7 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
...
@@ -619,7 +619,7 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
DIBSECTION
dibsect
;
DIBSECTION
dibsect
;
ENHMETAHEADER
emh
;
ENHMETAHEADER
emh
;
HDC
hMemDC
;
HDC
hMemDC
;
RECT
rc
;
SIZE
sz
;
assert
(
run
->
nFlags
&
MERF_GRAPHICS
);
assert
(
run
->
nFlags
&
MERF_GRAPHICS
);
assert
(
run
->
ole_obj
);
assert
(
run
->
ole_obj
);
...
@@ -651,43 +651,56 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
...
@@ -651,43 +651,56 @@ void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run *run,
hMemDC
=
CreateCompatibleDC
(
c
->
hDC
);
hMemDC
=
CreateCompatibleDC
(
c
->
hDC
);
SelectObject
(
hMemDC
,
stgm
.
u
.
hBitmap
);
SelectObject
(
hMemDC
,
stgm
.
u
.
hBitmap
);
if
(
c
->
editor
->
nZoomNumerator
==
0
)
if
(
c
->
editor
->
nZoomNumerator
==
0
)
{
sz
.
cx
=
dibsect
.
dsBm
.
bmWidth
;
sz
.
cy
=
dibsect
.
dsBm
.
bmHeight
;
BitBlt
(
c
->
hDC
,
x
,
y
-
dibsect
.
dsBm
.
bmHeight
,
BitBlt
(
c
->
hDC
,
x
,
y
-
dibsect
.
dsBm
.
bmHeight
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
dibsect
.
dsBm
.
bmWidth
,
dibsect
.
dsBm
.
bmHeight
,
hMemDC
,
0
,
0
,
SRCCOPY
);
hMemDC
,
0
,
0
,
SRCCOPY
);
}
else
else
{
{
int
w
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
sz
.
cy
=
MulDiv
(
dibsect
.
dsBm
.
bmWidth
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
int
h
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
sz
.
cx
=
MulDiv
(
dibsect
.
dsBm
.
bmHeight
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
StretchBlt
(
c
->
hDC
,
x
,
y
-
h
,
w
,
h
,
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
);
rc
.
left
=
x
;
rc
.
bottom
=
y
;
if
(
c
->
editor
->
nZoomNumerator
==
0
)
if
(
c
->
editor
->
nZoomNumerator
==
0
)
{
{
rc
.
top
=
y
-
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
)
;
sz
.
cy
=
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
;
rc
.
right
=
x
+
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
)
;
sz
.
cx
=
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
;
}
}
else
else
{
{
rc
.
top
=
y
-
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
sz
.
cy
=
MulDiv
(
emh
.
rclBounds
.
bottom
-
emh
.
rclBounds
.
top
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
rc
.
right
=
x
+
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
sz
.
cx
=
MulDiv
(
emh
.
rclBounds
.
right
-
emh
.
rclBounds
.
left
,
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
c
->
editor
->
nZoomNumerator
,
c
->
editor
->
nZoomDenominator
);
}
}
{
RECT
rc
;
rc
.
left
=
x
;
rc
.
top
=
y
-
sz
.
cy
;
rc
.
right
=
x
+
sz
.
cx
;
rc
.
bottom
=
y
;
PlayEnhMetaFile
(
c
->
hDC
,
stgm
.
u
.
hEnhMetaFile
,
&
rc
);
PlayEnhMetaFile
(
c
->
hDC
,
stgm
.
u
.
hEnhMetaFile
,
&
rc
);
}
if
(
!
stgm
.
pUnkForRelease
)
DeleteEnhMetaFile
(
stgm
.
u
.
hEnhMetaFile
);
if
(
!
stgm
.
pUnkForRelease
)
DeleteEnhMetaFile
(
stgm
.
u
.
hEnhMetaFile
);
break
;
break
;
default:
default:
FIXME
(
"Unsupported tymed %d
\n
"
,
stgm
.
tymed
);
FIXME
(
"Unsupported tymed %d
\n
"
,
stgm
.
tymed
);
selected
=
FALSE
;
break
;
break
;
}
}
if
(
selected
&&
!
c
->
editor
->
bHideSelection
)
PatBlt
(
c
->
hDC
,
x
,
y
-
sz
.
cy
,
sz
.
cx
,
sz
.
cy
,
DSTINVERT
);
IDataObject_Release
(
ido
);
IDataObject_Release
(
ido
);
}
}
...
...
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