コード例 #1
0
void DrawableText::setBoundingBox (const RelativeParallelogram& newBounds)
{
    if (bounds != newBounds)
    {
        bounds = newBounds;
        refreshBounds();
    }
}
コード例 #2
0
//==============================================================================
void DrawableText::setText (const String& newText)
{
    if (text != newText)
    {
        text = newText;
        refreshBounds();
    }
}
コード例 #3
0
void DrawableText::setFontSizeControlPoint (const RelativePoint& newPoint)
{
    if (fontSizeControlPoint != newPoint)
    {
        fontSizeControlPoint = newPoint;
        refreshBounds();
    }
}
コード例 #4
0
void DrawableText::setFontHorizontalScale (const RelativeCoordinate& newScale)
{
    if (fontHScale != newScale)
    {
        fontHScale = newScale;
        refreshBounds();
    }
}
コード例 #5
0
void DrawableText::setFontHeight (const RelativeCoordinate& newHeight)
{
    if (fontHeight != newHeight)
    {
        fontHeight = newHeight;
        refreshBounds();
    }
}
コード例 #6
0
DrawableText::DrawableText (const DrawableText& other)
    : Drawable (other),
      bounds (other.bounds),
      fontHeight (other.fontHeight),
      fontHScale (other.fontHScale),
      font (other.font),
      text (other.text),
      colour (other.colour),
      justification (other.justification)
{
    refreshBounds();
}
コード例 #7
0
void DrawableText::setFont (const Font& newFont, bool applySizeAndScale)
{
    if (font != newFont)
    {
        font = newFont;

        if (applySizeAndScale)
        {
            setFontSizeControlPoint (RelativePoint (RelativeParallelogram::getPointForInternalCoord (resolvedPoints,
                                       Point<float> (font.getHorizontalScale() * font.getHeight(), font.getHeight()))));
        }

        refreshBounds();
    }
}
コード例 #8
0
void DrawableText::setFont (const Font& newFont, bool applySizeAndScale)
{
    if (font != newFont)
    {
        font = newFont;

        if (applySizeAndScale)
        {
            fontHeight = font.getHeight();
            fontHScale = font.getHorizontalScale();
        }

        refreshBounds();
    }
}