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
f4bf9dee
Commit
f4bf9dee
authored
Sep 12, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LOGBRUSH.lbHatch must be a ULONG_PTR since it can contain a handle.
parent
92a51495
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
16 deletions
+28
-16
brush.c
dlls/gdi/brush.c
+5
-5
enhmetafile.c
dlls/gdi/enhmetafile.c
+5
-2
objects.c
dlls/gdi/enhmfdrv/objects.c
+3
-1
metafile.c
dlls/gdi/tests/metafile.c
+3
-3
wingdi.h
include/wingdi.h
+12
-5
No files found.
dlls/gdi/brush.c
View file @
f4bf9dee
...
...
@@ -119,14 +119,14 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
ptr
->
logbrush
.
lbStyle
=
BS_PATTERN
;
/* fall through */
case
BS_PATTERN
:
ptr
->
logbrush
.
lbHatch
=
(
LONG
)
BITMAP_CopyBitmap
(
(
HBITMAP
)
ptr
->
logbrush
.
lbHatch
);
ptr
->
logbrush
.
lbHatch
=
(
ULONG_PTR
)
BITMAP_CopyBitmap
(
(
HBITMAP
)
ptr
->
logbrush
.
lbHatch
);
if
(
!
ptr
->
logbrush
.
lbHatch
)
goto
error
;
break
;
case
BS_DIBPATTERNPT
:
ptr
->
logbrush
.
lbStyle
=
BS_DIBPATTERN
;
ptr
->
logbrush
.
lbHatch
=
(
LONG
)
dib_copy
(
(
BITMAPINFO
*
)
ptr
->
logbrush
.
lbHatch
,
ptr
->
logbrush
.
lbColor
);
ptr
->
logbrush
.
lbHatch
=
(
ULONG_PTR
)
dib_copy
(
(
BITMAPINFO
*
)
ptr
->
logbrush
.
lbHatch
,
ptr
->
logbrush
.
lbColor
);
if
(
!
ptr
->
logbrush
.
lbHatch
)
goto
error
;
break
;
...
...
@@ -247,7 +247,7 @@ HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
logbrush
.
lbStyle
=
BS_DIBPATTERN
;
logbrush
.
lbColor
=
coloruse
;
logbrush
.
lbHatch
=
(
LONG
)
hbitmap
;
logbrush
.
lbHatch
=
(
ULONG_PTR
)
hbitmap
;
return
CreateBrushIndirect
(
&
logbrush
);
}
...
...
@@ -284,7 +284,7 @@ HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
logbrush
.
lbStyle
=
BS_DIBPATTERNPT
;
logbrush
.
lbColor
=
coloruse
;
logbrush
.
lbHatch
=
(
LONG
)
data
;
logbrush
.
lbHatch
=
(
ULONG_PTR
)
data
;
return
CreateBrushIndirect
(
&
logbrush
);
}
...
...
dlls/gdi/enhmetafile.c
View file @
f4bf9dee
...
...
@@ -873,8 +873,11 @@ BOOL WINAPI PlayEnhMetaFileRecord(
case
EMR_CREATEBRUSHINDIRECT
:
{
PEMRCREATEBRUSHINDIRECT
pBrush
=
(
PEMRCREATEBRUSHINDIRECT
)
mr
;
(
handletable
->
objectHandle
)[
pBrush
->
ihBrush
]
=
CreateBrushIndirect
(
&
pBrush
->
lb
);
LOGBRUSH
brush
;
brush
.
lbStyle
=
pBrush
->
lb
.
lbStyle
;
brush
.
lbColor
=
pBrush
->
lb
.
lbColor
;
brush
.
lbHatch
=
pBrush
->
lb
.
lbHatch
;
(
handletable
->
objectHandle
)[
pBrush
->
ihBrush
]
=
CreateBrushIndirect
(
&
brush
);
break
;
}
case
EMR_EXTCREATEFONTINDIRECTW
:
...
...
dlls/gdi/enhmfdrv/objects.c
View file @
f4bf9dee
...
...
@@ -155,7 +155,9 @@ DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush )
emr
.
emr
.
iType
=
EMR_CREATEBRUSHINDIRECT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
emr
.
ihBrush
=
index
=
EMFDRV_AddHandle
(
dev
,
hBrush
);
emr
.
lb
=
logbrush
;
emr
.
lb
.
lbStyle
=
logbrush
.
lbStyle
;
emr
.
lb
.
lbColor
=
logbrush
.
lbColor
;
emr
.
lb
.
lbHatch
=
logbrush
.
lbHatch
;
if
(
!
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
))
index
=
0
;
...
...
dlls/gdi/tests/metafile.c
View file @
f4bf9dee
...
...
@@ -412,8 +412,8 @@ static void test_mf_PatternBrush(void)
orig_lb
->
lbStyle
=
BS_PATTERN
;
orig_lb
->
lbColor
=
RGB
(
0
,
0
,
0
);
orig_lb
->
lbHatch
=
(
INT
)
CreateBitmap
(
8
,
8
,
1
,
1
,
SAMPLE_PATTERN_BRUSH
);
ok
((
HBITMAP
*
)
orig_lb
->
lbHatch
!=
NULL
,
"CreateBitmap error %ld.
\n
"
,
GetLastError
());
orig_lb
->
lbHatch
=
(
ULONG_PTR
)
CreateBitmap
(
8
,
8
,
1
,
1
,
SAMPLE_PATTERN_BRUSH
);
ok
((
HBITMAP
)
orig_lb
->
lbHatch
!=
NULL
,
"CreateBitmap error %ld.
\n
"
,
GetLastError
());
hBrush
=
CreateBrushIndirect
(
orig_lb
);
ok
(
hBrush
!=
0
,
"CreateBrushIndirect error %ld
\n
"
,
GetLastError
());
...
...
@@ -437,7 +437,7 @@ static void test_mf_PatternBrush(void)
ok
(
ret
,
"DeleteMetaFile error %ld
\n
"
,
GetLastError
());
ret
=
DeleteObject
(
hBrush
);
ok
(
ret
,
"DeleteObject(HBRUSH) error %ld
\n
"
,
GetLastError
());
ret
=
DeleteObject
((
HBITMAP
*
)
orig_lb
->
lbHatch
);
ret
=
DeleteObject
((
HBITMAP
)
orig_lb
->
lbHatch
);
ok
(
ret
,
"DeleteObject(HBITMAP) error %ld
\n
"
,
GetLastError
());
HeapFree
(
GetProcessHeap
(),
0
,
orig_lb
);
...
...
include/wingdi.h
View file @
f4bf9dee
...
...
@@ -478,11 +478,18 @@ typedef struct
typedef
struct
{
UINT
lbStyle
;
UINT
lbStyle
;
COLORREF
lbColor
;
INT
lbHatch
;
ULONG_PTR
lbHatch
;
}
LOGBRUSH
,
*
PLOGBRUSH
,
*
LPLOGBRUSH
;
typedef
struct
{
UINT
lbStyle
;
COLORREF
lbColor
;
ULONG
lbHatch
;
}
LOGBRUSH32
,
*
PLOGBRUSH32
,
*
LPLOGBRUSH32
;
typedef
LOGBRUSH
PATTERN
,
*
PPATTERN
,
*
LPPATTERN
;
...
...
@@ -2117,9 +2124,9 @@ typedef struct {
}
EMRBITBLT
,
*
PEMRBITBLT
;
typedef
struct
{
EMR
emr
;
DWORD
ihBrush
;
LOGBRUSH
lb
;
EMR
emr
;
DWORD
ihBrush
;
LOGBRUSH
32
lb
;
}
EMRCREATEBRUSHINDIRECT
,
*
PEMRCREATEBRUSHINDIRECT
;
typedef
struct
{
...
...
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