690 {
691
692
694 {{ 0, 0 }, { 0, 0 }, { 10, 10 }, { 10, 10 }},
695 2.5f,
696 {{ 0.000000f, 0.000000f }, { 0.000000f, 0.000000f }, { 1.065055f, 1.065055f },
697 { 2.500000f, 2.500000f },
698 { 5.461981f, 5.461981f }, { 10.000000f, 10.000000f }, { 10.000000f, 10.000000f }}
699 );
701 {{ 0, 0 }, { 0, 0 }, { 10, 10 }, { 10, 10 }},
702 5.0f,
703 {{ 0.000000f, 0.000000f }, { 0.000000f, 0.000000f }, { 2.500000f, 2.500000f },
704 { 5.000000f, 5.000000f },
705 { 7.500000f, 7.500000f }, { 10.000000f, 10.000000f }, { 10.000000f, 10.000000f }}
706 );
708 {{ 0, 0 }, { 0, 0 }, { 10, 10 }, { 10, 10 }},
709 9.0f,
710 {{ 0.000000f, 0.000000f }, { 0.000000f, 0.000000f }, { 6.467375f, 6.467375f },
711 { 9.000000f, 9.000000f },
712 { 9.616623f, 9.616623f }, { 10.000000f, 10.000000f }, { 10.000000f, 10.000000f }}
713 );
715 {{ 0, 0 }, { 0, 0 }, { 10, 10 }, { 10, 10 }},
716 10.0f,
717 {{ 0.000000f, 0.000000f }, { 0.000000f, 0.000000f }, { 10.000000f, 10.000000f },
718 { 10.000000f, 10.000000f },
719 { 10.000000f, 10.000000f }, { 10.000000f, 10.000000f }, { 10.000000f, 10.000000f }}
720 );
721
723 {{ 1, 1 }, { 5, 2 }, { 7, 4 }, { 8, 7 }},
724 2.0f,
725 {{ 1.000000f, 1.000000f }, { 2.055050f, 1.263763f }, { 2.970959f, 1.597096f },
726 { 3.766077f, 2.000000f },
727 { 5.985480f, 3.124621f }, { 7.263762f, 4.791288f }, { 8.000000f, 7.000000f }}
728 );
730 {{ 1, 1 }, { 5, 2 }, { 7, 4 }, { 8, 7 }},
731 5.0f,
732 {{ 1.000000f, 1.000000f }, { 4.033223f, 1.758306f }, { 5.916391f, 3.091639f },
733 { 7.085550f, 5.000000f },
734 { 7.458195f, 5.608251f }, { 7.758306f, 6.274917f }, { 8.000000f, 7.000000f }}
735 );
736
738 {{ 2, 7 }, { 3, 2 }, { 6, 3 }, { 11, 2 }},
739 5.0f,
740 {{ 2.000000f, 7.000000f }, { 2.162856f, 6.185719f }, { 2.378757f, 5.530570f },
741 { 2.647702f, 5.000000f },
742 { 4.030182f, 2.272668f }, { 6.814281f, 2.837144f }, { 11.000000f, 2.000000f }}
743 );
745 {{ 2, 7 }, { 3, 2 }, { 6, 3 }, { 11, 2 }},
746 3.0f,
747 {{ 2.000000f, 7.000000f }, { 2.500000f, 4.500000f }, { 3.500000f, 3.500000f },
748 { 5.000000f, 3.000000f },
749 { 6.500000f, 2.500000f }, { 8.500000f, 2.500000f }, { 11.000000f, 2.000000f }}
750 );
752 {{ 2, 7 }, { 3, 2 }, { 6, 3 }, { 11, 2 }},
753 2.5f,
754 {{ 2.000000f, 7.000000f }, { 2.750000f, 3.250000f }, { 4.625000f, 2.875000f },
755 { 7.625000f, 2.500000f },
756 { 8.625000f, 2.375000f }, { 9.750000f, 2.250000f }, { 11.000000f, 2.000000f }}
757 );
758
759
760
761
763 {{ 11, 2 }, { 6, 3 }, { 3, 2 }, { 2, 7 }},
764 5.0f,
765 {{ 11.000000f, 2.000000f }, { 6.814281f, 2.837144f }, { 4.030182f, 2.272668f },
766 { 2.647702f, 5.000000f },
767 { 2.378757f, 5.530570f }, { 2.162856f, 6.185719f }, { 2.000000f, 7.000000f }}
768 );
770 {{ 11, 2 }, { 6, 3 }, { 3, 2 }, { 2, 7 }},
771 3.0f,
772 {{ 11.000000f, 2.000000f }, { 8.500000f, 2.500000f }, { 6.500000f, 2.500000f },
773 { 5.000000f, 3.000000f },
774 { 3.500000f, 3.500000f }, { 2.500000f, 4.500000f }, { 2.000000f, 7.000000f }}
775 );
777 {{ 11, 2 }, { 6, 3 }, { 3, 2 }, { 2, 7 }},
778 2.5f,
779 {{ 11.000000f, 2.000000f }, { 9.750000f, 2.250000f }, { 8.625000f, 2.375000f },
780 { 7.625000f, 2.500000f },
781 { 4.625000f, 2.875000f }, { 2.750000f, 3.250000f }, { 2.000000f, 7.000000f }}
782 );
783
785 {{ -2, 100 }, { 0, 0 }, { 0, 0 }, { 100, -2 }},
786 90.f,
787 {{ -2.000000f,100.000000f }, { -1.930979f, 96.548965f }, { -1.864341f, 93.217033f },
788 { -1.795892f, 90.000000f },
789 { 0.119096f, -0.002382f }, { 3.451032f, -0.069021f }, {100.000000f, -2.000000f }}
790 );
792 {{ -2, 100 }, { 0, 0 }, { 0, 0 }, { 100, -2 }},
793 10.f,
794 {{ -2.000000f,100.000000f }, { -0.937505f, 46.875271f }, { -0.439458f, 21.972910f },
795 { 14.787060f, 10.000000f },
796 { 28.222368f, -0.564447f }, { 53.124729f, -1.062495f }, {100.000000f, -2.000000f }}
797 );
799 {{ -2, 100 }, { 0, 0 }, { 0, 0 }, { 100, -2 }},
800 0.f,
801 {{ -2.000000f,100.000000f }, { -0.426983f, 21.349131f }, { -0.091157f, 4.557854f },
802 { 48.633648f, 0.000000f },
803 { 61.859592f, -1.237192f }, { 78.650871f, -1.573017f }, {100.000000f, -2.000000f }}
804 );
805
807 {{-250.121582f, -1180.09509f}, {10.007843f, -1180.09509f},
808 {20.015685f, -786.041259f}, {40.0313721f, 2.0664072f}},
809 0.f,
810 {{-250.121582f, -1180.095093f}, {9.780392f, -1180.095093f}, {19.997992f, -786.730042f},
811 {39.978889f, 0.000000f},
812 {39.996376f, 0.688501f}, {40.013870f, 1.377304f}, {40.031372f, 2.066407f}}
813 );
814}
static void testChopMonoCubicAtY(skiatest::Reporter *reporter, std::string name, SkSpan< const SkPoint > curveInputs, SkScalar yToChopAt, SkSpan< const SkPoint > expectedOutputs)