While creating Dashed Stroke from a glyph Path , some lines crossing the glyphs…
Font font(T("Arial"), 320.0, Font::plain);
GlyphArrangement arr;
arr.addLineOfText(font, T("A"), 0, 0);
juce::PositionedGlyph glyph(arr.getGlyph(0));
float x = 0, y = 0, width = 0, height = 0;
juce::Path glyphFillPath;
glyph.createPath(glyphFillPath);
glyphFillPath.getBounds(x, y, width, height);
Image* pImage = new Image(Image::ARGB, width + 128, height + 128, true);
Graphics g(*pImage);
g.fillAll(Colours::red);
g.setColour(Colours::black);
int deltaX = (pImage->getWidth() - width)/2 - x;
int deltaY = (pImage->getHeight() - height)/2 - y;
g.fillPath(glyphFillPath, AffineTransform::translation(deltaX, deltaY));
float *dash = new float[2];
dash[0] = 2.0;
dash[1] = 2.0;
PathStrokeType dashStroke(5.0);
dashStroke.createDashedStroke(anotherPath, anotherPath, dash, 2);
g.setColour(Colours::green);
g.strokePath(anotherPath, PathStrokeType(5.0), AffineTransform::translation(deltaX, deltaY));
PNGImageFormat format;
FileOutputStream fos(File::createTempFile(T("Sample.png")));
format.writeImageToStream(*pImage, fos);
Check the output Image in TempDirectory…
Hope this can be fixed…