Exemplo n.º 1
0
 /// <summary>
 /// Determines whether or not the specified <code>Object</code> is
 /// equal to this <code>RoundRectangle2D</code>.  The specified
 /// <code>Object</code> is equal to this <code>RoundRectangle2D</code>
 /// if it is an instance of <code>RoundRectangle2D</code> and if its
 /// location, size, and corner arc dimensions are the same as this
 /// <code>RoundRectangle2D</code>. </summary>
 /// <param name="obj">  an <code>Object</code> to be compared with this
 ///             <code>RoundRectangle2D</code>. </param>
 /// <returns>  <code>true</code> if <code>obj</code> is an instance
 ///          of <code>RoundRectangle2D</code> and has the same values;
 ///          <code>false</code> otherwise.
 /// @since 1.6 </returns>
 public override bool Equals(Object obj)
 {
     if (obj == this)
     {
         return(true);
     }
     if (obj is RoundRectangle2D)
     {
         RoundRectangle2D rr2d = (RoundRectangle2D)obj;
         return((X == rr2d.X) && (Y == rr2d.Y) && (Width == rr2d.Width) && (Height == rr2d.Height) && (ArcWidth == rr2d.ArcWidth) && (ArcHeight == rr2d.ArcHeight));
     }
     return(false);
 }
Exemplo n.º 2
0
 internal RoundRectIterator(RoundRectangle2D rr, AffineTransform at)
 {
     this.x      = rr.X;
     this.y      = rr.Y;
     this.w      = rr.Width;
     this.h      = rr.Height;
     this.Aw     = System.Math.Min(w, System.Math.Abs(rr.ArcWidth));
     this.Ah     = System.Math.Min(h, System.Math.Abs(rr.ArcHeight));
     this.Affine = at;
     if (Aw < 0 || Ah < 0)
     {
         // Don't draw anything...
         Index = Ctrlpts.Length;
     }
 }