public void FillPath(Loonim.TextureNode fill, VectorPath transformedPath, bool evenOddFillMethod) { // Create Loonim node: Loonim.ClippingPath path = new Loonim.ClippingPath(fill, transformedPath); // Add to draw stack: if (DrawStack == null) { DrawStack = new Loonim.Stack(1); DrawStack.Sources[0] = path; } else { // Add a path to the draw stack: DrawStack.Add(path); } }
/// <summary>Computes a stroke path now and adds it.</summary> public void StrokePath(Loonim.TextureNode stroke, VectorPath transformedPath, float width, SVGElement settings) { if (StrokeHelper == null) { StrokeHelper = new Loonim.StrokePathMesh(); } // Get other settings: StrokeHelper.LineCapMode = settings.StrokeLineCap; // Css.Value dashArray=settings.StrokeDashArray; StrokeHelper.LineJoinMode = settings.StrokeLineJoin; StrokeHelper.MiterLimit = settings.StrokeMiterLimit; StrokeHelper.Accuracy = Loonim.ClippingPath.DefaultAccuracy; StrokeHelper.Width = width; // Generate now! List <Mesh> meshes = StrokeHelper.GenerateMeshes(transformedPath); foreach (Mesh mesh in meshes) { // Create Loonim node for each mesh: Loonim.ClippingPath path = new Loonim.ClippingPath(stroke, mesh); // Add to draw stack: if (DrawStack == null) { DrawStack = new Loonim.Stack(1); DrawStack.Sources[0] = path; } else { // Add a path to the draw stack: DrawStack.Add(path); } } }