/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
MarkupProcessData markupProcessData(colorRuns,
fontDescriptionRuns,
- textModel->mLogicalModel->mEmbeddedItems);
+ textModel->mLogicalModel->mEmbeddedItems,
+ textModel->mLogicalModel->mAnchors);
if(textParameters.markupEnabled)
{
const unsigned int radius = textParameters.radius - static_cast<unsigned int>(maxAscenderDescender);
// Set the layout parameters.
- internalDataModel.textLayoutArea = Size(static_cast<float>(textParameters.textWidth),
- static_cast<float>(textParameters.textHeight));
+ 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)
{
////////////////////////////////////////////////////////////////////////////////
// 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);