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); }
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); }
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(); }
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(); }