Hi,
I am trying to retrieve stroke info from a .svg created DrawablePath (the element I am looking at is a simple svg <rect>):
if (const auto frame= dynamic_cast<juce::DrawableShape*>(layout->findChildWithID("frame")))
std::clog<<__FUNCTION__<<" "<<layout->getComponentID()<<
": fill:"<<std::hex<<frame->getFill().fill.colour.getARGB()<<
" stroke:"<<frame->getStrokeFill().fill.colour.getARGB()<<
" border:"<<std::dec<<frame->getStrokeType().getStrokeThickness()<<
std::endl;
While frame->getFill().fill.colour.getARGB() seems to return something usefull frame->getStrokeFill() doesn’t. (thickness is always 0; color is always ff000000).
How can I retrieve the stroke color and thickness (for a simple stroke).
Thanks, t0m,
for verifying!
I am not an English native speaker, so I am really untapped here: But it seems the issue I encountered is because JUCE is British, isn’t it?:
JUCE’ .svg parser understands stroke=“grey” while it doesn’t stroke=“gray” though the .svg spec allows both… I am fine going with “grey” from now on… The consequence was that also the stroke-width wasn’t set as it was with stroke=“none”.