public void WriteOutput(VertexStore output, VertexStorePool vxsPool, float scale = 1) { if (scale == 1) { curveFlattener.MakeVxs(ps.Vxs, output); } else { var mat = PixelFarm.Agg.Transform.Affine.NewMatix( new PixelFarm.Agg.Transform.AffinePlan( PixelFarm.Agg.Transform.AffineMatrixCommand.Scale, scale, scale)); //transform -> flatten ->output VertexStore tmpVxs = vxsPool.GetFreeVxs(); curveFlattener.MakeVxs(mat.TransformToVxs(ps.Vxs, tmpVxs), output); vxsPool.Release(ref tmpVxs); } }
public void GetVxs(VertexStore output, VertexStorePool vxsPool, float scale = 1) { if (scale == 1) { curveFlattener.MakeVxs(ps.Vxs, output); } else { //float scale = TypeFace.CalculateFromPointToPixelScale(SizeInPoints); var mat = PixelFarm.Agg.Transform.Affine.NewMatix( new PixelFarm.Agg.Transform.AffinePlan( PixelFarm.Agg.Transform.AffineMatrixCommand.Scale, scale, scale)); //transform -> flatten ->output VertexStore tmpVxs = vxsPool.GetFreeVxs(); curveFlattener.MakeVxs(mat.TransformToVxs(ps.Vxs, tmpVxs), output); vxsPool.Release(ref tmpVxs); } }
VertexStore GetFreeVxs() { return(_vxsPool.GetFreeVxs()); }