// 设置坐标 private void GenerateData(float scale) { PointF[] pfs = _frameArray; if (_objects.IsEmpty) { for (int i = 0; i < pfs.Length; i++) { pfs[i] = PointF.Empty; } } else { float size = FrameSize / scale; RectangleF rf = _objects.Rect; for (int i = 0; i < pfs.Length; i++) { int j = (i < 4) ? i : i + 1; int row = j / 3; int col = j % 3; pfs[i].X = rf.X + rf.Width / 2 * col + size * (col - 1); pfs[i].Y = rf.Y + rf.Height / 2 * row + size * (row - 1); pfs[i] = ControlPointContainer.TransFormData(_objects.Matrix, scale, pfs[i]); } } //rotate center _rotatePointPos = _objects.RotatePointPos; _rotatePointPos.X *= scale; _rotatePointPos.Y *= scale; }
// 设置数据 private void GenerateData(float scale) { _datas = new List <PointF>(_objects.Node.NodeDatas); int len = _datas.Count; for (int i = 0; i < len; i++) { _datas[i] = ControlPointContainer.TransFormData(_objects.Matrix, scale, _datas[i]); } }
private void GenerateData(float scale) { _datas = (PointF[])_objects.Custom.CustomDatas.Clone(); for (int i = 0; i < _datas.Length; i++) { _datas[i] = ControlPointContainer.TransFormData(_objects.Matrix, scale, _datas[i]); } _center = _objects.Custom.CustomCenter; _center = ControlPointContainer.TransFormData(_objects.Matrix, scale, _center); }
private void GenerateData(float scale) { if (_objects.Segment.Intersections == null) { _intersections = null; return; } _intersections = (PointF[])_objects.Segment.Intersections.Clone(); for (int i = 0; i < _intersections.Length; i++) { _intersections[i] = ControlPointContainer.TransFormData(_objects.Matrix, scale, _intersections[i]); } }