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
d07088ee
Commit
d07088ee
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: Initial custom line caps implementation.
parent
a8322cb1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
2 deletions
+95
-2
Makefile.in
dlls/gdiplus/Makefile.in
+1
-0
customlinecap.c
dlls/gdiplus/customlinecap.c
+79
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+2
-2
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+7
-0
gdiplusflat.h
include/gdiplusflat.h
+4
-0
gdiplusgpstubs.h
include/gdiplusgpstubs.h
+2
-0
No files found.
dlls/gdiplus/Makefile.in
View file @
d07088ee
...
...
@@ -8,6 +8,7 @@ IMPORTS = user32 gdi32 advapi32 kernel32 ntdll
C_SRCS
=
\
brush.c
\
customlinecap.c
\
gdiplus.c
\
graphics.c
\
graphicspath.c
\
...
...
dlls/gdiplus/customlinecap.c
0 → 100644
View file @
d07088ee
/*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "gdiplus.h"
#include "gdiplus_private.h"
GpStatus
WINGDIPAPI
GdipCreateCustomLineCap
(
GpPath
*
fillPath
,
GpPath
*
strokePath
,
GpLineCap
baseCap
,
REAL
baseInset
,
GpCustomLineCap
**
customCap
)
{
GpPathData
*
pathdata
;
if
(
!
customCap
||
!
(
fillPath
||
strokePath
))
return
InvalidParameter
;
*
customCap
=
GdipAlloc
(
sizeof
(
GpCustomLineCap
));
if
(
!*
customCap
)
return
OutOfMemory
;
if
(
strokePath
){
(
*
customCap
)
->
fill
=
FALSE
;
pathdata
=
&
strokePath
->
pathdata
;
}
else
{
(
*
customCap
)
->
fill
=
TRUE
;
pathdata
=
&
fillPath
->
pathdata
;
}
(
*
customCap
)
->
pathdata
.
Points
=
GdipAlloc
(
pathdata
->
Count
*
sizeof
(
PointF
));
(
*
customCap
)
->
pathdata
.
Types
=
GdipAlloc
(
pathdata
->
Count
);
if
((
!
(
*
customCap
)
->
pathdata
.
Types
||
!
(
*
customCap
)
->
pathdata
.
Points
)
&&
pathdata
->
Count
){
GdipFree
((
*
customCap
)
->
pathdata
.
Points
);
GdipFree
((
*
customCap
)
->
pathdata
.
Types
);
GdipFree
(
*
customCap
);
return
OutOfMemory
;
}
memcpy
((
*
customCap
)
->
pathdata
.
Points
,
pathdata
->
Points
,
pathdata
->
Count
*
sizeof
(
PointF
));
memcpy
((
*
customCap
)
->
pathdata
.
Types
,
pathdata
->
Types
,
pathdata
->
Count
);
(
*
customCap
)
->
pathdata
.
Count
=
pathdata
->
Count
;
(
*
customCap
)
->
inset
=
baseInset
;
(
*
customCap
)
->
cap
=
baseCap
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipDeleteCustomLineCap
(
GpCustomLineCap
*
customCap
)
{
if
(
!
customCap
)
return
InvalidParameter
;
GdipFree
(
customCap
->
pathdata
.
Points
);
GdipFree
(
customCap
->
pathdata
.
Types
);
GdipFree
(
customCap
);
return
Ok
;
}
dlls/gdiplus/gdiplus.spec
View file @
d07088ee
...
...
@@ -74,7 +74,7 @@
@ stub GdipCreateBitmapFromStream
@ stub GdipCreateBitmapFromStreamICM
@ stub GdipCreateCachedBitmap
@ st
ub GdipCreateCustomLineCap
@ st
dcall GdipCreateCustomLineCap(ptr ptr long long ptr)
@ stub GdipCreateFont
@ stub GdipCreateFontFamilyFromName
@ stub GdipCreateFontFromDC
...
...
@@ -129,7 +129,7 @@
@ stub GdipCreateTextureIAI
@ stdcall GdipDeleteBrush(ptr)
@ stub GdipDeleteCachedBitmap
@ st
ub GdipDeleteCustomLineCap
@ st
dcall GdipDeleteCustomLineCap(ptr)
@ stub GdipDeleteFont
@ stub GdipDeleteFontFamily
@ stdcall GdipDeleteGraphics(ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
d07088ee
...
...
@@ -91,4 +91,11 @@ struct GpPathIterator{
INT
pathtype_pos
;
/* for NextPathType methods */
};
struct
GpCustomLineCap
{
GpPathData
pathdata
;
BOOL
fill
;
/* TRUE for fill, FALSE for stroke */
GpLineCap
cap
;
/* as far as I can tell, this value is ignored */
REAL
inset
;
/* how much to adjust the end of the line */
};
#endif
include/gdiplusflat.h
View file @
d07088ee
...
...
@@ -101,6 +101,10 @@ GpStatus WINGDIPAPI GdipPathIterCopyData(GpPathIterator*,INT*,GpPointF*,BYTE*,
GpStatus
WINGDIPAPI
GdipPathIterNextSubpath
(
GpPathIterator
*
,
INT
*
,
INT
*
,
INT
*
,
BOOL
*
);
GpStatus
WINGDIPAPI
GdipPathIterRewind
(
GpPathIterator
*
);
GpStatus
WINGDIPAPI
GdipCreateCustomLineCap
(
GpPath
*
,
GpPath
*
,
GpLineCap
,
REAL
,
GpCustomLineCap
**
);
GpStatus
WINGDIPAPI
GdipDeleteCustomLineCap
(
GpCustomLineCap
*
);
#ifdef __cplusplus
}
#endif
...
...
include/gdiplusgpstubs.h
View file @
d07088ee
...
...
@@ -28,6 +28,7 @@ class GpSolidFill {};
class
GpPath
{};
class
GpMatrix
{};
class
GpPathIterator
{};
class
GpCustomLineCap
{};
#else
/* end of c++ declarations */
...
...
@@ -38,6 +39,7 @@ typedef struct GpSolidFill GpSolidFill;
typedef
struct
GpPath
GpPath
;
typedef
struct
GpMatrix
GpMatrix
;
typedef
struct
GpPathIterator
GpPathIterator
;
typedef
struct
GpCustomLineCap
GpCustomLineCap
;
#endif
/* end of c declarations */
...
...
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