Ejemplo n.º 1
0
        public bool ListArc(Vector2 center, double sweepAngle)
        {
            if (this.CtlGetStatus(RtcStatus.Aborted))
            {
                return(false);
            }

            Vector2 v    = Vector2.Transform(center, this.Matrix.Calculate);
            int     quot = (int)(Math.Abs(sweepAngle) / 360.0);
            double  rem  = sweepAngle - Math.Sign(sweepAngle) * 360.0f * quot;

            if (!this.IsListReady((uint)(quot + 1)))
            {
                return(false);
            }
            for (int i = 0; i < quot; i++)
            {
                RTC6Wrap.n_arc_abs(this.Index + 1, (int)(center.X * this.kFactor), (int)(center.Y * this.kFactor), Math.Sign(sweepAngle) * -360.0);
            }
            RTC6Wrap.n_arc_abs(this.Index + 1, (int)(center.X * this.kFactor), (int)(center.Y * this.kFactor), -rem);
            return(true);
        }