Skip to content

Issue drawing SVGs #85

@jatinchowdhury18

Description

@jatinchowdhury18

I ran into a small issue, where SVGs that use the currentColor for the fill and stroke weren't being shown.

I was able to "fix" the issue by making this change in canvas.h:

      SvgDrawable::ColorContext context {};
       if (state_.brush) {
         Brush current = state_.set_brush;
         context.current_color = &current;
+        svg.drawable()->drawAll(*this, &context, x, y, width, height);
+      } else {
+        svg.drawable()->drawAll(*this, &context, x, y, width, height);
       }
-      svg.drawable()->drawAll(*this, &context, x, y, width, height);
     }

Does this seem reasonable? I'm not very knowledgable about the specifics of SVG drawing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions