예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #3
0
 VertexStore GetFreeVxs()
 {
     return(_vxsPool.GetFreeVxs());
 }