Exemple #1
0
    private void PreRoundedRect(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5, Vector2 p6, Vector2 p7,
                                Vector2 p8, float r1, float r2, float angle)
    {
        float dxy = ((r1 > r2) ? (int)r1 : (int)r2);

        ResetSubBuffer();

        ExpandBounds(p1, dxy, dxy);
        ExpandBounds(p2, dxy, dxy);
        ExpandBounds(p3, dxy, dxy);
        ExpandBounds(p4, dxy, dxy);
        ExpandBounds(p5, dxy, dxy);
        ExpandBounds(p6, dxy, dxy);
        ExpandBounds(p7, dxy, dxy);
        ExpandBounds(p8, dxy, dxy);

        basicDraw.MoveTo(p1);
        basicDraw.LineTo(p2);
        basicDraw.ArcTo(r1, r2, angle, false, true, p3);

        basicDraw.MoveTo(p3);
        basicDraw.LineTo(p4);
        basicDraw.ArcTo(r1, r2, angle, false, true, p5);

        basicDraw.MoveTo(p5);
        basicDraw.LineTo(p6);
        basicDraw.ArcTo(r1, r2, angle, false, true, p7);

        basicDraw.MoveTo(p7);
        basicDraw.LineTo(p8);
        basicDraw.ArcTo(r1, r2, angle, false, true, p1);
    }
Exemple #2
0
 public void ArcTo(float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag, Vector2 p)
 {
     if ((isUseWidth) && ((int)_width > 1))
     {
         ArcTo(r1, r2, angle, largeArcFlag, sweepFlag, p, _width);
     }
     else
     {
         _basicDraw.ArcTo(r1, r2, angle, largeArcFlag, sweepFlag, p);
     }
 }