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
da161a50
Commit
da161a50
authored
Feb 25, 2008
by
Royal Chan
Committed by
Alexandre Julliard
Feb 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diplus: Implement GdipDrawBezierI based on GdipDrawBezier.
parent
de61fc5e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
1 deletion
+68
-1
gdiplus.spec
dlls/gdiplus/gdiplus.spec
+1
-1
graphics.c
dlls/gdiplus/graphics.c
+28
-0
graphics.c
dlls/gdiplus/tests/graphics.c
+39
-0
No files found.
dlls/gdiplus/gdiplus.spec
View file @
da161a50
...
...
@@ -155,7 +155,7 @@
@ stdcall GdipDrawArc(ptr ptr long long long long long long)
@ stub GdipDrawArcI
@ stdcall GdipDrawBezier(ptr ptr long long long long long long long long)
@ st
ub GdipDrawBezierI
@ st
dcall GdipDrawBezierI(ptr ptr long long long long long long long long)
@ stub GdipDrawBeziers
@ stub GdipDrawBeziersI
@ stub GdipDrawCachedBitmap
...
...
dlls/gdiplus/graphics.c
View file @
da161a50
...
...
@@ -957,6 +957,34 @@ GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics *graphics, GpPen *pen, REAL x1,
return
retval
;
}
GpStatus
WINGDIPAPI
GdipDrawBezierI
(
GpGraphics
*
graphics
,
GpPen
*
pen
,
INT
x1
,
INT
y1
,
INT
x2
,
INT
y2
,
INT
x3
,
INT
y3
,
INT
x4
,
INT
y4
)
{
INT
save_state
;
GpPointF
pt
[
4
];
GpStatus
retval
;
if
(
!
graphics
||
!
pen
)
return
InvalidParameter
;
pt
[
0
].
X
=
x1
;
pt
[
0
].
Y
=
y1
;
pt
[
1
].
X
=
x2
;
pt
[
1
].
Y
=
y2
;
pt
[
2
].
X
=
x3
;
pt
[
2
].
Y
=
y3
;
pt
[
3
].
X
=
x4
;
pt
[
3
].
Y
=
y4
;
save_state
=
prepare_dc
(
graphics
,
pen
);
retval
=
draw_polybezier
(
graphics
,
pen
,
pt
,
4
,
TRUE
);
restore_dc
(
graphics
,
save_state
);
return
retval
;
}
/* Approximates cardinal spline with Bezier curves. */
GpStatus
WINGDIPAPI
GdipDrawCurve2
(
GpGraphics
*
graphics
,
GpPen
*
pen
,
GDIPCONST
GpPointF
*
points
,
INT
count
,
REAL
tension
)
...
...
dlls/gdiplus/tests/graphics.c
View file @
da161a50
...
...
@@ -220,6 +220,44 @@ static void test_save_restore(void)
ReleaseDC
(
0
,
hdc
);
}
static
void
test_GdipDrawBezierI
(
void
)
{
GpStatus
status
;
GpGraphics
*
graphics
=
NULL
;
GpPen
*
pen
=
NULL
;
HDC
hdc
=
GetDC
(
0
);
/* make a graphics object and pen object */
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
ok
(
hdc
!=
NULL
,
"Expected HDC to be initialized
\n
"
);
status
=
GdipCreateFromHDC
(
hdc
,
&
graphics
);
expect
(
Ok
,
status
);
ok
(
graphics
!=
NULL
,
"Expected graphics to be initialized
\n
"
);
status
=
GdipCreatePen1
((
ARGB
)
0xffff00ff
,
10
.
0
f
,
UnitPixel
,
&
pen
);
expect
(
Ok
,
status
);
ok
(
pen
!=
NULL
,
"Expected pen to be initialized
\n
"
);
/* InvalidParameter cases: null graphics, null pen */
status
=
GdipDrawBezierI
(
NULL
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawBezierI
(
graphics
,
NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
expect
(
InvalidParameter
,
status
);
status
=
GdipDrawBezierI
(
NULL
,
pen
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
expect
(
InvalidParameter
,
status
);
/* successful case */
status
=
GdipDrawBezierI
(
graphics
,
pen
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
expect
(
Ok
,
status
);
GdipDeletePen
(
pen
);
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
graphics
)
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
...
@@ -234,6 +272,7 @@ START_TEST(graphics)
test_constructor_destructor
();
test_save_restore
();
test_GdipDrawBezierI
();
GdiplusShutdown
(
gdiplusToken
);
}
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