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
f5c117fb
Commit
f5c117fb
authored
Jul 05, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Introduce NtGdiCreatePen.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4590f6fb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
20 deletions
+24
-20
objects.c
dlls/gdi32/objects.c
+9
-0
pen.c
dlls/gdi32/pen.c
+14
-19
ntgdi.h
include/ntgdi.h
+1
-1
No files found.
dlls/gdi32/objects.c
View file @
f5c117fb
...
...
@@ -177,3 +177,12 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN *pen )
{
return
CreatePen
(
pen
->
lopnStyle
,
pen
->
lopnWidth
.
x
,
pen
->
lopnColor
);
}
/***********************************************************************
* CreatePen (GDI32.@)
*/
HPEN
WINAPI
CreatePen
(
INT
style
,
INT
width
,
COLORREF
color
)
{
if
(
style
<
0
||
style
>
PS_INSIDEFRAME
)
style
=
PS_SOLID
;
return
NtGdiCreatePen
(
style
,
width
,
color
,
NULL
);
}
dlls/gdi32/pen.c
View file @
f5c117fb
...
...
@@ -52,27 +52,15 @@ static const struct gdi_obj_funcs pen_funcs =
/***********************************************************************
*
CreatePen (GDI32
.@)
*
NtGdiCreatePen (win32u
.@)
*/
HPEN
WINAPI
CreatePen
(
INT
style
,
INT
width
,
COLORREF
color
)
HPEN
WINAPI
NtGdiCreatePen
(
INT
style
,
INT
width
,
COLORREF
color
,
HBRUSH
brush
)
{
PENOBJ
*
penPtr
;
HPEN
hpen
;
TRACE
(
"%d %d %06x
\n
"
,
style
,
width
,
color
);
if
(
style
==
PS_NULL
)
{
hpen
=
GetStockObject
(
NULL_PEN
);
if
(
hpen
)
return
hpen
;
}
if
(
!
(
penPtr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
penPtr
)
)))
return
0
;
penPtr
->
logpen
.
elpPenStyle
=
style
;
penPtr
->
logpen
.
elpWidth
=
abs
(
width
);
penPtr
->
logpen
.
elpColor
=
color
;
penPtr
->
logpen
.
elpBrushStyle
=
BS_SOLID
;
if
(
brush
)
FIXME
(
"brush not supported
\n
"
);
switch
(
style
)
{
...
...
@@ -84,14 +72,21 @@ HPEN WINAPI CreatePen( INT style, INT width, COLORREF color )
case
PS_INSIDEFRAME
:
break
;
case
PS_NULL
:
penPtr
->
logpen
.
elpWidth
=
1
;
penPtr
->
logpen
.
elpColor
=
0
;
if
((
hpen
=
GetStockObject
(
NULL_PEN
)))
return
hpen
;
width
=
1
;
color
=
0
;
break
;
default:
penPtr
->
logpen
.
elpPenStyle
=
PS_SOLID
;
break
;
return
0
;
}
if
(
!
(
penPtr
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
penPtr
)
)))
return
0
;
penPtr
->
logpen
.
elpPenStyle
=
style
;
penPtr
->
logpen
.
elpWidth
=
abs
(
width
);
penPtr
->
logpen
.
elpColor
=
color
;
penPtr
->
logpen
.
elpBrushStyle
=
BS_SOLID
;
if
(
!
(
hpen
=
alloc_gdi_handle
(
&
penPtr
->
obj
,
OBJ_PEN
,
&
pen_funcs
)))
HeapFree
(
GetProcessHeap
(),
0
,
penPtr
);
return
hpen
;
...
...
include/ntgdi.h
View file @
f5c117fb
...
...
@@ -68,7 +68,7 @@ HFONT WINAPI NtGdiHfontCreate( const ENUMLOGFONTEXDVW *enumex, ULONG unk2, UL
ULONG
unk4
,
void
*
data
);
HBRUSH
WINAPI
NtGdiCreateDIBBrush
(
const
void
*
data
,
UINT
coloruse
);
HBRUSH
WINAPI
NtGdiCreatePatternBrushInternal
(
HBITMAP
hbitmap
,
BOOL
pen
);
HPEN
WINAPI
NtGdiCreatePen
(
INT
style
,
INT
width
,
COLORREF
color
);
HPEN
WINAPI
NtGdiCreatePen
(
INT
style
,
INT
width
,
COLORREF
color
,
HBRUSH
brush
);
HRGN
WINAPI
NtGdiCreateRectRgn
(
INT
left
,
INT
top
,
INT
right
,
INT
bottom
);
HRGN
WINAPI
NtGdiCreateRoundRectRgn
(
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
INT
ellipse_width
,
INT
ellipse_height
);
...
...
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