Exemple #1
0
        public static RRect fromRectAndRadius(Rect rect, float radius)
        {
            var r = Radius.circular(radius);

            return(new RRect(rect.left, rect.top, rect.right, rect.bottom,
                             r, r, r, r));
        }
Exemple #2
0
        public static RRect fromLTRBR(
            float left, float top, float right, float bottom, float radius)
        {
            var r = Radius.circular(radius);

            return(new RRect(left, top, right, bottom,
                             r, r, r, r));
        }
Exemple #3
0
        public static RRect fromLTRBR(
            double left, double top, double right, double bottom, double radius)
        {
            var r = Radius.circular(radius);

            return(new RRect(left, top, right, bottom,
                             r, r, r, r));
        }
Exemple #4
0
        RRect(float left, float top, float right, float bottom,
              float?tlRadius = null, float?trRadius = null, float?brRadius = null, float?blRadius = null)
        {
            this.left     = left;
            this.top      = top;
            this.right    = right;
            this.bottom   = bottom;
            this.tlRadius = tlRadius != null?Radius.circular(tlRadius.Value) : Radius.zero;

            this.trRadius = trRadius != null?Radius.circular(trRadius.Value) : Radius.zero;

            this.brRadius = brRadius != null?Radius.circular(brRadius.Value) : Radius.zero;

            this.blRadius = blRadius != null?Radius.circular(blRadius.Value) : Radius.zero;
        }
Exemple #5
0
        RRect(double left, double top, double right, double bottom,
              double?tlRadius = null, double?trRadius = null, double?brRadius = null, double?blRadius = null)
        {
            this.left     = left;
            this.top      = top;
            this.right    = right;
            this.bottom   = bottom;
            this.tlRadius = tlRadius != null?Radius.circular(tlRadius.Value) : Radius.zero;

            this.trRadius = trRadius != null?Radius.circular(trRadius.Value) : Radius.zero;

            this.brRadius = brRadius != null?Radius.circular(brRadius.Value) : Radius.zero;

            this.blRadius = blRadius != null?Radius.circular(blRadius.Value) : Radius.zero;
        }