Beispiel #1
0
    public Rect GetBound()
    {
        for (int i = 0; i < listObject.Count; ++i)
        {
            ISVGPathSegment seg = listObject[i];
            seg.ExpandBounds(this);
        }

        Rect tmp = new Rect(boundUL.x - 1, boundUL.y - 1, boundBR.x - boundUL.x + 2, boundBR.y - boundUL.y + 2);

        return(tmp);
    }
Beispiel #2
0
    public Rect GetBound()
    {
//Profiler.BeginSample("SVGGraphicsPath.GetBound");
        for (int i = 0; i < listObject.Count; i++)
        {
            ISVGPathSegment seg = (ISVGPathSegment)listObject[i];
            seg.ExpandBounds(this);
        }

        Rect tmp = new Rect(boundUL.x - 1, boundUL.y - 1, boundBR.x - boundUL.x + 2, boundBR.y - boundUL.y + 2);

//Profiler.EndSample();
        return(tmp);
    }
Beispiel #3
0
    public void RenderPath(ISVGPathDraw pathDraw, bool isClose)
    {
//Profiler.BeginSample("SVGGraphicsPath.RenderPath(ISVGPathDraw, bool)");
        isClose = !isClose;
        for (int i = 0; i < listObject.Count; i++)
        {
            ISVGPathSegment seg = (ISVGPathSegment)listObject[i];
//Profiler.BeginSample("SVGGraphicsPath.RenderPath(ISVGPathDraw, bool) => " + seg.GetType().ToString());
            isClose = seg.Render(this, pathDraw) || isClose;
//Profiler.EndSample();
        }

        if (!isClose)
        {
            pathDraw.LineTo(matrixTransform.Transform(beginPoint));
        }
//Profiler.EndSample();
    }
Beispiel #4
0
    public void RenderPath(ISVGPathDraw pathDraw, bool isClose)
    {
        Profiler.BeginSample("SVGGraphicsPath.RenderPath");
        isClose = !isClose;
        Profiler.BeginSample("SVGGraphicsPath.RenderPath[for]");
        for (int i = 0; i < listObject.Count; i++)
        {
            ISVGPathSegment seg = listObject[i];
            isClose = seg.Render(this, pathDraw) || isClose;
        }
        Profiler.EndSample();

        Profiler.BeginSample("SVGPathSegment.Render[LineTo]");
        if (!isClose)
        {
            pathDraw.LineTo(matrixTransform.Transform(beginPoint));
        }
        Profiler.EndSample();
        Profiler.EndSample();
    }