Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jason Beetham
wine
Commits
118ce5de
Commit
118ce5de
authored
24 years ago
by
Sheri Steeves
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
EMR_SELECTOBJECT records stock objects with their id as the object
handle and the high bit set.
parent
c9315fe8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
graphics/enhmetafiledrv/objects.c
+53
-5
53 additions, 5 deletions
graphics/enhmetafiledrv/objects.c
with
53 additions
and
5 deletions
graphics/enhmetafiledrv/objects.c
+
53
−
5
View file @
118ce5de
...
...
@@ -104,10 +104,25 @@ static HBRUSH EMFDRV_BRUSH_SelectObject(DC *dc, HBRUSH hBrush )
EMRSELECTOBJECT
emr
;
DWORD
index
;
HBRUSH
hOldBrush
;
index
=
EMFDRV_CreateBrushIndirect
(
dc
,
hBrush
);
if
(
!
index
)
return
FALSE
;
/* If the object is a stock brush object, do not need to create it.
* See definitions in wingdi.h for range of stock brushes.
* We do however have to handle setting the higher order bit to
* designate that this is a stock object.
*/
if
(
hBrush
>=
FIRST_STOCK_HANDLE
&&
hBrush
<=
FIRST_STOCK_HANDLE
+
HOLLOW_BRUSH
)
{
DWORD
brush_index
=
hBrush
-
FIRST_STOCK_HANDLE
;
index
=
brush_index
|
0x80000000
;
}
else
{
index
=
EMFDRV_CreateBrushIndirect
(
dc
,
hBrush
);
}
if
(
!
index
)
return
FALSE
;
emr
.
emr
.
iType
=
EMR_SELECTOBJECT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ihObject
=
index
;
...
...
@@ -169,7 +184,24 @@ static HFONT EMFDRV_FONT_SelectObject( DC * dc, HFONT hFont )
DWORD
index
;
HFONT
hOldFont
;
index
=
EMFDRV_CreateFontIndirect
(
dc
,
hFont
);
/* If the object is a stock font object, do not need to create it.
* See definitions in wingdi.h for range of stock fonts.
* We do however have to handle setting the higher order bit to
* designate that this is a stock object.
*/
if
(
hFont
>=
STOCK_OEM_FIXED_FONT
&&
hFont
<=
STOCK_DEFAULT_GUI_FONT
&&
hFont
!=
STOCK_DEFAULT_PALETTE
)
{
DWORD
font_index
=
hFont
-
FIRST_STOCK_HANDLE
;
index
=
font_index
|
0x80000000
;
}
else
{
index
=
EMFDRV_CreateFontIndirect
(
dc
,
hFont
);
}
if
(
!
index
)
return
FALSE
;
emr
.
emr
.
iType
=
EMR_SELECTOBJECT
;
...
...
@@ -214,7 +246,23 @@ static HPEN EMFDRV_PEN_SelectObject(DC *dc, HPEN hPen )
DWORD
index
;
HFONT
hOldPen
;
index
=
EMFDRV_CreatePenIndirect
(
dc
,
hPen
);
/* If the object is a stock pen object, do not need to create it.
* See definitions in wingdi.h for range of stock pens.
* We do however have to handle setting the higher order bit to
* designate that this is a stock object.
*/
if
(
hPen
>=
STOCK_WHITE_PEN
&&
hPen
<=
STOCK_NULL_PEN
)
{
DWORD
pen_index
=
hPen
-
FIRST_STOCK_HANDLE
;
index
=
pen_index
|
0x80000000
;
}
else
{
index
=
EMFDRV_CreatePenIndirect
(
dc
,
hPen
);
}
if
(
!
index
)
return
FALSE
;
emr
.
emr
.
iType
=
EMR_SELECTOBJECT
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment