# Convert DrawableComposite to Drawable?

**URL:** <https://forum.juce.com/t/convert-drawablecomposite-to-drawable/15172>\
**Category:** General JUCE discussion\
**Created:** [July 23, 2015, 7:40pm UTC](https://forum.juce.com/t/convert-drawablecomposite-to-drawable/15172 "2015-07-23T19:40:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alatar](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@alatar](https://forum.juce.com/u/alatar)\
**Post date:** [July 23, 2015, 7:40pm UTC](https://forum.juce.com/t/convert-drawablecomposite-to-drawable/15172/1 "2015-07-23T19:40:35Z")

</div>

I was wondering, if there is any recommended way to convert a **DrawableComposite** to a **Drawable**. I am asking, because I want to use it on a DrawableButton. A **DrawableButton** only allows Drawables, but not DrawablesComposites as images (as far as I can see).

I saw there exists a function **DrawableComposite::createCopy()**, which returns a Drawable. But the function is flagged as "internal" in the code. So I am not sure, whether I am allowed to use it?

---

<div class="post-metadata">

**Author:** ![dave96](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dave96/32/8487_2.png) [@dave96](https://forum.juce.com/u/dave96)\
**Post date:** [July 23, 2015, 8:06pm UTC](https://forum.juce.com/t/convert-drawablecomposite-to-drawable/15172/2 "2015-07-23T20:06:15Z")

</div>

A DrawableComposite is a Drawable? (It inherits from Drawable).

You should be able to pass a&nbsp;DrawableComposite to anything that accepts a Drawable.

---

<div class="post-metadata">

**Author:** ![alatar](https://avatars.discourse-cdn.com/v4/letter/a/34f0e0/32.png) [@alatar](https://forum.juce.com/u/alatar)\
**Post date:** [July 23, 2015, 8:15pm UTC](https://forum.juce.com/t/convert-drawablecomposite-to-drawable/15172/3 "2015-07-23T20:15:20Z")

</div>

\*Blush\*

Yes, you are right. Don't know, why I did not see that!

Thanks.
