Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 void ReleaseVxs(ref VertexStore vxs)
 {
     _vxsPool.Release(ref vxs);
 }