zamrate wrote:I had setOpaque() and setPaintingIsUnclipped() both set to true on all my components FWIW.
Try leaving setPaintingIsUnclipped() to false.
jules wrote:it'll save a bunch of rectangle list operations.
...
if (child.flags.dontClipGraphicsFlag)
{
child.paintWithinParentContext (g);
}
else if (g.reduceClipRegion (child.getBounds()))
{
...
Still haven't heard an explanation for why anti-aliased polygons are being drawn.
zamrate wrote:Seems fillRect() fills line by line?
juce::LowLevelGraphicsSoftwareRenderer::SavedState::fillRect(const juce::Rectangle<int> & r={...}, const bool replaceContents=false) Line 1870 + 0x8f bytes C++
juce::LowLevelGraphicsSoftwareRenderer::fillRect(const juce::Rectangle<int> & r={...}, const bool replaceExistingContents=false) Line 2185 C++
void fillRect (const Rectangle<int>& r, const bool replaceContents)
{
if (clip != nullptr)
{
if (transform.isOnlyTranslated)
{
if (fillType.isColour())
{
Image::BitmapData destData (image, Image::BitmapData::readWrite);
clip->fillRectWithColour (destData, transform.translated (r), fillType.colour.getPixelARGB(), replaceContents);
}
else
{
const Rectangle<int> totalClip (clip->getClipBounds());
const Rectangle<int> clipped (totalClip.getIntersection (transform.translated (r)));
if (! clipped.isEmpty())
fillShape (new ClipRegions::RectangleListRegion (clipped), false);
}
}
else
{
Path p;
p.addRectangle (r);
fillPath (p, AffineTransform::identity);
}
}
}
zamrate wrote:Listen, you have the call stack there. I made it especially for you. And you can clearly see that fillRect() calls fillRectWithColour() there?!!
BTW not only paths are filled using the EdgeTableRenderer, everything is, even fonts, AFAIK.
forcedinline void handleEdgeTablePixel (const int x, const int alphaLevel) const noexcept
{
if (replaceExisting)
linePixels[x].set (sourceColour);
else
linePixels[x].blend (sourceColour, (uint32) alphaLevel);
}
void Graphics::fillRect (int x, int y, int width, int height) const
{
// passing in a silly number can cause maths problems in rendering!
jassert (areCoordsSensibleNumbers (x, y, width, height));
context->fillRect (Rectangle<int> (x, y, width, height), false);
}
Return to General JUCE discussion
Users browsing this forum: Bing [Bot], Google [Bot], Google Feedfetcher and 2 guests