Implement.StartProcess C# (CSharp) Method

StartProcess() public method

public StartProcess ( ) : void
return void
    public void StartProcess()
    {
        Profiler.BeginSample("SVG.Implement.StartProcess[CreateEmptySVGDocument]");
        CreateEmptySVGDocument();
        Profiler.EndSample();
        Profiler.BeginSample("SVG.Implement.StartProcess[GetRootElement]");
        SVGSVGElement _rootSVGElement = _svgDocument.RootElement;
        Profiler.EndSample();
        Profiler.BeginSample("SVG.Implement.StartProcess[ClearCanvas]");
        _graphics.SetColor(Color.white);
        Profiler.EndSample();
        Profiler.BeginSample("SVG.Implement.StartProcess[RenderSVGElement]");
        _rootSVGElement.Render();
        Profiler.EndSample();
        Profiler.BeginSample("SVG.Implement.StartProcess[RenderGraphics]");
        _texture = _graphics.Render();
        Profiler.EndSample();
    }

Usage Example

Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        if (SVGFile != null) {
          Stopwatch w = new Stopwatch();

          w.Reset();
          w.Start();
          ISVGDevice device;
          if(useFastButBloatedRenderer)
        device = new SVGDeviceFast();
          else
        device = new SVGDeviceSmall();
          m_implement = new Implement(this.SVGFile, device);
          w.Stop();
          long c = w.ElapsedMilliseconds;

          w.Reset();
          w.Start();
          m_implement.StartProcess();
          w.Stop();
          long p = w.ElapsedMilliseconds;

          w.Reset();
          w.Start();
          renderer.material.mainTexture = m_implement.GetTexture();
          w.Stop();
          long r = w.ElapsedMilliseconds;
          UnityEngine.Debug.Log("Construction: " + Format(c) + ", Processing: " + Format(p) + ", Rendering: " + Format(r));

          Vector2 ts = renderer.material.mainTextureScale;
          ts.x *= -1;
          renderer.material.mainTextureScale = ts;
          renderer.material.mainTexture.filterMode = FilterMode.Trilinear;
        }
    }
All Usage Examples Of Implement::StartProcess