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
7af2e97a
Commit
7af2e97a
authored
Jul 19, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Associate a brush with a pen.
parent
85b5df42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
brush.c
dlls/gdiplus/brush.c
+4
-0
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+3
-0
pen.c
dlls/gdiplus/pen.c
+6
-21
No files found.
dlls/gdiplus/brush.c
View file @
7af2e97a
...
...
@@ -30,6 +30,10 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB color, GpSolidFill **sf)
*
sf
=
GdipAlloc
(
sizeof
(
GpSolidFill
));
if
(
!*
sf
)
return
OutOfMemory
;
(
*
sf
)
->
brush
.
lb
.
lbStyle
=
BS_SOLID
;
(
*
sf
)
->
brush
.
lb
.
lbColor
=
col
;
(
*
sf
)
->
brush
.
lb
.
lbHatch
=
0
;
(
*
sf
)
->
brush
.
gdibrush
=
CreateSolidBrush
(
col
);
(
*
sf
)
->
brush
.
bt
=
BrushTypeSolidColor
;
(
*
sf
)
->
brush
.
color
=
col
;
...
...
dlls/gdiplus/gdiplus_private.h
View file @
7af2e97a
...
...
@@ -21,6 +21,7 @@
#include <math.h>
#include "windef.h"
#include "wingdi.h"
#include "gdiplus.h"
#define GP_DEFAULT_PENSTYLE (PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_FLAT | PS_JOIN_MITER)
...
...
@@ -54,6 +55,7 @@ struct GpPen{
GpLineJoin
join
;
REAL
miterlimit
;
GpDashStyle
dash
;
GpBrush
*
brush
;
};
struct
GpGraphics
{
...
...
@@ -69,6 +71,7 @@ struct GpBrush{
HBRUSH
gdibrush
;
GpBrushType
bt
;
COLORREF
color
;
LOGBRUSH
lb
;
};
struct
GpSolidFill
{
...
...
dlls/gdiplus/pen.c
View file @
7af2e97a
...
...
@@ -90,7 +90,6 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
GpStatus
WINGDIPAPI
GdipCreatePen1
(
ARGB
color
,
FLOAT
width
,
GpUnit
unit
,
GpPen
**
pen
)
{
LOGBRUSH
lb
;
GpPen
*
gp_pen
;
if
(
!
pen
)
...
...
@@ -107,14 +106,11 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, FLOAT width, GpUnit unit,
gp_pen
->
join
=
LineJoinMiter
;
gp_pen
->
miterlimit
=
10
.
0
;
gp_pen
->
dash
=
DashStyleSolid
;
lb
.
lbStyle
=
BS_SOLID
;
lb
.
lbColor
=
gp_pen
->
color
;
lb
.
lbHatch
=
0
;
GdipCreateSolidFill
(
color
,
(
GpSolidFill
**
)(
&
gp_pen
->
brush
));
if
((
gp_pen
->
unit
==
UnitWorld
)
||
(
gp_pen
->
unit
==
UnitPixel
))
{
gp_pen
->
gdipen
=
ExtCreatePen
(
gp_pen
->
style
,
(
INT
)
gp_pen
->
width
,
&
lb
,
0
,
NULL
);
gp_pen
->
gdipen
=
ExtCreatePen
(
gp_pen
->
style
,
(
INT
)
gp_pen
->
width
,
&
gp_pen
->
brush
->
lb
,
0
,
NULL
);
}
else
{
FIXME
(
"UnitWorld, UnitPixel only supported units
\n
"
);
GdipFree
(
gp_pen
);
...
...
@@ -131,6 +127,7 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
if
(
!
pen
)
return
InvalidParameter
;
DeleteObject
(
pen
->
gdipen
);
GdipDeleteBrush
(
pen
->
brush
);
GdipDeleteCustomLineCap
(
pen
->
customstart
);
GdipDeleteCustomLineCap
(
pen
->
customend
);
GdipFree
(
pen
);
...
...
@@ -182,8 +179,6 @@ GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* custom
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
pen
,
GpDashStyle
dash
)
{
LOGBRUSH
lb
;
if
(
!
pen
)
return
InvalidParameter
;
...
...
@@ -193,11 +188,7 @@ GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
PS_DASHDOTDOT
|
PS_NULL
|
PS_USERSTYLE
|
PS_INSIDEFRAME
);
pen
->
style
|=
gdip_to_gdi_dash
(
dash
);
lb
.
lbStyle
=
BS_SOLID
;
lb
.
lbColor
=
pen
->
color
;
lb
.
lbHatch
=
0
;
pen
->
gdipen
=
ExtCreatePen
(
pen
->
style
,
(
INT
)
pen
->
width
,
&
lb
,
0
,
NULL
);
pen
->
gdipen
=
ExtCreatePen
(
pen
->
style
,
(
INT
)
pen
->
width
,
&
pen
->
brush
->
lb
,
0
,
NULL
);
return
Ok
;
}
...
...
@@ -237,8 +228,6 @@ GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen *pen, GpLineCap start,
* Both kinds of miter joins clip if the angle is less than 11 degrees. */
GpStatus
WINGDIPAPI
GdipSetPenLineJoin
(
GpPen
*
pen
,
GpLineJoin
join
)
{
LOGBRUSH
lb
;
if
(
!
pen
)
return
InvalidParameter
;
DeleteObject
(
pen
->
gdipen
);
...
...
@@ -246,11 +235,7 @@ GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen *pen, GpLineJoin join)
pen
->
style
&=
~
(
PS_JOIN_ROUND
|
PS_JOIN_BEVEL
|
PS_JOIN_MITER
);
pen
->
style
|=
gdip_to_gdi_join
(
join
);
lb
.
lbStyle
=
BS_SOLID
;
lb
.
lbColor
=
pen
->
color
;
lb
.
lbHatch
=
0
;
pen
->
gdipen
=
ExtCreatePen
(
pen
->
style
,
(
INT
)
pen
->
width
,
&
lb
,
0
,
NULL
);
pen
->
gdipen
=
ExtCreatePen
(
pen
->
style
,
(
INT
)
pen
->
width
,
&
pen
->
brush
->
lb
,
0
,
NULL
);
return
Ok
;
}
...
...
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