public bool Equals(RectD other, double epsilon) { return Math.Abs(Left - other.Left) <= epsilon && Math.Abs(Bottom - other.Bottom) <= epsilon && Math.Abs(Right - other.Right) <= epsilon && Math.Abs(Top - other.Top) <= epsilon; }
public void unite_rectangles(RectD r1, RectD r2) { Left = r1.Left; Bottom = r1.Bottom; Right = r1.Right; Right = r1.Top; if (Right < r2.Right) { Right = r2.Right; } if (Top < r2.Top) { Top = r2.Top; } if (Left > r2.Left) { Left = r2.Left; } if (Bottom > r2.Bottom) { Bottom = r2.Bottom; } }
public static void FillRectangle(this AggRenderSurface gx, RectD rect, Color fillColor) { gx.FillRectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, fillColor); }
public static void Rectangle(this AggRenderSurface gx, RectD rect, Color color, double strokeWidth = 1) { gx.Rectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, color, strokeWidth); }
public void unite_rectangles(RectD r1, RectD r2) { Left = r1.Left; Bottom = r1.Bottom; Right = r1.Right; Right = r1.Top; if (Right < r2.Right) Right = r2.Right; if (Top < r2.Top) Top = r2.Top; if (Left > r2.Left) Left = r2.Left; if (Bottom > r2.Bottom) Bottom = r2.Bottom; }
public void ExpandToInclude(RectD rectToInclude) { if (Right < rectToInclude.Right) Right = rectToInclude.Right; if (Top < rectToInclude.Top) Top = rectToInclude.Top; if (Left > rectToInclude.Left) Left = rectToInclude.Left; if (Bottom > rectToInclude.Bottom) Bottom = rectToInclude.Bottom; }
public bool Contains(RectD innerRect) { if (Contains(innerRect.Left, innerRect.Bottom) && Contains(innerRect.Right, innerRect.Top)) { return true; } return false; }
public bool IntersectWithRectangle(RectD rectToIntersectWith) { if (Left < rectToIntersectWith.Left) Left = rectToIntersectWith.Left; if (Bottom < rectToIntersectWith.Bottom) Bottom = rectToIntersectWith.Bottom; if (Right > rectToIntersectWith.Right) Right = rectToIntersectWith.Right; if (Top > rectToIntersectWith.Top) Top = rectToIntersectWith.Top; if (Left < Right && Bottom < Top) { return true; } return false; }
public static void FillRectangle(this Graphics2D gx, RectD rect, ColorRGBA fillColor) { gx.FillRectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, fillColor); }
public bool clip(RectD r) { if (Right > r.Right) Right = r.Right; if (Top > r.Top) Top = r.Top; if (Left < r.Left) Left = r.Left; if (Bottom < r.Bottom) Bottom = r.Bottom; return Left <= Right && Bottom <= Top; }
public static void Rectangle(this Graphics2D gx, RectD rect, ColorRGBA color, double strokeWidth = 1) { gx.Rectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, color, strokeWidth); }
public static bool GetBoundingRect(VertexStore vxs, int[] gi, int num, out RectD boundingRect) { return(GetBoundingRect(vxs, gi, num, out boundingRect.Left, out boundingRect.Bottom, out boundingRect.Right, out boundingRect.Top)); }
public static void FillRectangle(this Graphics2D gx, RectD rect, Color fillColor) { gx.FillRectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, fillColor); }
public static void Rectangle(this Graphics2D gx, RectD rect, Color color, double strokeWidth = 1) { gx.Rectangle(rect.Left, rect.Bottom, rect.Right, rect.Top, color, strokeWidth); }
public void InvalidateBounds() { _needBoundUpdate = true; _boundRect = new RectD(this.X, this.Y, 2, 2); }