mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
fixed a bug in DrawableComposite
This commit is contained in:
parent
8073ca1f5b
commit
e89efe0f0d
2 changed files with 10 additions and 18 deletions
|
|
@ -80006,19 +80006,19 @@ void DrawableComposite::bringToFront (const int index)
|
|||
|
||||
void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
||||
{
|
||||
if (drawables.size() > 1)
|
||||
if (drawables.size() > 0 && context.opacity > 0)
|
||||
{
|
||||
Drawable::RenderingContext contextCopy (context);
|
||||
|
||||
if (context.opacity >= 1.0f)
|
||||
if (context.opacity >= 1.0f || drawables.size() == 1)
|
||||
{
|
||||
Drawable::RenderingContext contextCopy (context);
|
||||
|
||||
for (int i = 0; i < drawables.size(); ++i)
|
||||
{
|
||||
const AffineTransform* const t = transforms.getUnchecked(i);
|
||||
contextCopy.transform = (t == 0) ? context.transform
|
||||
: t->followedBy (context.transform);
|
||||
|
||||
drawables.getUnchecked(i)->render (context);
|
||||
drawables.getUnchecked(i)->render (contextCopy);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -80040,10 +80040,6 @@ void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
|||
context.g.drawImageAt (&tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
}
|
||||
}
|
||||
else if (drawables.size() > 0)
|
||||
{
|
||||
drawables.getUnchecked(0)->render (context);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawableComposite::getBounds (float& x, float& y, float& width, float& height) const
|
||||
|
|
|
|||
|
|
@ -86,19 +86,19 @@ void DrawableComposite::bringToFront (const int index)
|
|||
|
||||
void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
||||
{
|
||||
if (drawables.size() > 1)
|
||||
if (drawables.size() > 0 && context.opacity > 0)
|
||||
{
|
||||
Drawable::RenderingContext contextCopy (context);
|
||||
|
||||
if (context.opacity >= 1.0f)
|
||||
if (context.opacity >= 1.0f || drawables.size() == 1)
|
||||
{
|
||||
Drawable::RenderingContext contextCopy (context);
|
||||
|
||||
for (int i = 0; i < drawables.size(); ++i)
|
||||
{
|
||||
const AffineTransform* const t = transforms.getUnchecked(i);
|
||||
contextCopy.transform = (t == 0) ? context.transform
|
||||
: t->followedBy (context.transform);
|
||||
|
||||
drawables.getUnchecked(i)->render (context);
|
||||
drawables.getUnchecked(i)->render (contextCopy);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -120,10 +120,6 @@ void DrawableComposite::render (const Drawable::RenderingContext& context) const
|
|||
context.g.drawImageAt (&tempImage, clipBounds.getX(), clipBounds.getY());
|
||||
}
|
||||
}
|
||||
else if (drawables.size() > 0)
|
||||
{
|
||||
drawables.getUnchecked(0)->render (context);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawableComposite::getBounds (float& x, float& y, float& width, float& height) const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue