Closed audas closed 5 years ago
Stroke and fill rules still apply. When you want the outline, use fill "none" and set a stroke. Please ask these kind of questions on stackoverflow.
I can't ask questions on stackoverflow.
Further its more appropriate to respond to issues here than stackoverflow as this is not a "programming" issue its specific to your extension.
Why not just provide an example ?
Where do we set the fill and stroke ? We can not pass these as options to the draw() method, we can not set them on the item itself and not on the drawing either.
This does not work.
`
drawing = new SVG("image_holder'").size($('#image_preview').width(), $('#image_preview').height());
var rectOptions={
fill: "none",
stroke: "red",
};
drawing.options=rectOptions;
`
And nor does
drawing.rect(rectOptions);
And nor does
drawing.rect().draw(rectOptions);
Have tried with every permutation of colour including rgba.
Your extension loops through the "options" and implements them or resorts to the defaults - except this does not work.
Ok so your extension does not accept the options at all - we have to set them specifically via the SVG.JS API via attributes.
Your read me suggests otherwise.
When drawing shapes I get a solid shape instead of the outline ? I am setting it to be used with a canvas.