const unsigned int radius = textParameters.radius - static_cast<unsigned int>(maxAscenderDescender);
// Set the layout parameters.
- internalDataModel.textLayoutArea = Size(static_cast<float>(textParameters.textWidth),
+ Size textLayoutArea = Size(static_cast<float>(textParameters.textWidth),
static_cast<float>(textParameters.textHeight));
+ // padding
+ Extents padding = textParameters.padding;
+ internalDataModel.textLayoutArea = Size(textLayoutArea.x - ( padding.start + padding.end ), textLayoutArea.y - ( padding.top + padding.bottom ) );
+
+
if(isCircularTextLayout)
{
// In a circular layout, the length of the text area depends on the radius.
////////////////////////////////////////////////////////////////////////////////
// Layout the text
////////////////////////////////////////////////////////////////////////////////
- int boundingBox = textParameters.textHeight;
+ int boundingBox = textParameters.textHeight - (textParameters.padding.top + textParameters.padding.bottom);
textParameters.textHeight = MAX_INT; // layout for the entire area.
LayoutText(textParameters, rendererParameters, embeddedItemLayout, internalData);
ellipsisEnabled{true},
markupEnabled{false},
isTextColorSet{false},
- minLineSize{0.f}
+ minLineSize{0.f},
+ padding{0u, 0u, 0u, 0u}
{
}
bool isTextColorSet : 1; ///< Whether a default color has been set.
//
float minLineSize; ///< The line's minimum size (in points).
+
+ Extents padding; ///< The padding of the boundaries where the text is going to be laid-out.
};
/**