public static SvgPart TransformToNew(SvgPart originalSvgVx, PixelFarm.CpuBlit.VertexProcessing.Bilinear tx) { SvgPart newSx = new SvgPart(originalSvgVx.Kind); if (newSx._vxs != null) { VertexStore vxs = new VertexStore(); tx.TransformToVxs(originalSvgVx._vxs, vxs); newSx._vxs = vxs; } if (originalSvgVx.HasFillColor) { newSx._fillColor = originalSvgVx._fillColor; } if (originalSvgVx.HasStrokeColor) { newSx.StrokeColor = originalSvgVx.StrokeColor; } if (originalSvgVx.HasStrokeWidth) { newSx.StrokeWidth = originalSvgVx.StrokeWidth; } return(newSx); }
public static VertexStore TransformToVxs(this Bilinear bilinearTx, VertexStore src, VertexStore vxs) { int count = src.Count; VertexCmd cmd; double x, y; for (int i = 0; i < count; ++i) { cmd = src.GetVertex(i, out x, out y); bilinearTx.Transform(ref x, ref y); vxs.AddVertex(x, y, cmd); } return(vxs); }