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
ce2aee48
Commit
ce2aee48
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 GdipGetCustomLineCapWidthScale with some tests.
parent
6c6e8f48
Hide 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 @
ce2aee48
...
...
@@ -101,6 +101,7 @@ GpStatus WINGDIPAPI GdipCreateCustomLineCap(GpPath* fillPath, GpPath* strokePath
(
*
customCap
)
->
inset
=
baseInset
;
(
*
customCap
)
->
cap
=
baseCap
;
(
*
customCap
)
->
join
=
LineJoinMiter
;
(
*
customCap
)
->
scale
=
1
.
0
;
return
Ok
;
}
...
...
@@ -128,6 +129,17 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapStrokeJoin(GpCustomLineCap* customCap,
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipGetCustomLineCapWidthScale
(
GpCustomLineCap
*
custom
,
REAL
*
widthScale
)
{
if
(
!
custom
||
!
widthScale
)
return
InvalidParameter
;
*
widthScale
=
custom
->
scale
;
return
Ok
;
}
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeCaps
(
GpCustomLineCap
*
custom
,
GpLineCap
start
,
GpLineCap
end
)
{
...
...
dlls/gdiplus/gdiplus.spec
View file @
ce2aee48
...
...
@@ -254,7 +254,7 @@
@ stub GdipGetCustomLineCapStrokeCaps
@ stdcall GdipGetCustomLineCapStrokeJoin(ptr ptr)
@ stub GdipGetCustomLineCapType
@ st
ub GdipGetCustomLineCapWidthScale
@ st
dcall GdipGetCustomLineCapWidthScale(ptr ptr)
@ stdcall GdipGetDC(ptr ptr)
@ stdcall GdipGetDpiX(ptr ptr)
@ stdcall GdipGetDpiY(ptr ptr)
...
...
dlls/gdiplus/gdiplus_private.h
View file @
ce2aee48
...
...
@@ -150,6 +150,7 @@ struct GpCustomLineCap{
GpLineCap
cap
;
/* as far as I can tell, this value is ignored */
REAL
inset
;
/* how much to adjust the end of the line */
GpLineJoin
join
;
REAL
scale
;
};
struct
GpImage
{
...
...
dlls/gdiplus/tests/customlinecap.c
View file @
ce2aee48
...
...
@@ -149,6 +149,38 @@ static void test_inset(void)
GdipDeletePath
(
path
);
}
static
void
test_scale
(
void
)
{
GpCustomLineCap
*
custom
;
GpPath
*
path
;
REAL
scale
;
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
=
GdipGetCustomLineCapWidthScale
(
NULL
,
NULL
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetCustomLineCapWidthScale
(
NULL
,
&
scale
);
expect
(
InvalidParameter
,
stat
);
stat
=
GdipGetCustomLineCapWidthScale
(
custom
,
NULL
);
expect
(
InvalidParameter
,
stat
);
/* valid args */
scale
=
(
REAL
)
0xdeadbeef
;
stat
=
GdipGetCustomLineCapWidthScale
(
custom
,
&
scale
);
expect
(
Ok
,
stat
);
expectf
(
1
.
0
,
scale
);
GdipDeleteCustomLineCap
(
custom
);
GdipDeletePath
(
path
);
}
START_TEST
(
customlinecap
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -164,6 +196,7 @@ START_TEST(customlinecap)
test_constructor_destructor
();
test_linejoin
();
test_inset
();
test_scale
();
GdiplusShutdown
(
gdiplusToken
);
}
include/gdiplusflat.h
View file @
ce2aee48
...
...
@@ -329,6 +329,7 @@ GpStatus WINGDIPAPI GdipGetCustomLineCapBaseCap(GpCustomLineCap*,GpLineCap*);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapBaseInset
(
GpCustomLineCap
*
,
REAL
*
);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapStrokeJoin
(
GpCustomLineCap
*
,
GpLineJoin
*
);
GpStatus
WINGDIPAPI
GdipSetCustomLineCapStrokeJoin
(
GpCustomLineCap
*
,
GpLineJoin
);
GpStatus
WINGDIPAPI
GdipGetCustomLineCapWidthScale
(
GpCustomLineCap
*
,
REAL
*
);
GpStatus
WINGDIPAPI
GdipBitmapGetPixel
(
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