public override Extents GetExtents() { float thHeight = Height * Lines.Length * 1.425f; float thWidth = 0; foreach (string line in Lines) { thWidth = Math.Max(thWidth, line.Length * Height / 2); } float angle = Rotation / 180 * (float)Math.PI; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(thWidth, 0); Point2D p3 = new Point2D(0, -thHeight); Point2D p4 = new Point2D(thWidth, -thHeight); Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P.X, P.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return(extents); }
public override Extents GetExtents() { Extents extents = new Extents(); extents.Add(X1, Y1); extents.Add(X2, Y2); return extents; }
public override Extents GetExtents() { float offset = Math.Sign(Offset) * (0.5f * TextHeight + Math.Abs(Offset)); Vector2D dir = P2 - P1; float angle = dir.Angle; float len = dir.Length; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(len, 0); Point2D p3 = p1 + new Vector2D(0, offset); Point2D p4 = p2 + new Vector2D(0, offset); Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P1.X, P1.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return(extents); }
public override Extents GetExtents() { Extents extents = new Extents(); extents.Add(X1, Y1); extents.Add(X2, Y2); return(extents); }
public override Extents GetExtents() { float angle = Rotation / 180 * (float)Math.PI; float thHeight = Height; float thWidth = String.Length * thHeight / 2; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(thWidth, 0); Point2D p3 = new Point2D(0, thHeight); Point2D p4 = new Point2D(thWidth, thHeight); float dx = 0; float dy = 0; if (HorizontalAlignment == StringAlignment.Far) { dx = -thWidth; } else if (HorizontalAlignment == StringAlignment.Center) { dx = -thWidth / 2; } if (VerticalAlignment == StringAlignment.Far) { dy = -thHeight; } else if (VerticalAlignment == StringAlignment.Center) { dy = -thHeight / 2; } Vector2D offset = new Vector2D(dx, dy); p1 = p1 + offset; p2 = p2 + offset; p3 = p3 + offset; p4 = p4 + offset; Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P.X, P.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return(extents); }
public override Extents GetExtents() { Extents extents = new Extents(); foreach (Point2D point in Points) { extents.Add(point.X, point.Y); } return extents; }
public override Extents GetExtents() { Extents extents = new Extents(); foreach (Point2D point in Points) { extents.Add(point.X, point.Y); } return(extents); }
public Extents GetExtents() { Extents extents = new Extents(); foreach (Drawable item in Model) { extents.Add(item.GetExtents()); } return(extents); }
public override Extents GetExtents() { float thHeight = Height * Lines.Length * 1.425f; float thWidth = 0; foreach (string line in Lines) { thWidth = Math.Max(thWidth, line.Length * Height / 2); } float angle = Rotation / 180 * (float)Math.PI; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(thWidth, 0); Point2D p3 = new Point2D(0, -thHeight); Point2D p4 = new Point2D(thWidth, -thHeight); Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P.X, P.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return extents; }
public override Extents GetExtents() { float offset = Math.Sign(Offset) * (0.5f * TextHeight + Math.Abs(Offset)); Vector2D dir = P2 - P1; float angle = dir.Angle; float len = dir.Length; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(len, 0); Point2D p3 = p1 + new Vector2D(0, offset); Point2D p4 = p2 + new Vector2D(0, offset); Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P1.X, P1.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return extents; }
public override Extents GetExtents() { float angle = Rotation / 180 * (float)Math.PI; float thHeight = Height; float thWidth = String.Length * thHeight / 2; Point2D p1 = new Point2D(0, 0); Point2D p2 = new Point2D(thWidth, 0); Point2D p3 = new Point2D(0, thHeight); Point2D p4 = new Point2D(thWidth, thHeight); float dx = 0; float dy = 0; if (HorizontalAlignment == StringAlignment.Far) dx = -thWidth; else if (HorizontalAlignment == StringAlignment.Center) dx = -thWidth / 2; if (VerticalAlignment == StringAlignment.Far) dy = -thHeight; else if (VerticalAlignment == StringAlignment.Center) dy = -thHeight / 2; Vector2D offset = new Vector2D(dx, dy); p1 = p1 + offset; p2 = p2 + offset; p3 = p3 + offset; p4 = p4 + offset; Matrix2D trans = Matrix2D.Transformation(1, 1, angle, P.X, P.Y); p1.TransformBy(trans); p2.TransformBy(trans); p3.TransformBy(trans); p4.TransformBy(trans); Extents extents = new Extents(); extents.Add(p1); extents.Add(p2); extents.Add(p3); extents.Add(p4); return extents; }
public Extents GetExtents() { Extents extents = new Extents(); foreach (Drawable item in Model) { extents.Add(item.GetExtents()); } return extents; }