Exemplo n.º 1
0
 public bool Overlaps(Rectangle2i r)
 {
     if (r.XMin > XMax || r.XMax < XMin || r.YMax < YMin || r.YMin > YMax)
     {
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public Rectangle2i Append(Rectangle2i rect)
 {
     if (rect.IsEmpty)
     {
         return(this);
     }
     else if (IsEmpty)
     {
         return(rect);
     }
     else
     {
         return(new Rectangle2i(Math.Min(XMin, rect.XMin), Math.Min(YMin, rect.YMin), Math.Max(XMax, rect.XMax), Math.Max(YMax, rect.YMax)));
     }
 }
Exemplo n.º 3
0
 public GraphicAttributes(Painter p)
 {
     Color            = p.Color;
     Opacity          = p.Opacity;
     AntiGrain        = p.AntiGrain;
     Hatch            = p.Hatch;
     FillStyle        = p.FillStyle;
     LineWidth        = p.LineWidth;
     LineStyle        = p.LineStyle;
     LineStyleDashes  = p.LineStyleDashes;
     EndCaps          = p.EndCaps;
     LineJoin         = p.LineJoin;
     Pattern          = p.Pattern;
     Transform        = p.Transform;
     Clip             = p.Clip;
     PatternTransform = p.PatternTransform;
     FillMode         = p.FillMode;
     Font             = p.Font;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Default constructor sets all attributes to their default value.
 /// Use DefaultAttributes to access an instance of this.
 /// </summary>
 private GraphicAttributes()
 {
     Color            = RGB.Black;
     Opacity          = 1.0;
     AntiGrain        = false;
     Hatch            = Hatch.Cross;
     FillStyle        = FillStyle.Solid;
     LineWidth        = 0.0;
     LineStyle        = LineStyle.Continuous;
     LineStyleDashes  = Painter.DefaultLineStyleDashes;
     EndCaps          = EndCap.Flat;
     LineJoin         = LineJoin.Bevel;
     Pattern          = null;
     Transform        = Transform2d.Identity;
     Clip             = null;
     PatternTransform = Transform2d.Identity;
     FillMode         = FillMode.EvenOdd;
     Font             = null;
 }
Exemplo n.º 5
0
 public List <T> BoxWindow <T>(Rectangle2i rect)
 {
     return(BoxWindow <T>(rect.XMin, rect.YMin, rect.XMax, rect.YMax));
 }
Exemplo n.º 6
0
 public List <T> BoxCrossing <T>(Rectangle2i rect)
 {
     return(BoxCrossing <T>(rect.XMin, rect.YMin, rect.XMax, rect.YMax));
 }