public static SmoothedPolyline SmoothedPolylineTranslate(SmoothedPolyline smoothedPolyline, Vector deltaVec) { GPoint delta = new GPoint(deltaVec.X, deltaVec.Y); SmoothedPolyline sm = smoothedPolyline.Clone(); for (Microsoft.Msagl.Core.Geometry.Site s = sm.HeadSite, s0 = sm.HeadSite; s != null; s = s.Next, s0 = s0.Next) { s.Point = s0.Point + delta; } return(sm); }
public static SmoothedPolyline SmoothedPolylineTransform(SmoothedPolyline smoothedPolyline, PlaneTransformation m) { //GPoint delta = new GPoint(deltaVec.X, deltaVec.Y); SmoothedPolyline sm = smoothedPolyline.Clone(); //PlaneTransformation pt = new PlaneTransformation(m.M11, m.M12,m.OffsetX,m.M21, m.M22, m.OffsetY); for (Microsoft.Msagl.Core.Geometry.Site s = sm.HeadSite, s0 = sm.HeadSite; s != null; s = s.Next, s0 = s0.Next) { s.Point = m * s0.Point; } return(sm); }