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
51bd0af4
Commit
51bd0af4
authored
Jul 25, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Added GdipSetPenDashArray/GdipGetPenDashArray.
parent
a4f238a1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+2
-0
pen.c
dlls/gdiplus/pen.c
+44
-0
gdiplusflat.h
include/gdiplusflat.h
+2
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
51bd0af4
...
...
@@ -338,7 +338,7 @@
@ stub GdipGetPenCompoundCount
@ stub GdipGetPenCustomEndCap
@ stub GdipGetPenCustomStartCap
@ st
ub GdipGetPenDashArray
@ st
dcall GdipGetPenDashArray(ptr ptr long)
@ stub GdipGetPenDashCap197819
@ stub GdipGetPenDashCount
@ stub GdipGetPenDashOffset
...
...
@@ -546,7 +546,7 @@
@ stub GdipSetPenCompoundArray
@ stdcall GdipSetPenCustomEndCap(ptr ptr)
@ stdcall GdipSetPenCustomStartCap(ptr ptr)
@ st
ub GdipSetPenDashArray
@ st
dcall GdipSetPenDashArray(ptr ptr long)
@ stub GdipSetPenDashCap197819
@ stub GdipSetPenDashOffset
@ stdcall GdipSetPenDashStyle(ptr long)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
51bd0af4
...
...
@@ -54,6 +54,8 @@ struct GpPen{
GpLineJoin
join
;
REAL
miterlimit
;
GpDashStyle
dash
;
REAL
*
dashes
;
INT
numdashes
;
GpBrush
*
brush
;
};
...
...
dlls/gdiplus/pen.c
View file @
51bd0af4
...
...
@@ -123,6 +123,7 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
GdipDeleteBrush
(
pen
->
brush
);
GdipDeleteCustomLineCap
(
pen
->
customstart
);
GdipDeleteCustomLineCap
(
pen
->
customend
);
GdipFree
(
pen
->
dashes
);
GdipFree
(
pen
);
return
Ok
;
...
...
@@ -147,6 +148,20 @@ GpStatus WINGDIPAPI GdipGetPenColor(GpPen *pen, ARGB *argb)
return
GdipGetSolidFillColor
(((
GpSolidFill
*
)
pen
->
brush
),
argb
);
}
GpStatus
WINGDIPAPI
GdipGetPenDashArray
(
GpPen
*
pen
,
REAL
*
dash
,
INT
count
)
{
if
(
!
pen
||
!
dash
||
count
>
pen
->
numdashes
)
return
InvalidParameter
;
/* note: if you pass a negative value for count, it crashes native gdiplus. */
if
(
count
<
0
)
return
GenericError
;
memcpy
(
dash
,
pen
->
dashes
,
count
*
sizeof
(
REAL
));
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
pen
,
GpDashStyle
*
dash
)
{
if
(
!
pen
||
!
dash
)
...
...
@@ -209,11 +224,40 @@ GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* custom
return
ret
;
}
GpStatus
WINGDIPAPI
GdipSetPenDashArray
(
GpPen
*
pen
,
GDIPCONST
REAL
*
dash
,
INT
count
)
{
if
(
!
pen
||
!
dash
)
return
InvalidParameter
;
GdipFree
(
pen
->
dashes
);
pen
->
dashes
=
NULL
;
if
(
count
>
0
)
pen
->
dashes
=
GdipAlloc
(
count
*
sizeof
(
REAL
));
if
(
!
pen
->
dashes
){
pen
->
numdashes
=
0
;
return
OutOfMemory
;
}
pen
->
dash
=
DashStyleCustom
;
memcpy
(
pen
->
dashes
,
dash
,
count
*
sizeof
(
REAL
));
pen
->
numdashes
=
count
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
pen
,
GpDashStyle
dash
)
{
if
(
!
pen
)
return
InvalidParameter
;
if
(
dash
!=
DashStyleCustom
){
GdipFree
(
pen
->
dashes
);
pen
->
dashes
=
NULL
;
pen
->
numdashes
=
0
;
}
pen
->
dash
=
dash
;
pen
->
style
&=
~
(
PS_ALTERNATE
|
PS_SOLID
|
PS_DASH
|
PS_DOT
|
PS_DASHDOT
|
PS_DASHDOTDOT
|
PS_NULL
|
PS_USERSTYLE
|
PS_INSIDEFRAME
);
...
...
include/gdiplusflat.h
View file @
51bd0af4
...
...
@@ -32,11 +32,13 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
GpStatus
WINGDIPAPI
GdipDeletePen
(
GpPen
*
);
GpStatus
WINGDIPAPI
GdipGetPenBrushFill
(
GpPen
*
,
GpBrush
**
);
GpStatus
WINGDIPAPI
GdipGetPenColor
(
GpPen
*
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipGetPenDashArray
(
GpPen
*
,
REAL
*
,
INT
);
GpStatus
WINGDIPAPI
GdipGetPenDashStyle
(
GpPen
*
,
GpDashStyle
*
);
GpStatus
WINGDIPAPI
GdipSetPenBrushFill
(
GpPen
*
,
GpBrush
*
);
GpStatus
WINGDIPAPI
GdipSetPenColor
(
GpPen
*
,
ARGB
);
GpStatus
WINGDIPAPI
GdipSetPenCustomEndCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenCustomStartCap
(
GpPen
*
,
GpCustomLineCap
*
);
GpStatus
WINGDIPAPI
GdipSetPenDashArray
(
GpPen
*
,
GDIPCONST
REAL
*
,
INT
);
GpStatus
WINGDIPAPI
GdipSetPenDashStyle
(
GpPen
*
,
GpDashStyle
);
GpStatus
WINGDIPAPI
GdipSetPenEndCap
(
GpPen
*
,
GpLineCap
);
GpStatus
WINGDIPAPI
GdipSetPenLineCap197819
(
GpPen
*
,
GpLineCap
,
GpLineCap
,
GpDashCap
);
...
...
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