Lines Matching refs:path

41  * @tc.desc: Test for creating a path object with normal parameters.
47 // 1. Call OH_Drawing_PathCreate to create a path object
48 OH_Drawing_Path *path = OH_Drawing_PathCreate();
49 EXPECT_NE(path, nullptr);
51 OH_Drawing_PathDestroy(path);
57 * @tc.desc: Test for copying a path with normal parameters and checking the copied path length.
63 // 1. Create a path object 1 by calling OH_Drawing_PathCreate
66 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
68 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
70 // 4. Add a line segment from the last point of the path to the target point to the path by calling
73 // 5. Add a line segment from the last point of the path to the target point to the path by calling
76 // 6. Close the path by calling OH_Drawing_PathClose
78 // 7. Copy path 1 to path 2 by calling OH_Drawing_PathCopy
80 // 8. Get the length of path 2 by calling OH_Drawing_PathGetLength
90 * @tc.desc: Test for copying a path with NULL parameters.
96 // 1. Create a path object by calling OH_Drawing_PathCreate
97 OH_Drawing_Path *path = OH_Drawing_PathCreate();
98 // 2. Copy a path with nullptr as the parameter
102 OH_Drawing_PathDestroy(path);
109 * @tc.desc: Test for copying a path and checking if the copied path is affected after the original path is destroyed.
115 // 1. Create a path object 1 by calling OH_Drawing_PathCreate
118 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
120 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
122 // 4. Add a line segment from the last point of the path to the target point to the path by calling
125 // 5. Add a line segment from the last point of the path to the target point to the path by calling
128 // 6. Close the path by calling OH_Drawing_PathClose
130 // 7. Copy path 1 to path 2 by calling OH_Drawing_PathCopy
132 // 8. Destroy path 1 by calling OH_Drawing_PathDestroy
134 // 9. Get the length of path 2 by calling OH_Drawing_PathGetLength, if the return value is not 0, it means
135 // destroying path 1 does not affect path 2
144 * @tc.desc: Test for creating and destroying a path object with normal parameters.
150 // 1. Call OH_Drawing_PathCreate to create a path object
151 OH_Drawing_Path *path = OH_Drawing_PathCreate();
153 OH_Drawing_PathDestroy(path);
159 * @tc.desc: Test for destroying a path object with NULL parameters.
165 // 1. Call OH_Drawing_PathCreate to create a path object
166 OH_Drawing_Path *path = OH_Drawing_PathCreate();
172 OH_Drawing_PathDestroy(path);
178 * @tc.desc: Test for moving a path to a normal position with valid parameters.
184 // 1. Create a path object by calling OH_Drawing_PathCreate
185 OH_Drawing_Path *path = OH_Drawing_PathCreate();
186 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
187 OH_Drawing_PathMoveTo(path, 0, 0);
189 OH_Drawing_PathDestroy(path);
195 * @tc.desc: Test for moving a path with NULL or invalid parameters.
201 // 1. Create a path object by calling OH_Drawing_PathCreate
202 OH_Drawing_Path *path = OH_Drawing_PathCreate();
208 OH_Drawing_PathMoveTo(path, 0.00, 1);
210 OH_Drawing_PathMoveTo(path, 1, 0.00);
212 OH_Drawing_PathDestroy(path);
218 * @tc.desc: Test for moving a path with abnormal data types as parameters.
224 // 1. Create a path object by calling OH_Drawing_PathCreate
225 OH_Drawing_Path *path = OH_Drawing_PathCreate();
226 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo with an integer or character type as the
228 OH_Drawing_PathMoveTo(path, 2, 1.0f);
229 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo with an integer or character type as the
231 OH_Drawing_PathMoveTo(path, 1.0f, 2);
233 OH_Drawing_PathDestroy(path);
239 * @tc.desc: Test for moving a path with maximal values as parameters.
245 // 1. Create a path object by calling OH_Drawing_PathCreate
246 OH_Drawing_Path *path = OH_Drawing_PathCreate();
247 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo with the second parameter as the maximum
249 OH_Drawing_PathMoveTo(path, FLT_MAX + 1, 1.0);
250 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo with the third parameter as the maximum
252 OH_Drawing_PathMoveTo(path, 1.0, FLT_MAX + 1);
254 OH_Drawing_PathDestroy(path);
260 * @tc.desc: Test for adding a line to a path with normal parameters.
266 // 1. Create a path object by calling OH_Drawing_PathCreate
267 OH_Drawing_Path *path = OH_Drawing_PathCreate();
268 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
269 OH_Drawing_PathMoveTo(path, 0, 0);
270 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
271 OH_Drawing_PathLineTo(path, 100, 100);
273 OH_Drawing_PathDestroy(path);
279 * @tc.desc: Test for adding a line to a path with NULL or invalid parameters.
285 // 1. Create a path object by calling OH_Drawing_PathCreate
286 OH_Drawing_Path *path = OH_Drawing_PathCreate();
292 OH_Drawing_PathLineTo(path, 0.00, 1);
294 OH_Drawing_PathLineTo(path, 1, 0.00);
296 OH_Drawing_PathDestroy(path);
302 * @tc.desc: Test for moving a path with abnormal data types as parameters.
308 // 1. Create a path object by calling OH_Drawing_PathCreate
309 OH_Drawing_Path *path = OH_Drawing_PathCreate();
310 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
311 OH_Drawing_PathMoveTo(path, 0, 0);
312 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
314 OH_Drawing_PathLineTo(path, 2, 1.0f);
315 // 4. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
317 OH_Drawing_PathLineTo(path, 1.0f, 2);
319 OH_Drawing_PathDestroy(path);
325 * @tc.desc: Test for moving a path with maximal values as parameters.
331 // 1. Create a path object by calling OH_Drawing_PathCreate
332 OH_Drawing_Path *path = OH_Drawing_PathCreate();
333 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
334 OH_Drawing_PathMoveTo(path, 0, 0);
335 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
337 OH_Drawing_PathLineTo(path, FLT_MAX + 1, 1.0);
338 // 4. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
340 OH_Drawing_PathLineTo(path, 1.0, FLT_MAX + 1);
342 OH_Drawing_PathDestroy(path);
348 * @tc.desc: Test for adding an arc to a path with normal parameters.
354 // 1. Create a path object by calling OH_Drawing_PathCreate
355 OH_Drawing_Path *path = OH_Drawing_PathCreate();
356 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
357 OH_Drawing_PathMoveTo(path, 0, 0);
358 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
359 OH_Drawing_PathLineTo(path, 100, 100);
360 // 4. Add a line segment from the last point of the path to the target point to the path by calling
362 OH_Drawing_PathLineTo(path, 200, 200);
363 // 5. Add a line segment from the last point of the path to the target point to the path by calling
365 OH_Drawing_PathLineTo(path, 300, 300);
366 // 6. Close the path by calling OH_Drawing_PathClose
367 OH_Drawing_PathClose(path);
368 // 7. Add an arc to the path by calling OH_Drawing_PathArcTo
369 OH_Drawing_PathArcTo(path, 10, 10, 20, 0, 0, 90);
371 OH_Drawing_PathDestroy(path);
377 * @tc.desc: Test for adding an arc to a path with NULL or invalid parameters.
383 // 1. Create a path object by calling OH_Drawing_PathCreate
384 OH_Drawing_Path *path = OH_Drawing_PathCreate();
390 OH_Drawing_PathArcTo(path, 0.00, 10, 20, 0, 0, 90);
392 OH_Drawing_PathArcTo(path, 10, 0.00, 20, 0, 0, 90);
394 OH_Drawing_PathArcTo(path, 10, 10, 0.00, 0, 0, 90);
396 OH_Drawing_PathArcTo(path, 10, 10, 20, 0.00, 0, 90);
398 OH_Drawing_PathArcTo(path, 10, 10, 20, 0, 0.00, 90);
400 OH_Drawing_PathArcTo(path, 10, 10, 20, 0, 0, 0.00);
402 OH_Drawing_PathDestroy(path);
408 * @tc.desc: Test for adding an arc to a path with abnormal data types as parameters.
414 // 1. Create a path object by calling OH_Drawing_PathCreate
415 OH_Drawing_Path *path = OH_Drawing_PathCreate();
416 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
417 OH_Drawing_PathMoveTo(path, 0, 0);
418 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
419 OH_Drawing_PathLineTo(path, 100, 100);
420 // 4. Add a line segment from the last point of the path to the target point to the path by calling
422 OH_Drawing_PathLineTo(path, 200, 200);
423 // 5. Add a line segment from the last point of the path to the target point to the path by calling
425 OH_Drawing_PathLineTo(path, 300, 300);
426 // 6. Close the path by calling OH_Drawing_PathClose
427 OH_Drawing_PathClose(path);
428 // 7. Add an arc to the path by calling OH_Drawing_PathArcTo with integer parameters
429 OH_Drawing_PathArcTo(path, 10, 10, 20, 20, 20, 90);
431 OH_Drawing_PathDestroy(path);
437 * @tc.desc: Test for adding an arc to a path with maximal values as parameters.
443 // 1. Create a path object by calling OH_Drawing_PathCreate
444 OH_Drawing_Path *path = OH_Drawing_PathCreate();
445 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
446 OH_Drawing_PathMoveTo(path, 0, 0);
447 // 3. Add a line segment from the starting point to the target point to the path by calling OH_Drawing_PathLineTo
448 OH_Drawing_PathLineTo(path, 100, 100);
449 // 4. Add a line segment from the last point of the path to the target point to the path by calling
451 OH_Drawing_PathLineTo(path, 200, 200);
452 // 5. Add a line segment from the last point of the path to the target point to the path by calling
454 OH_Drawing_PathLineTo(path, 300, 300);
455 // 6. Close the path by calling OH_Drawing_PathClose
456 OH_Drawing_PathClose(path);
457 // 7. Add an arc to the path by calling OH_Drawing_PathArcTo with the second parameter as the maximum value of
459 OH_Drawing_PathArcTo(path, FLT_MAX + 1, 10, 20, 0, 0, 90);
460 // 8. Add an arc to the path by calling OH_Drawing_PathArcTo with the third parameter as the maximum value of
462 OH_Drawing_PathArcTo(path, 10, FLT_MAX + 1, 20, 0, 0, 90);
463 // 9. Add an arc to the path by calling OH_Drawing_PathArcTo with the fourth parameter as the maximum value of
465 OH_Drawing_PathArcTo(path, 10, 10, FLT_MAX + 1, 0, 0, 90);
466 // 10. Add an arc to the path by calling OH_Drawing_PathArcTo with the fifth parameter as the maximum value of
468 OH_Drawing_PathArcTo(path, 10, 10, 20, FLT_MAX + 1, 0, 90);
469 // 11. Add an arc to the path by calling OH_Drawing_PathArcTo with the sixth parameter as the maximum value of
471 OH_Drawing_PathArcTo(path, 10, 10, 20, 0, FLT_MAX + 1, 90);
472 // 12. Add an arc to the path by calling OH_Drawing_PathArcTo with the seventh parameter as the maximum value of
474 OH_Drawing_PathArcTo(path, 10, 10, 20, 0, 0, FLT_MAX + 1);
476 OH_Drawing_PathDestroy(path);
482 * @tc.desc: Test for adding a quadratic Bezier curve to a path with normal parameters.
488 // 1. Create a path object by calling OH_Drawing_PathCreate
489 OH_Drawing_Path *path = OH_Drawing_PathCreate();
490 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
491 OH_Drawing_PathMoveTo(path, 0, 0);
492 // 3. Add a quadratic Bezier curve from the last point of the path to the target point by calling
494 OH_Drawing_PathQuadTo(path, 100, 100, 200, 200);
496 OH_Drawing_PathDestroy(path);
502 * @tc.desc: Test for adding a quadratic Bezier curve to a path with NULL or invalid parameters.
508 // 1. Create a path object by calling OH_Drawing_PathCreate
509 OH_Drawing_Path *path = OH_Drawing_PathCreate();
515 OH_Drawing_PathQuadTo(path, 0.00, 100, 200, 200);
517 OH_Drawing_PathQuadTo(path, 100, 0.00, 200, 200);
519 OH_Drawing_PathQuadTo(path, 100, 100, 0.00, 200);
521 OH_Drawing_PathQuadTo(path, 100, 100, 200, 0.00);
523 OH_Drawing_PathDestroy(path);
529 * @tc.desc: Test for adding a quadratic Bezier curve to a path with abnormal data types as parameters.
535 // 1. Create a path object by calling OH_Drawing_PathCreate
536 OH_Drawing_Path *path = OH_Drawing_PathCreate();
537 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
538 OH_Drawing_PathMoveTo(path, 0, 0);
539 // 3. Add a quadratic Bezier curve to the path with the second parameter as an integer
540 OH_Drawing_PathQuadTo(path, 100, 100.0f, 200.0f, 200.0f);
541 // 4. Add a quadratic Bezier curve to the path with the third parameter as an integer
542 OH_Drawing_PathQuadTo(path, 100.0f, 100, 200.0f, 200.0f);
543 // 5. Add a quadratic Bezier curve to the path with the fourth parameter as an integer
544 OH_Drawing_PathQuadTo(path, 100.0f, 100.0f, 200, 200.0f);
545 // 6. Add a quadratic Bezier curve to the path with the fifth parameter as an integer
546 OH_Drawing_PathQuadTo(path, 100.0f, 100.0f, 200.0f, 200);
548 OH_Drawing_PathDestroy(path);
554 * @tc.desc: Test for adding a quadratic Bezier curve to a path with maximal values as parameters.
560 // 1. Create a path object by calling OH_Drawing_PathCreate
561 OH_Drawing_Path *path = OH_Drawing_PathCreate();
562 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
563 OH_Drawing_PathMoveTo(path, 0, 0);
565 OH_Drawing_PathQuadTo(path, FLT_MAX + 1, 100, 200, 200);
567 OH_Drawing_PathQuadTo(path, 100, FLT_MAX + 1, 200, 200);
569 OH_Drawing_PathQuadTo(path, 100, 100, FLT_MAX + 1, 200);
571 OH_Drawing_PathQuadTo(path, 100, 100, 200, FLT_MAX + 1);
573 OH_Drawing_PathDestroy(path);
579 * @tc.desc: Test for adding a conic curve to a path with normal parameters.
585 // 1. Create a path object by calling OH_Drawing_PathCreate
586 OH_Drawing_Path *path = OH_Drawing_PathCreate();
587 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
588 OH_Drawing_PathMoveTo(path, 0, 0);
589 // 3. Add a line segment from the last point of the path to the target point by calling OH_Drawing_PathLineTo
590 OH_Drawing_PathLineTo(path, 100, 100);
591 // 4. Add a quadratic Bezier curve to the path by calling OH_Drawing_PathConicTo
592 OH_Drawing_PathConicTo(path, 50, 50, 100, 100, 0.5);
594 OH_Drawing_PathDestroy(path);
600 * @tc.desc: Test for adding a conic curve to a path with NULL or invalid parameters.
606 // 1. Create a path object by calling OH_Drawing_PathCreate
607 OH_Drawing_Path *path = OH_Drawing_PathCreate();
613 OH_Drawing_PathConicTo(path, 0.00, 50, 100, 100, 0.5);
615 OH_Drawing_PathConicTo(path, 50, 0.00, 100, 100, 0.5);
617 OH_Drawing_PathConicTo(path, 50, 50, 0.00, 100, 0.5);
619 OH_Drawing_PathConicTo(path, 50, 50, 100, 0.00, 0.5);
621 OH_Drawing_PathConicTo(path, 50, 50, 100, 100, 0.00);
623 OH_Drawing_PathDestroy(path);
629 * @tc.desc: Test for adding a conic curve to a path with abnormal data types as parameters.
635 // 1. Create a path object by calling OH_Drawing_PathCreate
636 OH_Drawing_Path *path = OH_Drawing_PathCreate();
637 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
638 OH_Drawing_PathMoveTo(path, 0, 0);
639 // 3. Add a line segment from the last point of the path to the target point by calling OH_Drawing_PathLineTo
640 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
641 // 4. Add a conic curve to the path with the second parameter as an integer or character type
642 OH_Drawing_PathConicTo(path, 50, 50.0f, 100.0f, 100.0f, 0.5f);
643 // 5. Add a conic curve to the path with the third parameter as an integer or character type
644 OH_Drawing_PathConicTo(path, 50.0f, 50, 100.0f, 100.0f, 0.5f);
645 // 6. Add a conic curve to the path with the fourth parameter as an integer or character type
646 OH_Drawing_PathConicTo(path, 50.0f, 50.0f, 100, 100.0f, 0.5f);
647 // 7. Add a conic curve to the path with the fifth parameter as an integer or character type
648 OH_Drawing_PathConicTo(path, 50.0f, 50.0f, 100.0f, 100, 0.5f);
649 // 8. Add a conic curve to the path with the sixth parameter as an integer or character type
650 OH_Drawing_PathConicTo(path, 50.0f, 50.0f, 100.0f, 100.0f, 1);
652 OH_Drawing_PathDestroy(path);
658 * @tc.desc: Test for adding a conic curve to a path with maximal values as parameters.
664 // 1. Create a path object by calling OH_Drawing_PathCreate
665 OH_Drawing_Path *path = OH_Drawing_PathCreate();
666 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
667 OH_Drawing_PathMoveTo(path, 0, 0);
668 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
669 OH_Drawing_PathLineTo(path, 100, 100);
671 OH_Drawing_PathConicTo(path, FLT_MAX + 1, 50, 100, 100, 0.5);
673 OH_Drawing_PathConicTo(path, 50, FLT_MAX + 1, 100, 100, 0.5);
675 OH_Drawing_PathConicTo(path, 50, 50, FLT_MAX + 1, 100, 0.5);
677 OH_Drawing_PathConicTo(path, 50, 50, 100, FLT_MAX + 1, 0.5);
679 OH_Drawing_PathConicTo(path, 50, 50, 100, 100, FLT_MAX + 1);
681 OH_Drawing_PathDestroy(path);
687 * @tc.desc: Test for adding a cubic Bezier curve to a path with normal parameters.
693 // 1. Create a path object by calling OH_Drawing_PathCreate
694 OH_Drawing_Path *path = OH_Drawing_PathCreate();
695 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
696 OH_Drawing_PathMoveTo(path, 0, 0);
697 // 3. Add a cubic Bezier curve from the last point of the path to the target point by calling OH_Drawing_PathCubicTo
698 OH_Drawing_PathCubicTo(path, 100, 100, 200, 200, 300, 300);
700 OH_Drawing_PathDestroy(path);
706 * @tc.desc: Test for adding a cubic Bezier curve to a path with NULL or invalid parameters.
712 // 1. Create a path object by calling OH_Drawing_PathCreate
713 OH_Drawing_Path *path = OH_Drawing_PathCreate();
719 OH_Drawing_PathCubicTo(path, 0.00, 100, 200, 200, 300, 300);
721 OH_Drawing_PathCubicTo(path, 100, 0.00, 200, 200, 300, 300);
723 OH_Drawing_PathCubicTo(path, 100, 100, 0.00, 200, 300, 300);
725 OH_Drawing_PathCubicTo(path, 100, 100, 200, 0.00, 300, 300);
727 OH_Drawing_PathCubicTo(path, 100, 100, 200, 200, 0.00, 300);
729 OH_Drawing_PathCubicTo(path, 100, 100, 200, 200, 300, 0.00);
731 OH_Drawing_PathDestroy(path);
737 * @tc.desc: Test for adding a cubic Bezier curve to a path with abnormal data types as parameters.
743 // 1. Create a path object by calling OH_Drawing_PathCreate
744 OH_Drawing_Path *path = OH_Drawing_PathCreate();
745 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
746 OH_Drawing_PathMoveTo(path, 0, 0);
747 // 3. Add a cubic Bezier curve to the path with the second parameter as an integer
748 OH_Drawing_PathCubicTo(path, 100, 100.0f, 200.0f, 200.0f, 300.0f, 300.0f);
749 // 4. Add a cubic Bezier curve to the path with the third parameter as an integer
750 OH_Drawing_PathCubicTo(path, 100.0f, 100, 200.0f, 200.0f, 300.0f, 300.0f);
751 // 5. Add a cubic Bezier curve to the path with the fourth parameter as an integer
752 OH_Drawing_PathCubicTo(path, 100.0f, 100.0f, 200, 200.0f, 300.0f, 300.0f);
753 // 6. Add a cubic Bezier curve to the path with the fifth parameter as an integer
754 OH_Drawing_PathCubicTo(path, 100.0f, 100.0f, 200.0f, 200, 300.0f, 300.0f);
755 // 7. Add a cubic Bezier curve to the path with the sixth parameter as an integer
756 OH_Drawing_PathCubicTo(path, 100.0f, 100.0f, 200.0f, 200.0f, 300, 300.0f);
757 // 8. Add a cubic Bezier curve to the path with the seventh parameter as an integer
758 OH_Drawing_PathCubicTo(path, 100.0f, 100.0f, 200.0f, 200.0f, 300.0f, 300);
760 OH_Drawing_PathDestroy(path);
766 * @tc.desc: Test for adding a cubic Bezier curve to a path with maximal values as parameters.
772 // 1. Create a path object by calling OH_Drawing_PathCreate
773 OH_Drawing_Path *path = OH_Drawing_PathCreate();
774 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
775 OH_Drawing_PathMoveTo(path, 0, 0);
777 OH_Drawing_PathCubicTo(path, FLT_MAX + 1, 100, 200, 200, 300, 300);
779 OH_Drawing_PathCubicTo(path, 100, FLT_MAX + 1, 200, 200, 300, 300);
781 OH_Drawing_PathCubicTo(path, 100, 100, FLT_MAX + 1, 200, 300, 300);
783 OH_Drawing_PathCubicTo(path, 100, 100, 200, FLT_MAX + 1, 300, 300);
785 OH_Drawing_PathCubicTo(path, 100, 100, 200, 200, FLT_MAX + 1, 300);
787 OH_Drawing_PathCubicTo(path, 100, 100, 200, 200, 300, FLT_MAX + 1);
789 OH_Drawing_PathDestroy(path);
795 * @tc.desc: Test for setting a relative move to a path with normal parameters.
801 // 1. Create a path object by calling OH_Drawing_PathCreate
802 OH_Drawing_Path *path = OH_Drawing_PathCreate();
803 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
804 OH_Drawing_PathMoveTo(path, 0, 0);
805 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
806 OH_Drawing_PathLineTo(path, 100, 100);
807 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
808 OH_Drawing_PathRMoveTo(path, 100, 100);
810 OH_Drawing_PathDestroy(path);
816 * @tc.desc: Test for setting a relative move to a path with NULL or invalid parameters.
822 // 1. Create a path object by calling OH_Drawing_PathCreate
823 OH_Drawing_Path *path = OH_Drawing_PathCreate();
828 OH_Drawing_PathRMoveTo(path, 0.00, 100);
830 OH_Drawing_PathRMoveTo(path, 100, 0.00);
832 OH_Drawing_PathDestroy(path);
838 * @tc.desc: Test for setting a relative move to a path with abnormal data types as parameters.
844 // 1. Create a path object by calling OH_Drawing_PathCreate
845 OH_Drawing_Path *path = OH_Drawing_PathCreate();
846 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
847 OH_Drawing_PathMoveTo(path, 0, 0);
848 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
849 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
850 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
851 OH_Drawing_PathRMoveTo(path, 100, 100.0f);
852 // 5. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
853 OH_Drawing_PathRMoveTo(path, 100.0f, 100);
855 OH_Drawing_PathDestroy(path);
861 * @tc.desc: Test for setting a relative move to a path with maximal values as parameters.
867 // 1. Create a path object by calling OH_Drawing_PathCreate
868 OH_Drawing_Path *path = OH_Drawing_PathCreate();
869 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
870 OH_Drawing_PathMoveTo(path, 0, 0);
871 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
872 OH_Drawing_PathLineTo(path, 100, 100);
873 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
874 OH_Drawing_PathRMoveTo(path, FLT_MAX + 1, 100);
875 // 5. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
876 OH_Drawing_PathRMoveTo(path, 100, FLT_MAX + 1);
878 OH_Drawing_PathDestroy(path);
884 * @tc.desc: Test for adding a relative line to a path with normal parameters.
890 // 1. Create a path object by calling OH_Drawing_PathCreate
891 OH_Drawing_Path *path = OH_Drawing_PathCreate();
892 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
893 OH_Drawing_PathMoveTo(path, 0, 0);
894 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
895 OH_Drawing_PathLineTo(path, 100, 100);
896 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
897 OH_Drawing_PathRMoveTo(path, 100, 100);
898 // 5. Add a relative line to the path from the current endpoint to the target point by calling
900 OH_Drawing_PathRLineTo(path, 100, 100);
902 OH_Drawing_PathDestroy(path);
908 * @tc.desc: Test for adding a relative line to a path with NULL or invalid parameters.
914 // 1. Create a path object by calling OH_Drawing_PathCreate
915 OH_Drawing_Path *path = OH_Drawing_PathCreate();
921 OH_Drawing_PathRLineTo(path, 0.00, 100);
923 OH_Drawing_PathRLineTo(path, 100, 0.00);
925 OH_Drawing_PathDestroy(path);
931 * @tc.desc: Test for adding a relative line to a path with abnormal data types as parameters.
937 // 1. Create a path object by calling OH_Drawing_PathCreate
938 OH_Drawing_Path *path = OH_Drawing_PathCreate();
939 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
940 OH_Drawing_PathMoveTo(path, 0, 0);
941 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
942 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
943 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
944 OH_Drawing_PathRMoveTo(path, 100, 100);
945 // 5. Add a relative line to the path from the current endpoint to the target point by calling
947 OH_Drawing_PathRLineTo(path, 100.0f, 100);
948 // 6. Add a relative line to the path from the current endpoint to the target point by calling
950 OH_Drawing_PathRLineTo(path, 100, 100.0f);
952 OH_Drawing_PathDestroy(path);
958 * @tc.desc: Test for adding a relative line to a path with maximal values as parameters.
964 // 1. Create a path object by calling OH_Drawing_PathCreate
965 OH_Drawing_Path *path = OH_Drawing_PathCreate();
966 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
967 OH_Drawing_PathMoveTo(path, 0, 0);
968 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
969 OH_Drawing_PathLineTo(path, 100, 100);
970 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
971 OH_Drawing_PathRMoveTo(path, 100, 100);
972 // 5. Add a relative line to the path from the current endpoint to the target point by calling
974 OH_Drawing_PathRLineTo(path, FLT_MAX + 1, 100);
975 // 6. Add a relative line to the path from the current endpoint to the target point by calling
977 OH_Drawing_PathRLineTo(path, 100, FLT_MAX + 1);
979 OH_Drawing_PathDestroy(path);
985 * @tc.desc: Test for adding a relative quadratic Bezier curve to a path with normal parameters.
991 // 1. Create a path object by calling OH_Drawing_PathCreate
992 OH_Drawing_Path *path = OH_Drawing_PathCreate();
993 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
994 OH_Drawing_PathMoveTo(path, 0, 0);
995 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
996 OH_Drawing_PathLineTo(path, 100, 100);
997 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
998 OH_Drawing_PathRMoveTo(path, 100, 100);
999 // 5. Add a relative quadratic Bezier curve to the path from the current endpoint to the target point by calling
1001 OH_Drawing_PathRQuadTo(path, 100, 100, 200, 200);
1003 OH_Drawing_PathDestroy(path);
1009 * @tc.desc: Test for adding a relative quadratic Bezier curve to a path with NULL or invalid parameters.
1015 // 1. Create a path object by calling OH_Drawing_PathCreate
1016 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1022 OH_Drawing_PathRQuadTo(path, 0.00, 100, 100, 300);
1024 OH_Drawing_PathRQuadTo(path, 100, 0.00, 100, 300);
1026 OH_Drawing_PathRQuadTo(path, 100, 100, 0.00, 300);
1028 OH_Drawing_PathRQuadTo(path, 100, 100, 100, 0.00);
1030 OH_Drawing_PathDestroy(path);
1036 * @tc.desc: Test for adding a relative quadratic Bezier curve to a path with abnormal data types as parameters.
1042 // 1. Create a path object by calling OH_Drawing_PathCreate
1043 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1044 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1045 OH_Drawing_PathMoveTo(path, 0, 0);
1046 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1047 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1048 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1049 OH_Drawing_PathRMoveTo(path, 100, 100);
1051 OH_Drawing_PathRQuadTo(path, 100, 100.0f, 100.0f, 300.0f);
1053 OH_Drawing_PathRQuadTo(path, 100.0f, 100, 100.0f, 300.0f);
1055 OH_Drawing_PathRQuadTo(path, 100.0f, 100.0f, 100, 300.0f);
1057 OH_Drawing_PathRQuadTo(path, 100.0f, 100.0f, 100.0f, 300);
1059 OH_Drawing_PathDestroy(path);
1065 * @tc.desc: Test for adding a relative quadratic Bezier curve to a path with maximal values as parameters.
1071 // 1. Create a path object by calling OH_Drawing_PathCreate
1072 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1073 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1074 OH_Drawing_PathMoveTo(path, 0, 0);
1075 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1076 OH_Drawing_PathLineTo(path, 100, 100);
1077 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1078 OH_Drawing_PathRMoveTo(path, 100, 100);
1080 OH_Drawing_PathRQuadTo(path, FLT_MAX + 1, 100, 100, 300);
1082 OH_Drawing_PathRQuadTo(path, 100, FLT_MAX + 1, 100, 300);
1084 OH_Drawing_PathRQuadTo(path, 100, 100, FLT_MAX + 1, 300);
1086 OH_Drawing_PathRQuadTo(path, 100, 100, 100, FLT_MAX + 1);
1088 OH_Drawing_PathDestroy(path);
1094 * @tc.desc: Test for adding a relative conic curve to a path with normal parameters.
1100 // 1. Create a path object by calling OH_Drawing_PathCreate
1101 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1102 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1103 OH_Drawing_PathMoveTo(path, 0, 0);
1104 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1105 OH_Drawing_PathLineTo(path, 100, 100);
1106 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1107 OH_Drawing_PathRMoveTo(path, 100, 100);
1108 // 5. Add a relative conic curve to the path from the current endpoint to the target point by calling
1110 OH_Drawing_PathRConicTo(path, 100, 100, 100, 300, 5);
1112 OH_Drawing_PathDestroy(path);
1118 * @tc.desc: Test for adding a relative conic curve to a path with NULL or invalid parameters.
1124 // 1. Create a path object by calling OH_Drawing_PathCreate
1125 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1131 OH_Drawing_PathRConicTo(path, 0.00, 100, 100, 300, 5);
1133 OH_Drawing_PathRConicTo(path, 100, 0.00, 100, 300, 5);
1135 OH_Drawing_PathRConicTo(path, 100, 100, 0.00, 300, 5);
1137 OH_Drawing_PathRConicTo(path, 100, 100, 100, 0.00, 5);
1139 OH_Drawing_PathRConicTo(path, 100, 100, 100, 300, 0.00);
1141 OH_Drawing_PathDestroy(path);
1147 * @tc.desc: Test for adding a relative conic curve to a path with abnormal data types as parameters.
1153 // 1. Create a path object by calling OH_Drawing_PathCreate
1154 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1155 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1156 OH_Drawing_PathMoveTo(path, 0, 0);
1157 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1158 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1159 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1160 OH_Drawing_PathRMoveTo(path, 100, 100);
1162 OH_Drawing_PathRConicTo(path, 100, 100.0f, 100.0f, 300.0f, 5.0f);
1164 OH_Drawing_PathRConicTo(path, 100.0f, 100, 100.0f, 300.0f, 5.0f);
1166 OH_Drawing_PathRConicTo(path, 100.0f, 100.0f, 100, 300.0f, 5.0f);
1168 OH_Drawing_PathRConicTo(path, 100.0f, 100.0f, 100.0f, 300, 5.0f);
1170 OH_Drawing_PathRConicTo(path, 100.0f, 100.0f, 100.0f, 300.0f, 5);
1172 OH_Drawing_PathDestroy(path);
1178 * @tc.desc: Test for adding a relative conic curve to a path with maximal values as parameters.
1184 // 1. Create a path object by calling OH_Drawing_PathCreate
1185 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1186 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1187 OH_Drawing_PathMoveTo(path, 0, 0);
1188 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1189 OH_Drawing_PathLineTo(path, 100, 100);
1190 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1191 OH_Drawing_PathRMoveTo(path, 100, 100);
1193 OH_Drawing_PathRConicTo(path, FLT_MAX + 1, 100, 100, 300, 5);
1195 OH_Drawing_PathRConicTo(path, 100, FLT_MAX + 1, 100, 300, 5);
1197 OH_Drawing_PathRConicTo(path, 100, 100, FLT_MAX + 1, 300, 5);
1199 OH_Drawing_PathRConicTo(path, 100, 100, 100, FLT_MAX + 1, 5);
1201 OH_Drawing_PathRConicTo(path, 100, 100, 100, 300, FLT_MAX + 1);
1203 OH_Drawing_PathDestroy(path);
1209 * @tc.desc: Test for adding a relative cubic Bezier curve to a path with normal parameters.
1215 // 1. Create a path object by calling OH_Drawing_PathCreate
1216 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1217 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1218 OH_Drawing_PathMoveTo(path, 0, 0);
1219 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1220 OH_Drawing_PathLineTo(path, 100, 100);
1221 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1222 OH_Drawing_PathRMoveTo(path, 100, 100);
1223 // 5. Add a relative cubic Bezier curve to the path from the current endpoint to the target point by calling
1225 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 200, 300, 300);
1227 OH_Drawing_PathDestroy(path);
1233 * @tc.desc: Test for adding a relative cubic Bezier curve to a path with NULL or invalid parameters.
1239 // 1. Create a path object by calling OH_Drawing_PathCreate
1240 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1245 OH_Drawing_PathRCubicTo(path, 0.00, 100, 200, 200, 300, 300);
1247 OH_Drawing_PathRCubicTo(path, 100, 0.00, 200, 200, 300, 300);
1249 OH_Drawing_PathRCubicTo(path, 100, 100, 0.00, 200, 300, 300);
1251 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 0.00, 300, 300);
1253 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 200, 0.00, 300);
1255 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 200, 300, 0.00);
1257 OH_Drawing_PathDestroy(path);
1263 * @tc.desc: Test for adding a relative cubic Bezier curve to a path with abnormal data types as parameters.
1269 // 1. Create a path object by calling OH_Drawing_PathCreate
1270 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1271 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1272 OH_Drawing_PathMoveTo(path, 0, 0);
1273 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1274 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1275 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1276 OH_Drawing_PathRMoveTo(path, 100, 100);
1278 OH_Drawing_PathRCubicTo(path, 100, 100.0f, 200.0f, 200.0f, 300.0f, 300.0f);
1280 OH_Drawing_PathRCubicTo(path, 100.0f, 100, 200.0f, 200.0f, 300.0f, 300.0f);
1282 OH_Drawing_PathRCubicTo(path, 100.0f, 100.0f, 200, 200.0f, 300.0f, 300.0f);
1284 OH_Drawing_PathRCubicTo(path, 100.0f, 100.0f, 200.0f, 200, 300.0f, 300.0f);
1286 OH_Drawing_PathRCubicTo(path, 100.0f, 100.0f, 200.0f, 200.0f, 300, 300.0f);
1288 OH_Drawing_PathRCubicTo(path, 100.0f, 100.0f, 200.0f, 200.0f, 300.0f, 300);
1290 OH_Drawing_PathDestroy(path);
1296 * @tc.desc: Test for adding a relative cubic Bezier curve to a path with maximal values as parameters.
1302 // 1. Create a path object by calling OH_Drawing_PathCreate
1303 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1304 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1305 OH_Drawing_PathMoveTo(path, 0, 0);
1306 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1307 OH_Drawing_PathLineTo(path, 100, 100);
1308 // 4. Set a relative move to the path starting from the current endpoint by calling OH_Drawing_PathRMoveTo
1309 OH_Drawing_PathRMoveTo(path, 100, 100);
1311 OH_Drawing_PathRCubicTo(path, FLT_MAX + 1, 100, 200, 200, 300, 300);
1313 OH_Drawing_PathRCubicTo(path, 100, FLT_MAX + 1, 200, 200, 300, 300);
1315 OH_Drawing_PathRCubicTo(path, 100, 100, FLT_MAX + 1, 200, 300, 300);
1317 OH_Drawing_PathRCubicTo(path, 100, 100, 200, FLT_MAX + 1, 300, 300);
1319 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 200, FLT_MAX + 1, 300);
1321 OH_Drawing_PathRCubicTo(path, 100, 100, 200, 200, 300, FLT_MAX + 1);
1323 OH_Drawing_PathDestroy(path);
1329 * @tc.desc: Test for adding a rectangle to a path with normal parameters.
1335 // 1. Create a path object by calling OH_Drawing_PathCreate
1336 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1337 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1338 OH_Drawing_PathMoveTo(path, 0, 0);
1339 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1340 OH_Drawing_PathLineTo(path, 100, 100);
1341 // 4. Add a rectangle outline to the path with the specified direction by calling OH_Drawing_PathAddRect. Iterate
1343 OH_Drawing_PathAddRect(path, 100, 100, 200, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1345 OH_Drawing_PathDestroy(path);
1351 * @tc.desc: Test for adding a rectangle to a path with NULL or invalid parameters.
1357 // 1. Create a path object by calling OH_Drawing_PathCreate
1358 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1363 OH_Drawing_PathAddRect(path, 0.00, 100, 200, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1365 OH_Drawing_PathAddRect(path, 100, 0.00, 200, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1367 OH_Drawing_PathAddRect(path, 100, 100, 0.00, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1369 OH_Drawing_PathAddRect(path, 100, 100, 200, 0.00, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1371 OH_Drawing_PathDestroy(path);
1377 * @tc.desc: Test for adding a rectangle to a path with abnormal data types as parameters.
1383 // 1. Create a path object by calling OH_Drawing_PathCreate
1384 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1385 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1386 OH_Drawing_PathMoveTo(path, 0, 0);
1387 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1388 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1390 OH_Drawing_PathAddRect(path, 100, 100.0f, 200.0f, 200.0f, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1392 OH_Drawing_PathAddRect(path, 100.0f, 100, 200.0f, 200.0f, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1394 OH_Drawing_PathAddRect(path, 100.0f, 100.0f, 200, 200.0f, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1396 OH_Drawing_PathAddRect(path, 100.0f, 100.0f, 200.0f, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1398 OH_Drawing_PathDestroy(path);
1404 * @tc.desc: Test for adding a rectangle to a path with maximal values as parameters.
1410 // 1. Create a path object by calling OH_Drawing_PathCreate
1411 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1412 // 2. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1413 OH_Drawing_PathMoveTo(path, 0, 0);
1414 // 3. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1415 OH_Drawing_PathLineTo(path, 100, 100);
1417 OH_Drawing_PathAddRect(path, FLT_MAX + 1, 100, 200, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1419 OH_Drawing_PathAddRect(path, 100, FLT_MAX + 1, 200, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1421 OH_Drawing_PathAddRect(path, 100, 100, FLT_MAX + 1, 200, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1423 OH_Drawing_PathAddRect(path, 100, 100, 200, FLT_MAX + 1, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1425 OH_Drawing_PathDestroy(path);
1431 * @tc.desc: Test for adding a rectangle to a path with initial corner and normal parameters.
1437 // 1. Create a path object by calling OH_Drawing_PathCreate
1438 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1441 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1442 OH_Drawing_PathMoveTo(path, 0, 0);
1443 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1444 OH_Drawing_PathLineTo(path, 100, 100);
1445 // 5. Add a rectangle outline to the path with the specified direction by calling
1447 OH_Drawing_PathAddRectWithInitialCorner(path, rect, OH_Drawing_PathDirection::PATH_DIRECTION_CW, 0);
1449 OH_Drawing_PathDestroy(path);
1456 * @tc.desc: Test for adding a rectangle to a path with initial corner and NULL or invalid parameters.
1462 // 1. Create a path object by calling OH_Drawing_PathCreate
1463 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1472 OH_Drawing_PathAddRectWithInitialCorner(path, nullptr, OH_Drawing_PathDirection::PATH_DIRECTION_CW, 0);
1475 OH_Drawing_PathAddRectWithInitialCorner(path, rect, OH_Drawing_PathDirection::PATH_DIRECTION_CW, 0);
1477 OH_Drawing_PathDestroy(path);
1484 * @tc.desc: Test for adding a rectangle to a path with initial corner and abnormal data types as parameters.
1490 // 1. Create a path object by calling OH_Drawing_PathCreate
1491 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1494 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1495 OH_Drawing_PathMoveTo(path, 0, 0);
1496 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1497 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1499 OH_Drawing_PathAddRectWithInitialCorner(path, rect, OH_Drawing_PathDirection::PATH_DIRECTION_CW, 5.0f);
1501 OH_Drawing_PathDestroy(path);
1508 * @tc.desc: Test for adding a rectangle to a path with initial corner and maximal values as parameters.
1514 // 1. Create a path object by calling OH_Drawing_PathCreate
1515 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1518 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1519 OH_Drawing_PathMoveTo(path, 0, 0);
1520 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1521 OH_Drawing_PathLineTo(path, 100, 100);
1524 OH_Drawing_PathAddRectWithInitialCorner(path, rect, OH_Drawing_PathDirection::PATH_DIRECTION_CW, INT32_MAX);
1526 OH_Drawing_PathDestroy(path);
1532 * @tc.desc: Test for adding a round rectangle to a path with normal parameters.
1538 // 1. Create a path object by calling OH_Drawing_PathCreate
1539 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1543 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1544 OH_Drawing_PathMoveTo(path, 0, 0);
1545 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1546 OH_Drawing_PathLineTo(path, 100, 100);
1547 // 5. Add the rounded rectangle outline to the path with the specified direction by calling
1554 OH_Drawing_PathAddRoundRect(path, roundRect, directions[i]);
1557 OH_Drawing_PathDestroy(path);
1565 * @tc.desc: Test for adding a round rectangle to a path with NULL or invalid parameters.
1571 // 1. Create a path object by calling OH_Drawing_PathCreate
1572 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1582 OH_Drawing_PathAddRoundRect(path, nullptr, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1585 OH_Drawing_PathDestroy(path);
1593 * @tc.desc: Test for adding an oval to a path with initial point and normal parameters.
1599 // 1. Create a path object by calling OH_Drawing_PathCreate
1600 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1603 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1604 OH_Drawing_PathMoveTo(path, 0, 0);
1605 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1606 OH_Drawing_PathLineTo(path, 100, 100);
1607 // 5. Add an oval to the path, where the rectangle object is the bounding rectangle of the oval. Iterate through the
1614 OH_Drawing_PathAddOvalWithInitialPoint(path, rect, 10, directions[i]);
1617 OH_Drawing_PathDestroy(path);
1624 * @tc.desc: Test for adding an oval to a path with initial point and NULL or invalid parameters.
1630 // 1. Create a path object by calling OH_Drawing_PathCreate
1631 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1640 OH_Drawing_PathAddOvalWithInitialPoint(path, nullptr, 10, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1643 OH_Drawing_PathAddOvalWithInitialPoint(path, rect, 0, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1645 OH_Drawing_PathDestroy(path);
1652 * @tc.desc: Test for adding an oval to a path with initial point and abnormal data types as parameters.
1658 // 1. Create a path object by calling OH_Drawing_PathCreate
1659 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1662 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1663 OH_Drawing_PathMoveTo(path, 0, 0);
1664 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1665 OH_Drawing_PathLineTo(path, 100.0f, 100.0f);
1667 OH_Drawing_PathAddOvalWithInitialPoint(path, rect, 5.0f, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1669 OH_Drawing_PathDestroy(path);
1676 * @tc.desc: Test for adding an oval to a path with initial point and maximal values as parameters.
1682 // 1. Create a path object by calling OH_Drawing_PathCreate
1683 OH_Drawing_Path *path = OH_Drawing_PathCreate();
1686 // 3. Set the starting point of the path by calling OH_Drawing_PathMoveTo
1687 OH_Drawing_PathMoveTo(path, 0, 0);
1688 // 4. Add a line segment from the starting point of the path to the target point by calling OH_Drawing_PathLineTo
1689 OH_Drawing_PathLineTo(path, 100, 100);
1692 OH_Drawing_PathAddOvalWithInitialPoint(path, rect, UINT32_MAX + 1, OH_Drawing_PathDirection::PATH_DIRECTION_CW);
1694 OH_Drawing_PathDestroy(path);