Exemple #1
0
 public Path2D()
 {
     // can i get rid of draw call list and use object data instead?
     this.geometry                = GeometryData.Create();
     this.drawCallList            = new StructList <SVGXDrawCall>(4);
     this.transforms              = new StructList <Matrix4x4>(4);
     this.objectDataList          = new StructList <ObjectData>(4);
     this.fillStyles              = null;
     this.strokeStyles            = null;
     this.currentMatrix           = Matrix4x4.identity;
     this.currentFillStyle        = SVGXFillStyle.Default;
     this.currentStrokeStyle      = SVGXStrokeStyle.Default;
     this.currentFixedRenderState = new FixedRenderState(BlendState.Default, DepthState.Default);
     transforms.Add(currentMatrix);
 }
Exemple #2
0
 public new void Clear()
 {
     base.Clear();
     matrixChanged = false;
     drawCallList.QuickClear();
     fillStyles?.QuickClear();
     strokeStyles?.QuickClear();
     transforms.size     = 0;
     objectDataList.size = 0;
     geometry.Clear();
     currentMatrix           = Matrix4x4.identity;
     currentFillStyle        = SVGXFillStyle.Default;
     currentStrokeStyle      = SVGXStrokeStyle.Default;
     currentShapeRange       = default;
     currentFixedRenderState = new FixedRenderState(BlendState.Default, DepthState.Default);
     transforms.Add(currentMatrix);
     if (renderStateList != null)
     {
         renderStateList.size = 0;
     }
 }