public override void CreateShape(EntityType type) { { state = State.CreatingShape; shapeType = type; newShapeType = type; switch (type) { case EntityType.Class: case EntityType.Delegate: case EntityType.Enum: case EntityType.Interface: case EntityType.Structure: shapeOutline = TypeShape.GetOutline(Style.CurrentStyle); break; case EntityType.Package: shapeOutline = PackageShape.GetOutline(Style.CurrentStyle); break; case EntityType.Comment: shapeOutline = CommentShape.GetOutline(Style.CurrentStyle); break; } shapeOutline.Location = new Point((int)mouseLocation.X, (int)mouseLocation.Y); Redraw(); } }
public override void CreateShape(EntityType type, Point?where = null) { base.CreateShape(type); switch (type) { case EntityType.Class: case EntityType.Delegate: case EntityType.Enum: case EntityType.Interface: case EntityType.Structure: shapeOutline = TypeShape.GetOutline(Style.CurrentStyle); break; case EntityType.Package: shapeOutline = PackageShape.GetOutline(Style.CurrentStyle); break; case EntityType.Comment: shapeOutline = CommentShape.GetOutline(Style.CurrentStyle); break; } //shapeOutline.Location = new Point((int) mouseLocation.X, (int) mouseLocation.Y); shapeOutline.Location = where ?? new Point((int)mouseLocation.X, (int)mouseLocation.Y); Redraw(); }