1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Made sure that Drawable::createCopy copies their names and IDs.

This commit is contained in:
jules 2012-04-08 09:47:42 +01:00
parent 70133a94eb
commit ecb7abb435
6 changed files with 20 additions and 7 deletions

View file

@ -29,6 +29,12 @@ Drawable::Drawable()
setPaintingIsUnclipped (true);
}
Drawable::Drawable (const Drawable& other)
{
setName (other.getName());
setComponentID (other.getComponentID());
}
Drawable::~Drawable()
{
}

View file

@ -207,11 +207,11 @@ protected:
friend class DrawableShape;
/** @internal */
void transformContextToCorrectOrigin (Graphics& g);
void transformContextToCorrectOrigin (Graphics&);
/** @internal */
void parentHierarchyChanged();
/** @internal */
void setBoundsToEnclose (const Rectangle<float>& area);
void setBoundsToEnclose (const Rectangle<float>&);
Point<int> originRelativeToComponent;
@ -243,12 +243,15 @@ protected:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Positioner);
};
Drawable (const Drawable&);
#endif
private:
void nonConstDraw (Graphics& g, float opacity, const AffineTransform& transform);
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Drawable);
Drawable& operator= (const Drawable&);
JUCE_LEAK_DETECTOR (Drawable);
};

View file

@ -34,7 +34,8 @@ DrawableComposite::DrawableComposite()
}
DrawableComposite::DrawableComposite (const DrawableComposite& other)
: bounds (other.bounds),
: Drawable (other),
bounds (other.bounds),
markersX (other.markersX),
markersY (other.markersY),
updateBoundsReentrant (false)

View file

@ -32,7 +32,8 @@ DrawableImage::DrawableImage()
}
DrawableImage::DrawableImage (const DrawableImage& other)
: image (other.image),
: Drawable (other),
image (other.image),
opacity (other.opacity),
overlayColour (other.overlayColour),
bounds (other.bounds)

View file

@ -31,7 +31,8 @@ DrawableShape::DrawableShape()
}
DrawableShape::DrawableShape (const DrawableShape& other)
: strokeType (other.strokeType),
: Drawable (other),
strokeType (other.strokeType),
mainFill (other.mainFill),
strokeFill (other.strokeFill)
{

View file

@ -34,7 +34,8 @@ DrawableText::DrawableText()
}
DrawableText::DrawableText (const DrawableText& other)
: bounds (other.bounds),
: Drawable (other),
bounds (other.bounds),
fontHeight (other.fontHeight),
fontHScale (other.fontHScale),
font (other.font),