mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DrawableText: Fix applying transformation in getOutlineAsPath()
This commit is contained in:
parent
158220ddfa
commit
6c3ba087f2
2 changed files with 4 additions and 3 deletions
|
|
@ -137,8 +137,9 @@ void Drawable::setBoundsToEnclose (Rectangle<float> area)
|
|||
if (auto* parent = getParent())
|
||||
parentOrigin = parent->originRelativeToComponent;
|
||||
|
||||
auto newBounds = area.getSmallestIntegerContainer() + parentOrigin;
|
||||
originRelativeToComponent = parentOrigin - newBounds.getPosition();
|
||||
const auto smallestIntegerContainer = area.getSmallestIntegerContainer();
|
||||
auto newBounds = smallestIntegerContainer + parentOrigin;
|
||||
originRelativeToComponent = -smallestIntegerContainer.getPosition();
|
||||
setBounds (newBounds);
|
||||
updateTransform();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ Path DrawableText::getOutlineAsPath() const
|
|||
pathOfAllGlyphs.addPath (gylphPath);
|
||||
}
|
||||
|
||||
pathOfAllGlyphs.applyTransform (getTextTransform (w, h).followedBy (getTransform()));
|
||||
pathOfAllGlyphs.applyTransform (getTextTransform (w, h).followedBy (drawableTransform));
|
||||
|
||||
return pathOfAllGlyphs;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue