/// <summary> /// Constructor. /// </summary> /// <param name="bitmap">Reference bitmap.</param> public BodyBackground(Bitmap bitmap, PointF location) { // Geometric.AddLine(new Point(0, 0), new Point(1, 1)); // Geometric.AddRectangle(new System.Drawing.Rectangle(0, 0, 1, 1)); // bitmap.Save("D:\\4545.jpg"); if (bitmap != null) { Selected = false; Locked = true; // if (Dimension.Width == 1 && Dimension.Height == 1) if (Dimension.IsEmpty) { Geometric.AddRectangle(new System.Drawing.RectangleF(location.X, location.Y, bitmap.Width, bitmap.Height)); } // Dimension = new SizeF(bitmap.Width, bitmap.Height); // var rec = Geometric.GetBounds(); //bitmap.RotateFlip(RotateFlipType.Rotate90FlipNone); //bitmap.RotateFlip(RotateFlipType.Rotate90FlipXY); _bitmap = bitmap;//.Clone() as Bitmap; this.Appearance.Image = bitmap; } }
/// <summary> /// Constructor. /// </summary> /// <param name="bitmap">Reference bitmap.</param> public Image(Bitmap bitmap, RectangleF rec) { // Geometric.AddLine(new Point(0, 0), new Point(1, 1)); Geometric.AddRectangle(rec); _bitmap = bitmap.Clone() as Bitmap; this.Appearance.Image = bitmap; }
/// <summary> /// Constructor. /// </summary> /// <param name="bitmap">Reference bitmap.</param> public pActiveAnnotation(Bitmap bitmap, PointF location) { // Geometric.AddLine(new Point(0, 0), new Point(1, 1)); Geometric.AddRectangle(new System.Drawing.RectangleF(location.X, location.Y, bitmap.Width, bitmap.Height)); if (bitmap != null) { _bitmap = bitmap.Clone() as Bitmap; this.Appearance.Image = bitmap; } }
/// <summary> /// Default constructor. /// </summary> public Rectangle() { Geometric.AddRectangle(new System.Drawing.Rectangle(0, 0, 1, 1)); }
/// <summary> /// Default constructor. /// </summary> public pActiveAnnotation() { Geometric.AddRectangle(new System.Drawing.Rectangle(0, 0, 1, 1)); }