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
a2a94a49
Commit
a2a94a49
authored
Jan 10, 2009
by
Chris Wulff
Committed by
Alexandre Julliard
Jan 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Partial implementation of GdipCreateHatchBrush.
parent
f9f2e911
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
141 additions
and
1 deletion
+141
-1
brush.c
dlls/gdiplus/brush.c
+69
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+7
-0
gdiplusenums.h
include/gdiplusenums.h
+62
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+2
-0
No files found.
dlls/gdiplus/brush.c
View file @
a2a94a49
...
@@ -53,6 +53,14 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
...
@@ -53,6 +53,14 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
(
*
clone
)
->
gdibrush
=
CreateBrushIndirect
(
&
(
*
clone
)
->
lb
);
(
*
clone
)
->
gdibrush
=
CreateBrushIndirect
(
&
(
*
clone
)
->
lb
);
break
;
break
;
case
BrushTypeHatchFill
:
*
clone
=
GdipAlloc
(
sizeof
(
GpHatch
));
if
(
!*
clone
)
return
OutOfMemory
;
memcpy
(
*
clone
,
brush
,
sizeof
(
GpHatch
));
(
*
clone
)
->
gdibrush
=
CreateBrushIndirect
(
&
(
*
clone
)
->
lb
);
break
;
case
BrushTypePathGradient
:{
case
BrushTypePathGradient
:{
GpPathGradient
*
src
,
*
dest
;
GpPathGradient
*
src
,
*
dest
;
INT
count
;
INT
count
;
...
@@ -124,6 +132,67 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
...
@@ -124,6 +132,67 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone)
return
Ok
;
return
Ok
;
}
}
static
LONG
HatchStyleToHatch
(
HatchStyle
hatchstyle
)
{
switch
(
hatchstyle
)
{
case
HatchStyleHorizontal
:
return
HS_HORIZONTAL
;
case
HatchStyleVertical
:
return
HS_VERTICAL
;
case
HatchStyleForwardDiagonal
:
return
HS_FDIAGONAL
;
case
HatchStyleBackwardDiagonal
:
return
HS_BDIAGONAL
;
case
HatchStyleCross
:
return
HS_CROSS
;
case
HatchStyleDiagonalCross
:
return
HS_DIAGCROSS
;
default:
return
0
;
}
}
/******************************************************************************
* GdipCreateHatchBrush [GDIPLUS.@]
*/
GpStatus
WINGDIAPI
GdipCreateHatchBrush
(
HatchStyle
hatchstyle
,
ARGB
forecol
,
ARGB
backcol
,
GpHatch
**
brush
)
{
COLORREF
fgcol
=
ARGB2COLORREF
(
forecol
);
TRACE
(
"(%d, %d, %d, %p)
\n
"
,
hatchstyle
,
forecol
,
backcol
,
brush
);
if
(
!
brush
)
return
InvalidParameter
;
*
brush
=
GdipAlloc
(
sizeof
(
GpHatch
));
if
(
!*
brush
)
return
OutOfMemory
;
switch
(
hatchstyle
)
{
case
HatchStyleHorizontal
:
case
HatchStyleVertical
:
case
HatchStyleForwardDiagonal
:
case
HatchStyleBackwardDiagonal
:
case
HatchStyleCross
:
case
HatchStyleDiagonalCross
:
/* Brushes that map to BS_HATCHED */
(
*
brush
)
->
brush
.
lb
.
lbStyle
=
BS_HATCHED
;
(
*
brush
)
->
brush
.
lb
.
lbColor
=
fgcol
;
(
*
brush
)
->
brush
.
lb
.
lbHatch
=
HatchStyleToHatch
(
hatchstyle
);
break
;
default:
FIXME
(
"Unimplemented hatch style %d
\n
"
,
hatchstyle
);
(
*
brush
)
->
brush
.
lb
.
lbStyle
=
BS_SOLID
;
(
*
brush
)
->
brush
.
lb
.
lbColor
=
fgcol
;
(
*
brush
)
->
brush
.
lb
.
lbHatch
=
0
;
break
;
}
(
*
brush
)
->
brush
.
gdibrush
=
CreateBrushIndirect
(
&
(
*
brush
)
->
brush
.
lb
);
(
*
brush
)
->
brush
.
bt
=
BrushTypeHatchFill
;
(
*
brush
)
->
forecol
=
forecol
;
(
*
brush
)
->
backcol
=
backcol
;
(
*
brush
)
->
hatchstyle
=
hatchstyle
;
return
Ok
;
}
/******************************************************************************
/******************************************************************************
* GdipCreateLineBrush [GDIPLUS.@]
* GdipCreateLineBrush [GDIPLUS.@]
*/
*/
...
...
dlls/gdiplus/gdiplus.spec
View file @
a2a94a49
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
@ stdcall GdipCreateHBITMAPFromBitmap(ptr ptr long)
@ stdcall GdipCreateHBITMAPFromBitmap(ptr ptr long)
@ stub GdipCreateHICONFromBitmap
@ stub GdipCreateHICONFromBitmap
@ stdcall GdipCreateHalftonePalette()
@ stdcall GdipCreateHalftonePalette()
@ st
ub GdipCreateHatchBrush
@ st
dcall GdipCreateHatchBrush(long long long ptr)
@ stdcall GdipCreateImageAttributes(ptr)
@ stdcall GdipCreateImageAttributes(ptr)
@ stdcall GdipCreateLineBrush(ptr ptr long long long ptr)
@ stdcall GdipCreateLineBrush(ptr ptr long long long ptr)
@ stdcall GdipCreateLineBrushFromRect(ptr long long long long ptr)
@ stdcall GdipCreateLineBrushFromRect(ptr long long long long ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
a2a94a49
...
@@ -111,6 +111,13 @@ struct GpBrush{
...
@@ -111,6 +111,13 @@ struct GpBrush{
LOGBRUSH
lb
;
LOGBRUSH
lb
;
};
};
struct
GpHatch
{
GpBrush
brush
;
HatchStyle
hatchstyle
;
ARGB
forecol
;
ARGB
backcol
;
};
struct
GpSolidFill
{
struct
GpSolidFill
{
GpBrush
brush
;
GpBrush
brush
;
ARGB
color
;
ARGB
color
;
...
...
include/gdiplusenums.h
View file @
a2a94a49
...
@@ -357,6 +357,67 @@ enum MetafileFrameUnit
...
@@ -357,6 +357,67 @@ enum MetafileFrameUnit
MetafileFrameUnitGdi
MetafileFrameUnitGdi
};
};
enum
HatchStyle
{
HatchStyleHorizontal
=
0
,
HatchStyleVertical
=
1
,
HatchStyleForwardDiagonal
=
2
,
HatchStyleBackwardDiagonal
=
3
,
HatchStyleCross
=
4
,
HatchStyleDiagonalCross
=
5
,
HatchStyle05Percent
=
6
,
HatchStyle10Percent
=
7
,
HatchStyle20Percent
=
8
,
HatchStyle25Percent
=
9
,
HatchStyle30Percent
=
10
,
HatchStyle40Percent
=
11
,
HatchStyle50Percent
=
12
,
HatchStyle60Percent
=
13
,
HatchStyle70Percent
=
14
,
HatchStyle75Percent
=
15
,
HatchStyle80Percent
=
16
,
HatchStyle90Percent
=
17
,
HatchStyleLightDownwardDiagonal
=
18
,
HatchStyleLightUpwardDiagonal
=
19
,
HatchStyleDarkDownwardDiagonal
=
20
,
HatchStyleDarkUpwardDiagonal
=
21
,
HatchStyleWideDownwardDiagonal
=
22
,
HatchStyleWideUpwardDiagonal
=
23
,
HatchStyleLightVertical
=
24
,
HatchStyleLightHorizontal
=
25
,
HatchStyleNarrowVertical
=
26
,
HatchStyleNarrowHorizontal
=
27
,
HatchStyleDarkVertical
=
28
,
HatchStyleDarkHorizontal
=
29
,
HatchStyleDashedDownwardDiagonal
=
30
,
HatchStyleDashedUpwardDiagonal
=
31
,
HatchStyleDashedHorizontal
=
32
,
HatchStyleDashedVertical
=
33
,
HatchStyleSmallConfetti
=
34
,
HatchStyleLargeConfetti
=
35
,
HatchStyleZigZag
=
36
,
HatchStyleWave
=
37
,
HatchStyleDiagonalBrick
=
38
,
HatchStyleHorizontalBrick
=
39
,
HatchStyleWeave
=
40
,
HatchStylePlaid
=
41
,
HatchStyleDivot
=
42
,
HatchStyleDottedGrid
=
43
,
HatchStyleDottedDiamond
=
44
,
HatchStyleShingle
=
45
,
HatchStyleTrellis
=
46
,
HatchStyleSphere
=
47
,
HatchStyleSmallGrid
=
48
,
HatchStyleSmallCheckerBoard
=
49
,
HatchStyleLargeCheckerBoard
=
50
,
HatchStyleOutlinedDiamond
=
51
,
HatchStyleSolidDiamond
=
52
,
HatchStyleTotal
=
53
,
HatchStyleLargeGrid
=
HatchStyleCross
,
HatchStyleMin
=
HatchStyleHorizontal
,
HatchStyleMax
=
HatchStyleTotal
-
1
};
#ifndef __cplusplus
#ifndef __cplusplus
typedef
enum
Unit
Unit
;
typedef
enum
Unit
Unit
;
...
@@ -395,6 +456,7 @@ typedef enum CoordinateSpace CoordinateSpace;
...
@@ -395,6 +456,7 @@ typedef enum CoordinateSpace CoordinateSpace;
typedef
enum
GpTestControlEnum
GpTestControlEnum
;
typedef
enum
GpTestControlEnum
GpTestControlEnum
;
typedef
enum
MetafileFrameUnit
MetafileFrameUnit
;
typedef
enum
MetafileFrameUnit
MetafileFrameUnit
;
typedef
enum
PenType
PenType
;
typedef
enum
PenType
PenType
;
typedef
enum
HatchStyle
HatchStyle
;
#endif
/* end of c typedefs */
#endif
/* end of c typedefs */
...
...
include/gdiplusgpstubs.h
View file @
a2a94a49
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
class
GpGraphics
{};
class
GpGraphics
{};
class
GpBrush
{};
class
GpBrush
{};
class
GpHatch
:
public
GpBrush
{};
class
GpSolidFill
:
public
GpBrush
{};
class
GpSolidFill
:
public
GpBrush
{};
class
GpPath
{};
class
GpPath
{};
class
GpMatrix
{};
class
GpMatrix
{};
...
@@ -49,6 +50,7 @@ class CGpEffect {};
...
@@ -49,6 +50,7 @@ class CGpEffect {};
typedef
struct
GpGraphics
GpGraphics
;
typedef
struct
GpGraphics
GpGraphics
;
typedef
struct
GpPen
GpPen
;
typedef
struct
GpPen
GpPen
;
typedef
struct
GpBrush
GpBrush
;
typedef
struct
GpBrush
GpBrush
;
typedef
struct
GpHatch
GpHatch
;
typedef
struct
GpSolidFill
GpSolidFill
;
typedef
struct
GpSolidFill
GpSolidFill
;
typedef
struct
GpPath
GpPath
;
typedef
struct
GpPath
GpPath
;
typedef
struct
GpMatrix
GpMatrix
;
typedef
struct
GpMatrix
GpMatrix
;
...
...
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