public ShapeBase ViewToWin(ShapeBase shape) { var ret = shape.Clone(); ret.Location = ViewToWin(shape.Location); ret.Size = ViewToWin(shape.Size); ret.OutlineWidth = ViewToWin(shape.OutlineWidth); for (int i = 0; i < shape.Vertices.Count; i++) { ret.Vertices[i].X = ViewToWin(shape.Vertices[i].X); ret.Vertices[i].Y = ViewToWin(shape.Vertices[i].Y); } return ret; }
public ShapeBase ViewToWin(ShapeBase shape) { var ret = shape.Clone(); ret.Location = ViewToWin(shape.Location); ret.Size = ViewToWin(shape.Size); ret.OutlineWidth = ViewToWin(shape.OutlineWidth); for (int i = 0; i < shape.Vertices.Count; i++) { ret.Vertices[i].X = ViewToWin(shape.Vertices[i].X); ret.Vertices[i].Y = ViewToWin(shape.Vertices[i].Y); } return(ret); }
public ShapeBase WinToView(ShapeBase shape) { if (shape == null) return null; var ret = shape.Clone(); ret.Location = WinToView(shape.Location); ret.Size = WinToView(shape.Size); ret.OutlineWidth = WinToView(shape.OutlineWidth); for (int i = 0; i < shape.Vertices.Count; i++) { ret.Vertices[i].X = WinToView(shape.Vertices[i].X); ret.Vertices[i].Y = WinToView(shape.Vertices[i].Y); } return ret; }
public ShapeBase WinToView(ShapeBase shape) { if (shape == null) { return(null); } var ret = shape.Clone(); ret.Location = WinToView(shape.Location); ret.Size = WinToView(shape.Size); ret.OutlineWidth = WinToView(shape.OutlineWidth); for (int i = 0; i < shape.Vertices.Count; i++) { ret.Vertices[i].X = WinToView(shape.Vertices[i].X); ret.Vertices[i].Y = WinToView(shape.Vertices[i].Y); } return(ret); }