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
e4118c18
Commit
e4118c18
authored
Jul 06, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipAddPathLine2.
parent
5dc8dee7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
77 additions
and
17 deletions
+77
-17
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-1
graphicspath.c
dlls/gdiplus/graphicspath.c
+62
-15
gdiplusenums.h
include/gdiplusenums.h
+12
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
e4118c18
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
@ stub GdipAddPathCurveI
@ stub GdipAddPathCurveI
@ stub GdipAddPathEllipse
@ stub GdipAddPathEllipse
@ stub GdipAddPathEllipseI
@ stub GdipAddPathEllipseI
@ st
ub GdipAddPathLine2
@ st
dcall GdipAddPathLine2(ptr ptr long)
@ stub GdipAddPathLine2I
@ stub GdipAddPathLine2I
@ stub GdipAddPathLine
@ stub GdipAddPathLine
@ stub GdipAddPathLineI
@ stub GdipAddPathLineI
...
...
dlls/gdiplus/gdiplus_private.h
View file @
e4118c18
...
@@ -52,9 +52,9 @@ struct GpSolidFill{
...
@@ -52,9 +52,9 @@ struct GpSolidFill{
struct
GpPath
{
struct
GpPath
{
GpFillMode
fill
;
GpFillMode
fill
;
GpGraphics
*
graphics
;
GpPathData
pathdata
;
GpPathData
pathdata
;
BOOL
newfigure
;
/* whether the next drawing action starts a new figure */
BOOL
newfigure
;
/* whether the next drawing action starts a new figure */
INT
datalen
;
/* size of the arrays in pathdata */
};
};
#endif
#endif
dlls/gdiplus/graphicspath.c
View file @
e4118c18
...
@@ -30,11 +30,68 @@
...
@@ -30,11 +30,68 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
gdiplus
);
WINE_DEFAULT_DEBUG_CHANNEL
(
gdiplus
);
GpStatus
WINGDIPAPI
GdipCreatePath
(
GpFillMode
fill
,
GpPath
**
path
)
/* make sure path has enough space for len more points */
static
BOOL
lengthen_path
(
GpPath
*
path
,
INT
len
)
{
{
HDC
hdc
;
/* initial allocation */
GpStatus
ret
;
if
(
path
->
datalen
==
0
){
path
->
datalen
=
len
*
2
;
path
->
pathdata
.
Points
=
GdipAlloc
(
path
->
datalen
*
sizeof
(
PointF
));
if
(
!
path
->
pathdata
.
Points
)
return
FALSE
;
path
->
pathdata
.
Types
=
GdipAlloc
(
path
->
datalen
);
if
(
!
path
->
pathdata
.
Types
){
GdipFree
(
path
->
pathdata
.
Points
);
return
FALSE
;
}
}
/* reallocation, double size of arrays */
else
if
(
path
->
datalen
-
path
->
pathdata
.
Count
<
len
){
while
(
path
->
datalen
-
path
->
pathdata
.
Count
<
len
)
path
->
datalen
*=
2
;
path
->
pathdata
.
Points
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
path
->
pathdata
.
Points
,
path
->
datalen
*
sizeof
(
PointF
));
if
(
!
path
->
pathdata
.
Points
)
return
FALSE
;
path
->
pathdata
.
Types
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
path
->
pathdata
.
Types
,
path
->
datalen
);
if
(
!
path
->
pathdata
.
Types
)
return
FALSE
;
}
return
TRUE
;
}
GpStatus
WINGDIPAPI
GdipAddPathLine2
(
GpPath
*
path
,
GDIPCONST
GpPointF
*
points
,
INT
count
)
{
INT
i
,
old_count
=
path
->
pathdata
.
Count
;
if
(
!
path
||
!
points
)
return
InvalidParameter
;
if
(
!
lengthen_path
(
path
,
count
+
(
path
->
newfigure
?
1
:
0
)))
return
OutOfMemory
;
for
(
i
=
0
;
i
<
count
;
i
++
){
path
->
pathdata
.
Points
[
old_count
+
i
].
X
=
points
[
i
].
X
;
path
->
pathdata
.
Points
[
old_count
+
i
].
Y
=
points
[
i
].
Y
;
path
->
pathdata
.
Types
[
old_count
+
i
]
=
PathPointTypeLine
;
}
if
(
path
->
newfigure
){
path
->
pathdata
.
Types
[
old_count
]
=
PathPointTypeStart
;
path
->
newfigure
=
FALSE
;
}
path
->
pathdata
.
Count
+=
count
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipCreatePath
(
GpFillMode
fill
,
GpPath
**
path
)
{
if
(
!
path
)
if
(
!
path
)
return
InvalidParameter
;
return
InvalidParameter
;
...
@@ -44,24 +101,14 @@ GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
...
@@ -44,24 +101,14 @@ GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
(
*
path
)
->
fill
=
fill
;
(
*
path
)
->
fill
=
fill
;
(
*
path
)
->
newfigure
=
TRUE
;
(
*
path
)
->
newfigure
=
TRUE
;
hdc
=
GetDC
(
0
);
return
Ok
;
ret
=
GdipCreateFromHDC
(
hdc
,
&
((
*
path
)
->
graphics
));
if
(
ret
!=
Ok
){
ReleaseDC
(
0
,
hdc
);
GdipFree
(
*
path
);
}
return
ret
;
}
}
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
path
)
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
path
)
{
{
if
(
!
path
||
!
(
path
->
graphics
)
)
if
(
!
path
)
return
InvalidParameter
;
return
InvalidParameter
;
ReleaseDC
(
0
,
path
->
graphics
->
hdc
);
GdipDeleteGraphics
(
path
->
graphics
);
GdipFree
(
path
);
GdipFree
(
path
);
return
Ok
;
return
Ok
;
...
...
include/gdiplusenums.h
View file @
e4118c18
...
@@ -62,12 +62,24 @@ enum LineCap
...
@@ -62,12 +62,24 @@ enum LineCap
LineCapAnchorMask
=
0xf0
LineCapAnchorMask
=
0xf0
};
};
enum
PathPointType
{
PathPointTypeStart
=
0
,
/* start of a figure */
PathPointTypeLine
=
1
,
PathPointTypeBezier
=
3
,
PathPointTypePathTypeMask
=
7
,
PathPointTypePathDashMode
=
16
,
/* not used */
PathPointTypePathMarker
=
32
,
PathPointTypeCloseSubpath
=
128
,
/* end of a closed figure */
PathPointTypeBezier3
=
3
};
#ifndef __cplusplus
#ifndef __cplusplus
typedef
enum
Unit
Unit
;
typedef
enum
Unit
Unit
;
typedef
enum
BrushType
BrushType
;
typedef
enum
BrushType
BrushType
;
typedef
enum
FillMode
FillMode
;
typedef
enum
FillMode
FillMode
;
typedef
enum
LineCap
LineCap
;
typedef
enum
LineCap
LineCap
;
typedef
enum
PathPointType
PathPointType
;
#endif
/* end of c typedefs */
#endif
/* end of c typedefs */
...
...
include/gdiplusflat.h
View file @
e4118c18
...
@@ -48,6 +48,7 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
...
@@ -48,6 +48,7 @@ GpStatus WINGDIPAPI GdipCreateSolidFill(ARGB,GpSolidFill**);
GpStatus
WINGDIPAPI
GdipGetBrushType
(
GpBrush
*
,
GpBrushType
*
);
GpStatus
WINGDIPAPI
GdipGetBrushType
(
GpBrush
*
,
GpBrushType
*
);
GpStatus
WINGDIPAPI
GdipDeleteBrush
(
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipDeleteBrush
(
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipAddPathLine2
(
GpPath
*
,
GDIPCONST
GpPointF
*
,
INT
);
GpStatus
WINGDIPAPI
GdipCreatePath
(
GpFillMode
,
GpPath
**
);
GpStatus
WINGDIPAPI
GdipCreatePath
(
GpFillMode
,
GpPath
**
);
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
);
GpStatus
WINGDIPAPI
GdipDeletePath
(
GpPath
*
);
...
...
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