protected virtual void Format(JobHandle job) { }
protected virtual void Polygon(JobHandle job, pointf[] A, int n, bool filled) { }
protected virtual void ResolveColor(JobHandle job, ref gvcolor_t color) { }
protected virtual void EndLayer(JobHandle job) { }
protected virtual void EndPage(JobHandle job) { }
protected virtual void EndEdges(JobHandle job) { }
protected virtual void EndJob(JobHandle job) { }
protected virtual void BeginGraph(JobHandle job) { }
protected virtual void BeginJob(JobHandle job) { }
protected virtual void BeginCluster(JobHandle job) { }
protected virtual void BeginEdges(JobHandle job) { }
protected virtual void BeginAnchor(JobHandle job, string href, string tooltip, string target, string id) { }
protected virtual void Finalize(JobHandle job) { }
protected virtual void Initialize(JobHandle job) { }
protected virtual void EndAnchor(JobHandle job) { }
protected virtual void BeginLabel(JobHandle job, label_type type) { }
protected virtual void EndCluster(JobHandle job) { }
protected virtual void BeginLayer(JobHandle job, string layerName, int n, int nLayers) { }
protected virtual void EndGraph(JobHandle job) { }
protected virtual void BeginNodes(JobHandle job) { }
protected virtual void EndLabel(JobHandle job) { }
protected virtual void BeginPage(JobHandle job) { }
protected virtual void EndNodes(JobHandle job) { }
protected virtual void BezierCurve(JobHandle job, pointf[] A, int n, bool arrow_at_start, bool arrow_at_end, bool filled) { }
protected virtual void LibraryShape(JobHandle job, string name, pointf[] A, int n, bool filled) { }
protected virtual void Comment(JobHandle job, string text) { }
protected virtual void Polyline(JobHandle job, pointf[] A, int n) { }
protected virtual void Ellipse(JobHandle job, pointf[] ps, bool filled) { }
protected virtual void TextParagraph(JobHandle job, pointf p, ref textpara_t text) { }
protected override void BezierCurve(JobHandle job, pointf[] A, int n, bool arrow_at_start, bool arrow_at_end, bool filled) { List<PathFigure> figures = new List<PathFigure>(); if (n % 3 == 1 && n >= 4) { PathFigure figure = new PathFigure(); figure.StartPoint = new Point(A[0].x, A[0].y); for (int i = 0; i < n / 3; i++) { Point point1 = new Point(A[3 * i + 1].x, A[3 * i + 1].y); Point point2 = new Point(A[3 * i + 2].x, A[3 * i + 2].y); Point point3 = new Point(A[3 * i + 3].x, A[3 * i + 3].y); figure.Segments.Add(new BezierSegment(point1, point2, point3, true)); } figures.Add(figure); } else { throw new NotImplementedException(); } Path path; path = new Path() { Data = new PathGeometry(figures) }; ApplyShapeStyle(path, job, filled); _canvas.Children.Add(path); //PathGeometry geometry = new PathGeometry(); //PathFigure figure = new PathFigure(); //figure.Segments.Add(new BezierSegment()); //geometry.Figures.Add(new PathFigure()); //path.Data = new PathGeometry(); //PathGeometry geometry = (PathGeometry)path.Data; }