示例#1
0
 public static RRect fromRectAndCorners(
     Rect rect,
     Radius topLeft = null, Radius topRight = null, Radius bottomRight = null, Radius bottomLeft = null)
 {
     return(new RRect(rect.left, rect.top, rect.right, rect.bottom,
                      topLeft, topRight, bottomRight, bottomLeft));
 }
示例#2
0
 internal static bool _radiusIsValid(Radius radius)
 {
     D.assert(radius != null, () => "Radius argument was null.");
     D.assert(!radius.x.isNaN() && !radius.y.isNaN(), () => "Radius argument contained a NaN value.");
     return(true);
 }
示例#3
0
 public static RRect fromRectAndRadius(Rect rect, Radius radius)
 {
     return(new RRect(rect.left, rect.top, rect.right, rect.bottom,
                      radius, radius, radius, radius));
 }
示例#4
0
 public static RRect fromLTRBAndCorners(
     float left, float top, float right, float bottom,
     Radius topLeft = null, Radius topRight = null, Radius bottomRight = null, Radius bottomLeft = null)
 {
     return(new RRect(left, top, right, bottom,
                      topLeft, topRight, bottomRight, bottomLeft));
 }
示例#5
0
 public static RRect fromLTRBR(
     float left, float top, float right, float bottom, Radius radius)
 {
     return(new RRect(left, top, right, bottom,
                      radius, radius, radius, radius));
 }
示例#6
0
 RRect(float left, float top, float right, float bottom,
       Radius tlRadius = null, Radius trRadius = null, Radius brRadius = null, Radius blRadius = null)
 {
     this.left     = left;
     this.top      = top;
     this.right    = right;
     this.bottom   = bottom;
     this.tlRadius = tlRadius ?? Radius.zero;
     this.trRadius = trRadius ?? Radius.zero;
     this.brRadius = brRadius ?? Radius.zero;
     this.blRadius = blRadius ?? Radius.zero;
 }
示例#7
0
 public static RRect fromLTRBAndCorners(
     double left, double top, double right, double bottom,
     Radius topLeft = null, Radius topRight = null, Radius bottomRight = null, Radius bottomLeft = null)
 {
     return(new RRect(left, top, right, bottom,
                      topLeft, topRight, bottomRight, bottomLeft));
 }
示例#8
0
 public static RRect fromLTRBR(
     double left, double top, double right, double bottom, Radius radius)
 {
     return(new RRect(left, top, right, bottom,
                      radius, radius, radius, radius));
 }
示例#9
0
 RRect(double left, double top, double right, double bottom,
       Radius tlRadius = null, Radius trRadius = null, Radius brRadius = null, Radius blRadius = null)
 {
     this.left     = left;
     this.top      = top;
     this.right    = right;
     this.bottom   = bottom;
     this.tlRadius = tlRadius ?? Radius.zero;
     this.trRadius = trRadius ?? Radius.zero;
     this.brRadius = brRadius ?? Radius.zero;
     this.blRadius = blRadius ?? Radius.zero;
 }