예제 #1
0
        public void DrawRoundRect(float x, float y, float w, float h, float rx, float ry)
        {
            roundRect.SetRect(x, y, x + w, y + h);
            roundRect.SetRadius(rx, ry);
            var vxs = this.aggStroke.MakeVxs(roundRect.MakeVxs());

            switch (this.SmoothMode)
            {
            case CanvasSmoothMode.AggSmooth:
            {
                sclineRas.Reset();
                sclineRas.AddPath(vxs);
                sclineRasToGL.DrawWithColor(sclineRas, sclinePack8, this.strokeColor);
            }
            break;

            default:
            {
                sclineRas.Reset();
                sclineRas.AddPath(vxs);
                sclineRasToGL.DrawWithColor(sclineRas, sclinePack8, this.strokeColor);
            }
            break;
            }
        }
예제 #2
0
 public void FillRoundRectangle(double left, double bottom, double right, double top, double radius)
 {
     if (roundRect == null)
     {
         roundRect = new RoundedRect(left, bottom, right, top, radius);
         roundRect.NormalizeRadius();
     }
     else
     {
         roundRect.SetRect(left, bottom, right, top);
         roundRect.SetRadius(radius);
         roundRect.NormalizeRadius();
     }
     this.Fill(roundRect.MakeVxs());
 }
예제 #3
0
        public override void DrawRoundRect(double left, double bottom, double right, double top, double radius)
        {
            if (roundRect == null)
            {
                roundRect = new RoundedRect(left, bottom, right, top, radius);
                roundRect.NormalizeRadius();
            }
            else
            {
                roundRect.SetRect(left, bottom, right, top);
                roundRect.SetRadius(radius);
                roundRect.NormalizeRadius();
            }
            var v1 = GetFreeVxs();

            this.Draw(roundRect.MakeVxs(v1));
            ReleaseVxs(ref v1);
        }