/// <summary> /// コンストラクタ /// </summary> /// <param name="_coordManager">coordManagerのインスタンス</param> public GridMarkDefinitionUtil(CoordManager _coordManager) { this.coordManager = _coordManager; this.innerCoord = _coordManager.Clone(); innerCoord.SetGridMark(0, 0, GridMarkPoint.CenterMiddle); innerCoord.SetGridMark(-100, 100, GridMarkPoint.LeftTop); innerCoord.SetGridMark(-100, 0, GridMarkPoint.LeftMiddle); innerCoord.SetGridMark(-100, -100, GridMarkPoint.LeftBottom); innerCoord.SetGridMark(0, -100, GridMarkPoint.CenterBottom); innerCoord.SetGridMark(100, -100, GridMarkPoint.RightBottom); innerCoord.SetGridMark(100, 0, GridMarkPoint.RightMiddle); innerCoord.SetGridMark(100, 100, GridMarkPoint.RightTop); innerCoord.SetGridMark(0, 100, GridMarkPoint.CenterTop); }
/// <summary> /// インスタンスのコピーを生成します. /// </summary> /// <returns>インスタンスのコピー</returns> public CoordManager Clone() { CoordManager clone = new CoordManager(parameterManager); clone.DefdBeamCo = DefdBeamCo; clone.angleOfGrid = angleOfGrid; clone.magnitOfGrid = magnitOfGrid; clone.coordDefined = coordDefined; clone.gridOffsetX = gridOffsetX; clone.gridOffsetY = gridOffsetY; clone.gridOrgX = gridOrgX; clone.gridOrgY = gridOrgY; for (int i = 0; i < clone.gridMarks.Length; ++i) { clone.gridMarks[i] = new GridMark(); clone.gridMarks[i].x = gridMarks[i].x; clone.gridMarks[i].y = gridMarks[i].y; clone.gridMarks[i].Existed = gridMarks[i].Existed; clone.gridMarks[i].Image = gridMarks[i].Image; } return(clone); }