Juce 8 drawRect Width 1.0f Does Not Render

I have always used drawRect() with a width of 1.0f to draw vertical lines (up to Juce v7.0.12).

However, with Juce 8, drawRect() does not render vertical lines unless the width is at least 2.0f. Image below is the same code as above image, but using Juce 8.

To reproduce, use the default Juce GUI project with the following paint();

void MainComponent::paint (juce::Graphics& g)
{
    g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));
    g.setColour(juce::Colours::white);

    g.drawRect(getLocalBounds().reduced(2));

    g.drawRect((getWidth() * 0.333333f), 2.0f, 1.0f, (getHeight() - 4.0f));
    g.drawRect((getWidth() * 0.666666f), 2.0f, 1.0f, (getHeight() - 4.0f));

    g.setFont (juce::Font (16.0f));
    g.setColour (juce::Colours::white);
    g.drawText ("Hello World!", getLocalBounds(), juce::Justification::centred, true);
}

Bump!

As of June 6th this is still an issue as it represents different behavior from previous versions of JUCE.

1 Like

Thanks, this issue should be fixed here:

Appears to be fixed!

Thank you!