I get the same result (and I would have been surprosed of the contrary, since setOriginWithOriginalSize actually makes a call to Component::setTransform() as you suggested)
1) Even considering that the DrawableComposite children are contained in a rectangle that has its origin in (0.25, 0.25) and is 0.75x0.75 in size, when drawn over the button background, the (0.25, 0.25) origin is mapped to the (0, 0) point in the button, and the whole size is stretched over it.
2) The Transform applied to vertSegmentDrawable (a rotation of 45 degrees) is completely disregarded
as a developer, I am aware that my last post here is nothing but annoying, because I bet you are working on much more exciting things and fixing such a boring bug is plainly, as I said, annoying and boring.
Knowing that, I have made my fair attempt at fixing it myself, trying to come back to the forum with a sensible solution that you could just review and integrate in your code.
Unfortunately, the conversion of Drawable to be a subclass of Component is one of the few parts of JUCE that I can't completely "grasp" in order to work on it with confidence.. I have wasted some time trying to figure out things and to pinpoint the place where a change is needed to fix the two issues numbered above. Unfortunately, I have been unable to do so.
Sorry, I wasn't ignoring you, just wasn't aware of your post. I get too many requests to keep track of them all, and things get lost/forgotten!
Yes, I'll have a look soon, though I suspect that there's probably nothing actually *wrong* with the classes, it's most likely just a misunderstanding of how to use them.. It's very complicated, and when I converted the drawables to be components, it changed some behaviours.
..ok, I don't really understand the problem - the code you posted is doing exactly what it's supposed to do. You can position the composite object using DrawableComposite::setBoundingBox and setContentArea - the methods are documented, though I admit it's a complicated system.
I would have expected the transform applied to vertSegmentDrawable to be retained displaying a diagonal green segment, as it would have been if it had been a regular Component added as a child inside its parent Component.
What's the rationale for ignoring such transform here? is the "createCopy" method copying the drawable discarding transforms applied to it?
Actually, looking at the code, most of the Drawable classes use the transform themselves internally to manage their layout - e.g. setBoundingBox, etc will set up a transform to produce the required layout. So yes, createCopy will probably ignore your custom transform and the new object will recalculate its own.