internal void TransformMe(double rotationAngle, double scaling, Vector2D offset) { Matrix3D matrix3D = Transformation3D.Translation(offset) * Transformation3D.Scaling2D(scaling) * Transformation3D.Rotate(rotationAngle); foreach (DxfPattern.Line line in this.list_0) { line.Angle += rotationAngle; line.BasePoint = matrix3D.Transform(line.BasePoint); line.Offset = matrix3D.Transform(line.Offset); for (int index1 = 0; index1 < line.DashLengths.Count; ++index1) { List <double> dashLengths; int index2; (dashLengths = line.DashLengths)[index2 = index1] = dashLengths[index2] * scaling; } } }
public void PropagateTo(IScaler scaler, ITranslator translator) { if (!this.ValidForZoom) { return; } Rectangle2D normalizedZoomRectangle = this.NormalizedZoomRectangle; Point2D center = normalizedZoomRectangle.Center; Point2D point = (Transformation3D.Translation(translator.Translation) * Transformation3D.Scaling2D(scaler.ScaleFactor)).GetInverse().Transform(center); double num = 2.0 / System.Math.Max(System.Math.Abs(normalizedZoomRectangle.Width), System.Math.Abs(normalizedZoomRectangle.Height)); scaler.ScaleFactor *= num; Point2D point2D = (Transformation3D.Translation(translator.Translation) * Transformation3D.Scaling2D(scaler.ScaleFactor)).Transform(point); translator.Translation += center - point2D; }
public Matrix3D GetShapeInsertionTransformation(double ltScaling) { return(Transformation3D.Scaling2D(ltScaling) * Transformation3D.Translation(this.vector2D_0) * Transformation3D.Rotate(this.double_2) * Transformation3D.Scaling2D(this.double_1)); }