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
9aa55562
Commit
9aa55562
authored
Jan 27, 2006
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Add test case for creating pens, make it pass under Wine for
cosmetic pens.
parent
70057595
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
pen.c
dlls/gdi/pen.c
+30
-6
gdiobj.c
dlls/gdi/tests/gdiobj.c
+0
-0
No files found.
dlls/gdi/pen.c
View file @
9aa55562
...
...
@@ -21,6 +21,7 @@
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "windef.h"
...
...
@@ -84,9 +85,21 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
if
(
!
(
penPtr
=
GDI_AllocObject
(
sizeof
(
PENOBJ
),
PEN_MAGIC
,
(
HGDIOBJ
*
)
&
hpen
,
&
pen_funcs
)))
return
0
;
penPtr
->
logpen
.
lopnStyle
=
pen
->
lopnStyle
;
penPtr
->
logpen
.
lopnWidth
=
pen
->
lopnWidth
;
penPtr
->
logpen
.
lopnColor
=
pen
->
lopnColor
;
if
(
pen
->
lopnStyle
==
PS_USERSTYLE
||
pen
->
lopnStyle
==
PS_ALTERNATE
)
penPtr
->
logpen
.
lopnStyle
=
PS_SOLID
;
else
penPtr
->
logpen
.
lopnStyle
=
pen
->
lopnStyle
;
penPtr
->
logpen
.
lopnWidth
.
y
=
0
;
if
(
pen
->
lopnStyle
==
PS_NULL
)
{
penPtr
->
logpen
.
lopnWidth
.
x
=
1
;
penPtr
->
logpen
.
lopnColor
=
RGB
(
0
,
0
,
0
);
}
else
{
penPtr
->
logpen
.
lopnWidth
.
x
=
abs
(
pen
->
lopnWidth
.
x
);
penPtr
->
logpen
.
lopnColor
=
pen
->
lopnColor
;
}
GDI_ReleaseObj
(
hpen
);
return
hpen
;
}
...
...
@@ -174,7 +187,18 @@ static INT PEN_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
if
(
!
buffer
)
return
sizeof
(
pen
->
logpen
);
if
(
count
>
sizeof
(
pen
->
logpen
))
count
=
sizeof
(
pen
->
logpen
);
memcpy
(
buffer
,
&
pen
->
logpen
,
count
);
return
count
;
switch
(
count
)
{
case
sizeof
(
EXTLOGPEN
):
FIXME
(
"extended pens not supported
\n
"
);
return
0
;
case
sizeof
(
LOGPEN
):
memcpy
(
buffer
,
&
pen
->
logpen
,
sizeof
(
LOGPEN
)
);
return
sizeof
(
LOGPEN
);
default:
break
;
}
return
0
;
}
dlls/gdi/tests/gdiobj.c
View file @
9aa55562
This diff is collapsed.
Click to expand it.
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