Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2848100e
Commit
2848100e
authored
Jul 26, 2008
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Implemented GdipGetCustomLineCapStrokeJoin with basic test.
parent
92c440c6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletion
+48
-1
customlinecap.c
dlls/gdiplus/customlinecap.c
+12
-0
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+1
-0
customlinecap.c
dlls/gdiplus/tests/customlinecap.c
+33
-0
gdiplusflat.h
include/gdiplusflat.h
+1
-0
No files found.
dlls/gdiplus/customlinecap.c
View file @
2848100e
...
@@ -100,6 +100,7 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath
...
@@ -100,6 +100,7 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath
(
*
customCap
)
->
inset
=
baseInset
;
(
*
customCap
)
->
inset
=
baseInset
;
(
*
customCap
)
->
cap
=
baseCap
;
(
*
customCap
)
->
cap
=
baseCap
;
(
*
customCap
)
->
join
=
LineJoinMiter
;
return
Ok
;
return
Ok
;
}
}
...
@@ -116,6 +117,17 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap *customCap)
...
@@ -116,6 +117,17 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap *customCap)
return
Ok
;
return
Ok
;
}
}
GpStatus
WINGDIPAPI
GdipGetCustomLineCapStrokeJoin
(
GpCustomLineCap
*
customCap
,
GpLineJoin
*
lineJoin
)
{
if
(
!
customCap
||
!
lineJoin
)
return
InvalidParameter
;
*
lineJoin
=
customCap
->
join
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeCaps
(
GpCustomLineCap
*
custom
,
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeCaps
(
GpCustomLineCap
*
custom
,
GpLineCap
start
,
GpLineCap
end
)
GpLineCap
start
,
GpLineCap
end
)
{
{
...
...
dlls/gdiplus/gdiplus.spec
View file @
2848100e
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
@ stdcall GdipGetCustomLineCapBaseCap(ptr ptr)
@ stdcall GdipGetCustomLineCapBaseCap(ptr ptr)
@ stdcall GdipGetCustomLineCapBaseInset(ptr ptr)
@ stdcall GdipGetCustomLineCapBaseInset(ptr ptr)
@ stub GdipGetCustomLineCapStrokeCaps
@ stub GdipGetCustomLineCapStrokeCaps
@ st
ub GdipGetCustomLineCapStrokeJoin
@ st
dcall GdipGetCustomLineCapStrokeJoin(ptr ptr)
@ stub GdipGetCustomLineCapType
@ stub GdipGetCustomLineCapType
@ stub GdipGetCustomLineCapWidthScale
@ stub GdipGetCustomLineCapWidthScale
@ stdcall GdipGetDC(ptr ptr)
@ stdcall GdipGetDC(ptr ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
2848100e
...
@@ -149,6 +149,7 @@ struct GpCustomLineCap{
...
@@ -149,6 +149,7 @@ struct GpCustomLineCap{
BOOL
fill
;
/* TRUE for fill, FALSE for stroke */
BOOL
fill
;
/* TRUE for fill, FALSE for stroke */
GpLineCap
cap
;
/* as far as I can tell, this value is ignored */
GpLineCap
cap
;
/* as far as I can tell, this value is ignored */
REAL
inset
;
/* how much to adjust the end of the line */
REAL
inset
;
/* how much to adjust the end of the line */
GpLineJoin
join
;
};
};
struct
GpImage
{
struct
GpImage
{
...
...
dlls/gdiplus/tests/customlinecap.c
View file @
2848100e
...
@@ -65,6 +65,38 @@ static void test_constructor_destructor(void)
...
@@ -65,6 +65,38 @@ static void test_constructor_destructor(void)
GdipDeletePath
(
path
);
GdipDeletePath
(
path
);
}
}
static
void
test_linejoin
(
void
)
{
GpCustomLineCap
*
custom
;
GpPath
*
path
;
GpLineJoin
join
;
GpStatus
stat
;
stat
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
expect
(
Ok
,
stat
);
stat
=
GdipAddPathRectangle
(
path
,
5
.
0
,
5
.
0
,
10
.
0
,
10
.
0
);
expect
(
Ok
,
stat
);
stat
=
GdipCreateCustomLineCap
(
NULL
,
path
,
LineCapFlat
,
0
.
0
,
&
custom
);
expect
(
Ok
,
stat
);
/* NULL args */
stat
=
GdipGetCustomLineCapStrokeJoin
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetCustomLineCapStrokeJoin
(
custom
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetCustomLineCapStrokeJoin
(
NULL
,
&
join
);
expect
(
InvalidParameter
,
stat
);
/* LineJoinMiter is default */
stat
=
GdipGetCustomLineCapStrokeJoin
(
custom
,
&
join
);
expect
(
Ok
,
stat
);
expect
(
LineJoinMiter
,
join
);
GdipDeleteCustomLineCap
(
custom
);
GdipDeletePath
(
path
);
}
START_TEST
(
customlinecap
)
START_TEST
(
customlinecap
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -78,6 +110,7 @@ START_TEST(customlinecap)
...
@@ -78,6 +110,7 @@ START_TEST(customlinecap)
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
GdiplusStartup
(
&
gdiplusToken
,
&
gdiplusStartupInput
,
NULL
);
test_constructor_destructor
();
test_constructor_destructor
();
test_linejoin
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
include/gdiplusflat.h
View file @
2848100e
...
@@ -326,6 +326,7 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);
...
@@ -326,6 +326,7 @@ GpStatus WINGDIPAPI GdipDeleteCustomLineCap(GpCustomLineCap*);
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeCaps
(
GpCustomLineCap
*
,
GpLineCap
,
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeCaps
(
GpCustomLineCap
*
,
GpLineCap
,
GpLineCap
);
GpLineCap
);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapBaseCap
(
GpCustomLineCap
*
,
GpLineCap
*
);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapBaseCap
(
GpCustomLineCap
*
,
GpLineCap
*
);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapStrokeJoin
(
GpCustomLineCap
*
,
GpLineJoin
*
);
GpStatus
WINGDIPAPI
GdipBitmapGetPixel
(
GpBitmap
*
,
INT
,
INT
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipBitmapGetPixel
(
GpBitmap
*
,
INT
,
INT
,
ARGB
*
);
GpStatus
WINGDIPAPI
GdipBitmapSetPixel
(
GpBitmap
*
,
INT
,
INT
,
ARGB
);
GpStatus
WINGDIPAPI
GdipBitmapSetPixel
(
GpBitmap
*
,
INT
,
INT
,
ARGB
);
...
...
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