Apply Float point
authorYunji Park <yunji19.park@samsung.com>
Tue, 2 Apr 2013 08:36:24 +0000 (17:36 +0900)
committerYunji Park <yunji19.park@samsung.com>
Tue, 2 Apr 2013 08:36:24 +0000 (17:36 +0900)
Change-Id: I954b45d478df12411ffcc1230347e4643b1d3147

17 files changed:
src/graphics/inc/FGrp_TextTextElement.h
src/graphics/inc/FGrp_TextTextImage.h
src/graphics/inc/FGrp_TextTextObject.h
src/graphics/inc/FGrp_TextTextSimple.h
src/graphics/text/FGrp_TextTextColumn.cpp
src/graphics/text/FGrp_TextTextColumn.h
src/graphics/text/FGrp_TextTextComposite.cpp
src/graphics/text/FGrp_TextTextComposite.h
src/graphics/text/FGrp_TextTextElement.cpp
src/graphics/text/FGrp_TextTextImage.cpp [changed mode: 0755->0644]
src/graphics/text/FGrp_TextTextLine.cpp
src/graphics/text/FGrp_TextTextLine.h
src/graphics/text/FGrp_TextTextObject.cpp
src/graphics/text/FGrp_TextTextSimple.cpp
src/graphics/text/FGrp_TextTextUtility.cpp
src/graphics/text/FGrp_TextTextUtility.h
src/graphics/text/FGrp_TextTextWidthManager.h

index 986cc89..e38ddb5 100644 (file)
@@ -67,10 +67,6 @@ public:
 
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual result GetBlockRegion(int textIndex, int textLength, int& width, int& height) const;
-
-       virtual result GetBlockRegion(int textIndex, int textLength, float& width, float& height) const;
-
        virtual int GetHeight(void) const;
 
        virtual float GetHeightF(void) const;
@@ -101,6 +97,8 @@ public:
 
        virtual int GetBaseline(void) const;
 
+       virtual float GetBaselineF(void) const;
+
        virtual void SetForegroundColor(const Color& color);
 
        virtual Color GetForegroundColor(void) const;
index 326e4f4..c132c3b 100644 (file)
@@ -47,21 +47,15 @@ class _OSP_EXPORT_ TextImage
        : public TextElement
 {
 public:
-       TextImage(Bitmap& bitmap, TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL, Rectangle* pRect = null,
+       TextImage(Bitmap& bitmap, TextElementSourceType sourceType = TEXT_ELEMENT_SOURCE_TYPE_INTERNAL,
                        TextObjectAlignment align = TextObjectAlignment(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
-
+       
        virtual ~TextImage(void);
 
 public:
-       virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap,
-                                       int& actualLength, int& width, int& height);
-
        virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
                                        int& actualLength, float& width, float& height);
 
-       virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength,
-                       const TextObjectAlignment align, const TextObjectActionType action);
-
        virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
                        const TextObjectAlignment align, const TextObjectActionType action);
 
@@ -69,14 +63,8 @@ public:
 
        virtual TextElement* CopyN(int textStart, int textLength);
 
-       virtual result GetRegion(int textIndex, int startTextIndex, int& width, int& height) const;
-
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual result GetBlockRegion(int textIndex, int textLength, int& width, int& height) const;
-
-       virtual result GetBlockRegion(int textIndex, int textLength, float& width, float& height) const;
-
        virtual int GetHeight(void) const;
 
        virtual float GetHeightF(void) const;
@@ -89,6 +77,8 @@ public:
 
        virtual int GetBaseline(void) const;
 
+       virtual float GetBaselineF(void) const;
+
        result SetBounds(const Rectangle& rect);
 
        result SetBounds(const FloatRectangle& rect);
@@ -105,7 +95,7 @@ public:
 
 private:
        Bitmap* __pBitmap;
-       Rectangle __rect;
+       FloatRectangle __rect;
        TextObjectAlignment __align;
 
 private:
index 0373e2c..a98e6af 100644 (file)
@@ -96,13 +96,13 @@ public:
 
        TextElement* GetElementAtTextIndex(int textIndex) const;
 
-       int GetTextIndexFromPosition(int lcX, int lcY, bool cursorMode = true) const;
+       int GetTextIndexFromPosition(int x, int y, bool cursorMode = true) const;
 
-       int GetTextIndexFromPosition(float lcX, float lcY, bool cursorMode = true) const;
+       int GetTextIndexFromPosition(float x, float y, bool cursorMode = true) const;
 
-       int GetTextIndexFromPositionAtLine(int lineIndex, int lcX, bool cursorMode = true) const;
+       int GetTextIndexFromPositionAtLine(int lineIndex, int x, bool cursorMode = true) const;
 
-       int GetTextIndexFromPositionAtLine(int lineIndex, float lcX, bool cursorMode = true) const;
+       int GetTextIndexFromPositionAtLine(int lineIndex, float x, bool cursorMode = true) const;
 
        result ChangeTextOffset(wchar_t* pText, int textIndex, int gap);
 
@@ -126,9 +126,9 @@ public:
 
        int GetDisplayLineCount(void) const;
 
-       int GetLineIndexAtPositionY(int lcY) const;
+       int GetLineIndexAtPositionY(int y) const;
 
-       int GetLineIndexAtPositionY(float lcY) const;
+       int GetLineIndexAtPositionY(float y) const;
 
        int GetFirstTextIndexAt(int lineIndex) const;
 
@@ -156,17 +156,17 @@ public:
 
        TextObjectAlignment GetElementVerticalAlignment(void) const;
 
-       result SetBounds(const Rectangle& lcRect);
+       result SetBounds(const Rectangle& rect);
 
-       result SetBounds(const FloatRectangle& lcRect);
+       result SetBounds(const FloatRectangle& rect);
 
        Rectangle GetBounds(void) const;
 
        FloatRectangle GetBoundsF(void) const;
 
-       result SetLineSpace(int lcLineSpacing);
+       result SetLineSpace(int lineSpacing);
 
-       result SetLineSpace(float lcLineSpacing);
+       result SetLineSpace(float lineSpacing);
 
        int GetLineSpace(void) const;
 
@@ -247,7 +247,7 @@ public:
 
        void GetBlockRange(int& startTextIndex, int& textLength);
 
-       result SetSlidingStep(int lcSlidingStep);
+       result SetSlidingStep(int slidingStep);
 
        int GetSlidingStep(void) const;
 
@@ -265,9 +265,9 @@ public:
 
        int GetFirstDisplayLineIndex(void) const;
 
-       result SetFirstDisplayPositionY(int lcY);
+       result SetFirstDisplayPositionY(int y);
 
-       result SetFirstDisplayPositionY(float lcY);
+       result SetFirstDisplayPositionY(float y);
 
        int GetFirstDisplayPositionY(void) const;
 
@@ -291,9 +291,9 @@ public:
 
        int GetTotalCutLinkElementCount(void) const;
 
-       int GetCutLinkIndexFromPositionData(int lcX, int lcY) const;
+       int GetCutLinkIndexFromPositionData(int x, int y) const;
 
-       int GetCutLinkIndexFromPositionData(float lcX, float lcY) const;
+       int GetCutLinkIndexFromPositionData(float x, float y) const;
 
        TextElement* GetCutLinkElementAtCutLinkElementIndex(int linkIndex) const;
 
@@ -372,13 +372,13 @@ private:
        result GetTextPositionInfoInNoneWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
                        float& logicalX, float& logicalY) const;
 
-       int GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode = true) const;
+       int GetTextIndexFromPositionInWrap(int x, int y, bool cursorMode = true) const;
 
-       int GetTextIndexFromPositionInWrap(float pcX, float pcY, bool cursorMode = true) const;
+       int GetTextIndexFromPositionInWrap(float x, float y, bool cursorMode = true) const;
 
-       int GetTextIndexFromPositionInNoneWrap(int pcX, int pcY, bool cursorMode = true) const;
+       int GetTextIndexFromPositionInNoneWrap(int x, int y, bool cursorMode = true) const;
 
-       int GetTextIndexFromPositionInNoneWrap(float pcX, float pcY, bool cursorMode = true) const;
+       int GetTextIndexFromPositionInNoneWrap(float x, float y, bool cursorMode = true) const;
 
        result UpdateChangedInfo(int startTextIndex, int textLength = -1, bool initTextWidthManager = true);
 
@@ -402,8 +402,7 @@ private:
 
 // Attribute
 private:
-       Rectangle __rect;
-       Rectangle __pcRect;
+       FloatRectangle __rect;
        TextObjectActionType __action;
        TextObjectAlignment __align;
        TextObjectWrapType __wrap;
index bd58e39..ec2e5f9 100644 (file)
@@ -75,10 +75,6 @@ public:
 
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual result GetBlockRegion(int textIndex, int textLength, int& width, int& height) const;
-
-       virtual result GetBlockRegion(int textIndex, int textLength, float& width, float& height) const;
-
        virtual int GetHeight(void) const;
 
        virtual float GetHeightF(void) const;
@@ -93,6 +89,8 @@ public:
 
        virtual int GetBaseline(void) const;
 
+       virtual float GetBaselineF(void) const;
+
        int GetTextOffset(void) const;
 
        result SetFont(const Font* pFont);
index 60b46a4..b0b2665 100644 (file)
@@ -116,7 +116,7 @@ TextColumn::~TextColumn(void)
 }
 
 result
-TextColumn::GetRegion(int textIndex, int textLength, int& width, int& height) const
+TextColumn::GetRegion(int textIndex, int textLength, float& width, float& height) const
 {
        result r = E_SUCCESS;
 
@@ -130,7 +130,7 @@ TextColumn::GetRegion(int textIndex, int textLength, int& width, int& height) co
                return __pCompositeText->GetRegion(textIndex, textLength, width, height);
        }
 
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
        SimpleNode* pTextLineNode = null;
        TextLine* pTextLine = null;
 
@@ -138,13 +138,11 @@ TextColumn::GetRegion(int textIndex, int textLength, int& width, int& height) co
        while (pTextLineNode)
        {
                pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
-               SysTryReturn(NID_GRP
-                       , pTextLine
-                       , r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+               SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
 
-               width = Math::Max(width, lineBounds.width);
+               width = (width > lineBounds.width) ? width : lineBounds.width;
                height += lineBounds.height;
 
                pTextLineNode = pTextLineNode->pNext;
@@ -153,46 +151,26 @@ TextColumn::GetRegion(int textIndex, int textLength, int& width, int& height) co
        return r;
 }
 
-result
-TextColumn::GetRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-
-       result r =  GetRegion(textIndex, textLength, newWidth, newHeight);
-
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-
-       return r;
-}
-
-int
-TextColumn::GetHeight(int textIndex) const
+float
+TextColumn::GetHeightF(int textIndex) const
 {
        if (textIndex < 0)
        {
-               return GetTotalHeight();
+               return GetTotalHeightF();
        }
 
-       return __pCompositeText->GetHeight(textIndex);
-}
-
-float
-TextColumn::GetHeightF(int textIndex) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetHeight(textIndex));
+       return __pCompositeText->GetHeightF(textIndex);
 }
 
 result
-TextColumn::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength,
+TextColumn::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
                const TextObjectAlignment alignment, const TextObjectActionType action)
 {
        result r = E_SUCCESS;
        TextLine* pTextLine = null;
        SimpleNode* pTextLineNode = null;
        TextObjectActionType lineAction = TEXT_OBJECT_ACTION_TYPE_NONE;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
 
        __displayLineCount = 0;
        __displayHeight = 0;
@@ -211,7 +189,7 @@ TextColumn::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
                return E_SUCCESS;
        }
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
 
        if (__firstDisplayPositionY != lineBounds.y)
        {
@@ -243,13 +221,13 @@ TextColumn::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
                        }
                        else
                        {
-                               Rectangle nextLineBounds;
+                               FloatRectangle nextLineBounds;
                                if (__pLines->nodeCount < pNextTextLine->GetIndex())
                                {
                                        return E_SUCCESS;
                                }
 
-                               nextLineBounds = pNextTextLine->GetBounds();
+                               nextLineBounds = pNextTextLine->GetBoundsF();
                                if (displayRect.height < (lineBounds.height + nextLineBounds.height))
                                {
                                        lineAction = TEXT_OBJECT_ACTION_TYPE_ABBREV;
@@ -296,23 +274,14 @@ TextColumn::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
                        return E_SUCCESS;
                }
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
        }
 
        return E_SUCCESS;
 }
 
 result
-TextColumn::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
-               const TextObjectAlignment alignment, const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return Draw(canvasImpl, newDisplayRect, startTextIndex, textLength, alignment, action);
-}
-
-result
-TextColumn::CalculateDisplayableLineCount(Rectangle& displayRect, const TextObjectActionType action)
+TextColumn::CalculateDisplayableLineCount(FloatRectangle& displayRect, const TextObjectActionType action)
 {
        int displayLineCount = 0;
 
@@ -330,7 +299,7 @@ TextColumn::CalculateDisplayableLineCount(Rectangle& displayRect, const TextObje
                return -1;
        }
 
-       Rectangle lineBounds = pTextLine->GetBounds();
+       FloatRectangle lineBounds = pTextLine->GetBoundsF();
 
        if (__firstDisplayPositionY != lineBounds.y)
        {
@@ -353,13 +322,13 @@ TextColumn::CalculateDisplayableLineCount(Rectangle& displayRect, const TextObje
                        }
                        else
                        {
-                               Rectangle nextLineBounds;
+                               FloatRectangle nextLineBounds;
                                if (__pLines->nodeCount < pNextTextLine->GetIndex())
                                {
                                        return -1;
                                }
 
-                               nextLineBounds = pNextTextLine->GetBounds();
+                               nextLineBounds = pNextTextLine->GetBoundsF();
                                if (displayRect.height < (lineBounds.height + nextLineBounds.height))
                                {
                                        displayLineCount++;
@@ -393,20 +362,12 @@ TextColumn::CalculateDisplayableLineCount(Rectangle& displayRect, const TextObje
                        return -1;
                }
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
        }
 
        return displayLineCount;
 }
 
-result
-TextColumn::CalculateDisplayableLineCount(FloatRectangle& displayRect, const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return CalculateDisplayableLineCount(newDisplayRect, action);
-}
-
 int
 TextColumn::GetTextLength(void) const
 {
@@ -465,7 +426,7 @@ TextColumn::GetLineIndexAtPositionY(int y)
        TextLine* pTextLine = null;
 
        int lineIndex = 0;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
 
        if (GetTotalLineCount() == 0)
        {
@@ -480,7 +441,7 @@ TextColumn::GetLineIndexAtPositionY(int y)
                        pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
                        SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-                       lineBounds = pTextLine->GetBounds();
+                       lineBounds = pTextLine->GetBoundsF();
 
                        if (y >= lineBounds.y && y < lineBounds.y + lineBounds.height)
                        {
@@ -518,7 +479,7 @@ TextColumn::GetLineIndexAtPositionY(int y)
                        pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
                        SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-                       lineBounds = pTextLine->GetBounds();
+                       lineBounds = pTextLine->GetBoundsF();
 
                        if (y >= lineBounds.y && y < lineBounds.y + lineBounds.height)
                        {
@@ -554,20 +515,24 @@ TextColumn::GetLineIndexAtPositionY(float y)
 int
 TextColumn::GetTotalHeight(void) const
 {
+       return _CoordinateSystemUtils::ConvertToInteger(GetTotalHeightF());
+}
+
+float
+TextColumn::GetTotalHeightF(void) const
+{
        SimpleNode* pTextLineNode = null;
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
-       int height = 0;
+       FloatRectangle lineBounds;
+       float height = 0;
 
        pTextLineNode = TextSimpleList::GetFirstNode(__pLines);
        while (pTextLineNode)
        {
                pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
-               SysTryReturn(NID_GRP
-                       , pTextLine
-                       , 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+               SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
 
                height += lineBounds.height;
                pTextLineNode = pTextLineNode->pNext;
@@ -576,43 +541,33 @@ TextColumn::GetTotalHeight(void) const
        return height;
 }
 
-float
-TextColumn::GetTotalHeightF(void) const
+int
+TextColumn::GetLineHeightAt(int index) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetTotalHeight());
+       return _CoordinateSystemUtils::ConvertToInteger(GetLineHeightAtF(index));
 }
 
-int
-TextColumn::GetLineHeightAt(int index) const
+float
+TextColumn::GetLineHeightAtF(int index) const
 {
        TextLine* pTextLine = null;
        pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, index));
 
-       SysTryReturn(NID_GRP
-               , pTextLine
-               , 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       Rectangle lineRect;
-       lineRect = pTextLine->GetBounds();
+       FloatRectangle lineRect;
+       lineRect = pTextLine->GetBoundsF();
 
        return lineRect.height;
 }
 
-float
-TextColumn::GetLineHeightAtF(int index) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetLineHeightAt(index));
-}
-
 int
 TextColumn::GetTextLengthAt(int lineIndex) const
 {
        TextLine* pTextLine = null;
 
        pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, lineIndex));
-       SysTryReturn(NID_GRP
-               , pTextLine
-               , 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        return pTextLine->GetTextLength();
 }
@@ -623,9 +578,7 @@ TextColumn::GetFirstTextIndexAt(int lineIndex) const
        TextLine* pTextLine = null;
 
        pTextLine = static_cast < TextLine* >(TextSimpleList::GetNthObject(__pLines, lineIndex));
-       SysTryReturn(NID_GRP
-               , pTextLine
-               , 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, 0, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        return pTextLine->GetTextOffset();
 }
@@ -633,9 +586,7 @@ TextColumn::GetFirstTextIndexAt(int lineIndex) const
 result
 TextColumn::Append(TextLine* pTextLine)
 {
-       SysTryReturn(NID_GRP
-                       , pTextLine
-                       , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        TextSimpleList::AppendObject(__pLines, pTextLine);
        __totalLineCount++;
@@ -1040,7 +991,7 @@ TextColumn::FinishCompose(bool isUpdateSweepInfo)
 
        SimpleNode* pTextLineNode = null;
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
 
        if (__currentLineIndexToAddDuringCompose == 0)
        {
@@ -1056,30 +1007,24 @@ TextColumn::FinishCompose(bool isUpdateSweepInfo)
        }
 
        pTextLineNode = TextSimpleList::GetNthNode(__pLines, __currentLineIndexToAddDuringCompose - 1);
-       SysTryReturn(NID_GRP
-               , pTextLineNode
-               , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node.");
+       SysTryReturn(NID_GRP, pTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node.");
 
        pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
-       SysTryReturn(NID_GRP
-               , pTextLine
-               , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       lineBounds = pTextLine->GetBounds();
-       int nextLineY = lineBounds.y + lineBounds.height;
+       lineBounds = pTextLine->GetBoundsF();
+       float nextLineY = lineBounds.y + lineBounds.height;
 
        pTextLineNode = TextSimpleList::GetNthNode(__pLines, __currentLineIndexToAddDuringCompose);
 
        while (pTextLineNode != null)
        {
                pTextLine = static_cast < TextLine* >(pTextLineNode->pObject);
-               SysTryReturn(NID_GRP
-                       , pTextLine
-                       , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+               SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
                int lineOffset = pTextLine->GetTextOffset();
                lineOffset += changedTextLength;
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                lineBounds.y = nextLineY;
                nextLineY += lineBounds.height;
 
@@ -1105,9 +1050,8 @@ TextColumn::FinishCompose(bool isUpdateSweepInfo)
 TextLine*
 TextColumn::GetPrevLineChangedStartLine(void) const
 {
-       SysTryReturn(NID_GRP
-                       , __setChangeAction
-                       , null, E_INVALID_STATE, "[E_INVALID_STATE] This instance is set change action list yet.");
+       SysTryReturn(NID_GRP, __setChangeAction, null, E_INVALID_STATE
+               , "[E_INVALID_STATE] This instance is set change action list yet.");
 
        if (__prevLineIndexBeforeChangedStartLine < 0)
        {
@@ -1115,9 +1059,7 @@ TextColumn::GetPrevLineChangedStartLine(void) const
        }
 
        TextLine* pTextLine = GetTextLine(__prevLineIndexBeforeChangedStartLine);
-       SysTryReturn(NID_GRP
-               , pTextLine
-               , null, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, null, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        SetLastResult(E_SUCCESS);
 
@@ -1169,9 +1111,8 @@ TextColumn::GetChangeActionEventCount(void) const
 result
 TextColumn::RemoveLinesFrom(int lineIndex)
 {
-       SysTryReturn(NID_GRP
-                       , 0 <= lineIndex
-                       , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, 0 <= lineIndex, E_INVALID_ARG, E_INVALID_ARG
+               , "[E_INVALID_ARG] The argument is invalid.");
 
        TextLine* pTextLine = null;
        int count = 0;
@@ -1666,49 +1607,49 @@ TextColumn::GetFirstDisplayLineIndex(void) const
 void
 TextColumn::SetFirstDisplayPositionY(int y)
 {
-       __firstDisplayPositionY = y;
+       __firstDisplayPositionY =  _CoordinateSystemUtils::ConvertToFloat(y);
 }
 
 void
 TextColumn::SetFirstDisplayPositionY(float y)
 {
-       __firstDisplayPositionY =  _CoordinateSystemUtils::ConvertToInteger(y);
+       __firstDisplayPositionY = y;
 }
 
 int
 TextColumn::GetFirstDisplayPositionY(void) const
 {
-       return __firstDisplayPositionY;
+       return _CoordinateSystemUtils::ConvertToInteger(__firstDisplayPositionY);
 }
 
 float
 TextColumn::GetFirstDisplayPositionYF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(__firstDisplayPositionY);
+       return __firstDisplayPositionY;
 }
 
 void
 TextColumn::SetDisplayHeight(int height)
 {
-       __displayHeight = height;
+       __displayHeight = _CoordinateSystemUtils::ConvertToFloat(height);
 }
 
 void
 TextColumn::SetDisplayHeight(float height)
 {
-       __displayHeight = _CoordinateSystemUtils::ConvertToInteger(height);
+       __displayHeight = height;
 }
 
 int
 TextColumn::GetDisplayHeight(void) const
 {
-       return __displayHeight;
+       return _CoordinateSystemUtils::ConvertToInteger(__displayHeight);
 }
 
 float
 TextColumn::GetDisplayHeightF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(__displayHeight);
+       return __displayHeight;
 }
 
 SimpleNode*
@@ -1720,8 +1661,7 @@ TextColumn::GetTextLineNode(int lineIndex) const
 result
 TextColumn::SetSlidingDimension(Dimension& slidingDimension)
 {
-       SysTryReturn(NID_GRP
-                       , slidingDimension.width >= 0 && slidingDimension.height >=0
+       SysTryReturn(NID_GRP, slidingDimension.width >= 0 && slidingDimension.height >=0
                        , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        __slidingDimension = slidingDimension;
@@ -1798,13 +1738,6 @@ TextColumn::GetChangedLastLineIndex(void) const
 }
 
 int
-TextColumn::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap,
-                                                                       int& actualLength, int& width, int& height)
-{
-       return -1;
-}
-
-int
 TextColumn::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
                                                                        int& actualLength, float& width, float& height)
 {
@@ -2132,15 +2065,15 @@ TextColumn::CompareDeletedLine(void)
        TextLine* pOldTextLine = null;
        TextLine* pNewTextLine = null;
 
-       Dimension newLineSize;
-       Dimension oldLineSize;
+       FloatDimension newLineSize;
+       FloatDimension oldLineSize;
        int sweepResult = 0;
-       int sweepIn = 0;
-       int sweepOut = 0;
-       int prevLineSweepIn = 0;
-       int prevLineSweepOut = 0;
+       float sweepIn = 0;
+       float sweepOut = 0;
+       float prevLineSweepIn = 0;
+       float prevLineSweepOut = 0;
        int changedStartLineIndex = 0;
-       int keyInputWidth = 0;
+       float keyInputWidth = 0;
 
        if (TextSimpleList::GetCount(__pKeepLines) == 0)
        {
@@ -2149,23 +2082,16 @@ TextColumn::CompareDeletedLine(void)
 
        keyInputWidth = __pCompositeText->GetWorkWidth();
        pOldTextLineNode  = TextSimpleList::GetFirstNode(__pKeepLines);
-       SysTryReturn(NID_GRP
-                       , pOldTextLineNode
-                       , E_SYSTEM, E_SYSTEM
-                       , "[E_SYSTEM] Fail to get text line node.");
+       SysTryReturn(NID_GRP, pOldTextLineNode, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line node.");
 
        pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject);
        changedStartLineIndex = pOldTextLine->GetIndex();
        pNewTextLineNode = TextSimpleList::GetNthNode(__pLines, changedStartLineIndex);
-       SysTryReturn(NID_GRP
-                       , pNewTextLineNode
-                       , E_INVALID_STATE, E_INVALID_STATE
-                       , "[E_INVALID_STATE] This instance is not constructed yet. changedStartLineIndex = %d", changedStartLineIndex);
+       SysTryReturn(NID_GRP, pNewTextLineNode, E_INVALID_STATE, E_INVALID_STATE
+               , "[E_INVALID_STATE] This instance is not constructed yet. changedStartLineIndex = %d", changedStartLineIndex);
 
        r = SetKeyInputLine(changedStartLineIndex, TextSimpleList::GetCount(__pLines) - changedStartLineIndex);
-       SysTryReturn(NID_GRP
-               , r == E_SUCCESS
-               , r, r, "[%s] Propagating.", GetErrorMessage(r));
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        pOldTextLine = static_cast < TextLine* >(pOldTextLineNode->pObject);
        pNewTextLine = static_cast < TextLine* >(pNewTextLineNode->pObject);
index 836b447..b9ac6af 100644 (file)
@@ -71,25 +71,15 @@ public:
        virtual ~TextColumn(void);
 
 public:
-       virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex,
-                                                       int textLength, const TextObjectAlignment alignment, const TextObjectActionType action);
-
        virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex,
                                                        int textLength, const TextObjectAlignment alignment, const TextObjectActionType action);
 
-       virtual result GetRegion(int textIndex, int textLength, int& width, int& height) const;
-
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual int GetHeight(int textIndex) const;
-
        virtual float GetHeightF(int textIndex) const;
 
        virtual int GetTextLength(void) const;
 
-       virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap,
-                                                                               int& actualLength, int& width, int& height);
-
        virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
                                                                                int& actualLength, float& width, float& height);
 
@@ -199,8 +189,6 @@ public:
 
        result CompareDeletedLine(void);
 
-       result CalculateDisplayableLineCount(Rectangle& displayRect, const TextObjectActionType action);
-
        result CalculateDisplayableLineCount(FloatRectangle& displayRect, const TextObjectActionType action);
 
 private:
@@ -251,9 +239,9 @@ private:
        SimpleList* __pTextChangeActionList;
        int __totalLineCount;
        int __firstDisplayLineIndex;
-       int __firstDisplayPositionY;
+       float __firstDisplayPositionY;
        int __displayLineCount;
-       int __displayHeight;
+       float __displayHeight;
        Tizen::Graphics::Dimension __slidingDimension;
        int __slidingPosition;
        bool __setChangeAction;
@@ -269,7 +257,7 @@ private:
        bool __isComposeDone;
        SimpleNode* __pCachedLineNode;
        int __cachedLineIndex;
-       int __cachedLinePositionY;
+       float __cachedLinePositionY;
 
        SimpleList* __pKeepLines;
        int __keepLineCount;
index 62178a8..f8e8c7d 100644 (file)
@@ -36,7 +36,6 @@
 #include "FGrp_TextTextUtility.h"
 #include "FGrp_CanvasImpl.h"
 #include "FGrp_TextTextWidthManager.h"
-#include "../FGrp_Canvas.h"
 #include "FGrp_CoordinateSystemUtils.h"
 
 using namespace Tizen::Base;
@@ -52,7 +51,7 @@ using namespace Tizen::Base::Collection;
 
 namespace // unnamed
 {
-       const int LINE_FEED_WIDTH = 8;
+       const float LINE_FEED_WIDTH = 8.0f;
 }
 
 namespace Tizen { namespace Graphics
@@ -65,17 +64,15 @@ struct NoneWrapComposeInfo
 {
        int prevTextOffset;
        int prevTextLength;
-       int prevWidth;
-       int prevHeight;
+       float prevWidth;
+       float prevHeight;
        int prevEndType;
 };
 
 TextComposite::TextComposite(TextElement* pTextElement)
 {
        __pTextElementList = new (std::nothrow) LinkedList;
-       SysTryReturn(NID_GRP
-                       , __pTextElementList
-                       , , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+       SysTryReturn(NID_GRP, __pTextElementList, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
 
        __wrap = TEXT_OBJECT_WRAP_TYPE_WORD;
        __workStart = 0;
@@ -149,17 +146,33 @@ int
 TextComposite::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
                                                           int& width, int& height)
 {
+       float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF = _CoordinateSystemUtils::ConvertToFloat(height);
+
+       int r =  ForwardAnalyze(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF);
+
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+
+       return r;
+}
+
+int
+TextComposite::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength,
+                                                          float& width, float& height)
+{
        SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, -1, E_INVALID_ARG
                        , "[E_INVALID_ARG] The argument is invalid. startTextIndex(%d)", startTextIndex);
        SysTryReturn(NID_GRP, textLength <= __length, -1, E_INVALID_ARG
                        , "[E_INVALID_ARG] The argument is invalid. textLength(%d)", textLength);
 
        result r = E_SUCCESS;
-       Dimension textSize;
+       FloatDimension textSize;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
-       int remainingWidth = 0;
+       float remainingWidth = 0;
        int remainingLength = 0;
        int textCount = 0;
        int currentLength = 0;
@@ -169,7 +182,7 @@ TextComposite::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth,
        TextElement* pTextElement = null;
 
        bool isFirstWord = true;
-       Dimension tempTextSize;
+       FloatDimension tempTextSize;
        int tempTextCount = 0;
        actualLength = 0;
        width = 0;
@@ -202,7 +215,7 @@ TextComposite::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth,
 
                actualLength += textCount;
                width += textSize.width;
-               height = Math::Max(textSize.height, height);
+               height = (textSize.height > height) ? textSize.height : height;
 
                if (__wrap == TEXT_OBJECT_WRAP_TYPE_WORD && ret != TEXT_RETBY_LIMITWIDTH)
                {
@@ -278,24 +291,26 @@ CATCH:
 }
 
 int
-TextComposite::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength,
-                                                          float& width, float& height)
+TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
+                                                          int& width, int& height, int& baseline)
 {
-       int newMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight = _CoordinateSystemUtils::ConvertToInteger(height);
+       float maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF = _CoordinateSystemUtils::ConvertToFloat(height);
+       float baselineF = _CoordinateSystemUtils::ConvertToFloat(baseline);
 
-       int r =  ForwardAnalyze(startTextIndex, textLength, newMaxWidth, wrap, actualLength, newWidth, newHeight);
+       int r = ForwardAnalyzeWithBaseline(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF, baselineF);
 
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newWidth);
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       baseline = _CoordinateSystemUtils::ConvertToInteger(baselineF);
 
        return r;
 }
 
 int
-TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
-                                                          int& width, int& height, int& baseline)
+TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength,
+                                                          float& width, float& height, float& baseline)
 {
        SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length
                        , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. startTextIndex(%d)", startTextIndex);
@@ -305,11 +320,11 @@ TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, in
 
        result r = E_SUCCESS;
 
-       Dimension textSize;
+       FloatDimension textSize;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
-       int remainingWidth = 0;
+       float remainingWidth = 0;
        int remainingLength = 0;
        int textCount = 0;
        int currentLength = 0;
@@ -320,7 +335,7 @@ TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, in
        TextElement* pTextElement = null;
 
        bool isFirstWord = true;
-       Dimension tempTextSize;
+       FloatDimension tempTextSize;
        int tempTextCount = 0;
        actualLength = 0;
        width = 0;
@@ -334,7 +349,7 @@ TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, in
        remainingWidth = maxWidth;
        remainingLength = textLength;
        currentLength = Math::Min(remainingLength, currentLength);
-       baseline = pTextElement->GetBaseline();
+       baseline = pTextElement->GetBaselineF();
 
        pEnum = __pTextElementList->GetEnumeratorN();
        for (int i = 0; i <= elementIndex; i++)
@@ -355,7 +370,8 @@ TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, in
 
                actualLength += textCount;
                width += textSize.width;
-               baseline = Math::Max(pTextElement->GetBaseline(), baseline);
+               baseline = (pTextElement->GetBaselineF() > baseline) ? pTextElement->GetBaselineF() : baseline;
+               
                if (height < textSize.height)
                {
                        height = textSize.height;
@@ -441,24 +457,8 @@ CATCH:
        return -1;
 }
 
-int
-TextComposite::ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap, int& actualLength,
-                                                          float& width, float& height, int& baseline)
-{
-       int newMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-
-       int r = ForwardAnalyzeWithBaseline(startTextIndex, textLength, newMaxWidth, wrap, actualLength, newWidth, newHeight, baseline);
-
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-
-       return r;
-}
-
 result
-TextComposite::GetRegion(int textIndex, int textLength, int& width, int& height) const
+TextComposite::GetRegion(int textIndex, int textLength, float& width, float& height) const
 {
        if (textLength == 0)
        {
@@ -476,7 +476,7 @@ TextComposite::GetRegion(int textIndex, int textLength, int& width, int& height)
        result r = E_SUCCESS;
        IEnumerator* pEnum = null;
        TextElement* pTextElement = null;
-       Dimension textSize;
+       FloatDimension textSize;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
@@ -502,7 +502,7 @@ TextComposite::GetRegion(int textIndex, int textLength, int& width, int& height)
                pTextElement->GetRegion(textIndexFromElementOffset, currentLength, textSize.width, textSize.height);
 
                width += textSize.width;
-               height = Math::Max(height, textSize.height);
+               height = (height > textSize.height) ? height : textSize.height;
                textLength -= currentLength;
 
                if (pEnum->MoveNext() != E_SUCCESS)
@@ -531,22 +531,8 @@ CATCH:
        return r;
 }
 
-result
-TextComposite::GetRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-
-       result r = GetRegion(textIndex, textLength, newWidth, newHeight);
-
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-
-       return r;
-}
-
-int
-TextComposite::GetHeight(int textIndex) const
+float
+TextComposite::GetHeightF(int textIndex) const
 {
        if (__length == 0)
        {
@@ -564,20 +550,14 @@ TextComposite::GetHeight(int textIndex) const
        pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
        SysTryCatch(NID_GRP, pTextElement, , E_SYSTEM, "[E_SYSTEM] Fail to get text element.");
 
-       return pTextElement->GetHeight();
+       return pTextElement->GetHeightF();
 
 CATCH:
        return -1;
 }
 
-float
-TextComposite::GetHeightF(int textIndex) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetHeight(textIndex));
-}
-
 result
-TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
+TextComposite::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
                                         const TextObjectActionType action)
 {
        if (textLength == 0)
@@ -591,18 +571,16 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTe
        result r = E_SUCCESS;
        IEnumerator* pEnum = null;
        TextElement* pTextElement = null;
-       Dimension textSize;
-       Dimension spaceCharDim;
-       Dimension abbrevTextDim;
-       Rectangle adjustedRect = displayRect;
-       Rectangle blockRect;
+       FloatDimension textSize;
+       FloatDimension spaceCharDim;
+       FloatDimension abbrevTextDim;
+       FloatRectangle adjustedRect = displayRect;
+       FloatRectangle blockRect;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
        bool drawAbbrevText = false;
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
 
        if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
        {
@@ -656,8 +634,7 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTe
        GetRegion(startTextIndex, textLength, textSize.width, textSize.height);
        if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV)
        {
-               TextElement* pLastTextElement = null;
-               pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1);
+               TextElement* pLastTextElement = (textLength == 0) ? GetElementAtTextIndex(startTextIndex) : GetElementAtTextIndex(startTextIndex + textLength - 1); 
                SysTryCatch(NID_GRP, pLastTextElement, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get element.");
 
                if (pLastTextElement->GetType() == TEXT_ELEMENT_TYPE_TEXT)
@@ -706,7 +683,7 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTe
                SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
        }
 
-       blockRect = Rectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
+       blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
        currentLength = Math::Min(textLength, currentLength);
 
        while (textLength > 0)
@@ -734,7 +711,7 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTe
 
                if (pTextElement->IsBackGroundDrawingModeEnable())
                {
-                       DrawBackgroundBlock(canvasImpl, Rectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+                       DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
                }
 
                bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
@@ -779,7 +756,7 @@ TextComposite::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTe
        {
                if (pTextElement->IsBackGroundDrawingModeEnable())
                {
-                       r = pCanvas->FillRectangle(pTextElement->GetBackgroundColor(), Rectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+                       r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
                        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
@@ -798,16 +775,7 @@ CATCH:
 }
 
 result
-TextComposite::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
-                                        const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return Draw(canvasImpl, newDisplayRect, startTextIndex, textLength, alignment, action);
-}
-
-result
-TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
+TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
                                         const TextObjectActionType action, int baseline)
 {
        if (textLength == 0)
@@ -822,20 +790,17 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect,
        IEnumerator* pEnum = null;
        TextElement* pTextElement = null;
 
-       Dimension textSize;
-       Dimension spaceCharDim;
-       Dimension abbrevTextDim;
-       Rectangle adjustedRect = displayRect;
-       Rectangle blockRect;
+       FloatDimension textSize;
+       FloatDimension spaceCharDim;
+       FloatDimension abbrevTextDim;
+       FloatRectangle adjustedRect = displayRect;
+       FloatRectangle blockRect;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
        bool drawAbbrevText = false;
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
-
        if (__ignoreRearBlank && __rearSpaceHideMode == TEXT_OBJECT_SPACE_HIDE_TYPE_ONE)
        {
                pTextElement = GetElementAtTextIndex(startTextIndex + textLength - 1, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
@@ -935,7 +900,7 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect,
                SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Fail to move next element.", GetErrorMessage(r));
        }
 
-       blockRect = Rectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
+       blockRect = FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height);
        adjustedRect.y = displayRect.y + displayRect.height - baseline;
        canvasImpl.SetTextOrigin(TEXT_ORIGIN_BASELINE);
 
@@ -949,7 +914,7 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect,
 
                if (pTextElement->IsBackGroundDrawingModeEnable())
                {
-                       DrawBackgroundBlock(canvasImpl, Rectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
+                       DrawBackgroundBlock(canvasImpl, FloatRectangle(adjustedRect.x, displayRect.y, adjustedRect.width, adjustedRect.height), startTextIndex, currentLength, alignment, action);
                }
 
                bool isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
@@ -958,7 +923,7 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect,
                        DrawBlock(canvasImpl, blockRect, startTextIndex, currentLength, alignment, action);
                }
 
-               Rectangle imageRect = adjustedRect;
+               FloatRectangle imageRect = adjustedRect;
                imageRect.y -= textSize.height;
                TextElementType objectType = pTextElement->GetType();
 
@@ -1005,7 +970,7 @@ TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect,
        {
                if (pTextElement->IsBackGroundDrawingModeEnable())
                {
-                       r = pCanvas->FillRectangle(pTextElement->GetBackgroundColor(), Rectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
+                       r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, abbrevTextDim.width, displayRect.height));
                        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
@@ -1028,16 +993,7 @@ CATCH:
 }
 
 result
-TextComposite::DrawWithBaseline(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
-                                        const TextObjectActionType action, int baseline)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawWithBaseline(canvasImpl, newDisplayRect, startTextIndex, textLength, alignment, action, baseline);
-}
-
-result
-TextComposite::DrawBlock(_CanvasImpl& canvasImpl, const Rectangle& displayRect, int startTextIndex, int textLength,
+TextComposite::DrawBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
                const TextObjectAlignment align, const TextObjectActionType action)
 {
        int lineIndex = __pCurrentTextColumn->GetLineIndexAtTextIndex(startTextIndex);
@@ -1054,85 +1010,75 @@ TextComposite::DrawBlock(_CanvasImpl& canvasImpl, const Rectangle& displayRect,
                return E_SUCCESS;
        }
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
-
-       Rectangle lineBounds = pTextLine->GetBounds();
+       FloatRectangle lineBounds = pTextLine->GetBoundsF();
        blockStartTextIndex -= lineOffset;
        blockEndTextIndex -= lineOffset;
 
-       Rectangle blockRect = displayRect;
+       FloatRectangle blockRect = displayRect;
        blockRect.y = lineBounds.y;
 
-       LinkedListT<_Util::Pair<int, int>* >* pGapList = pTextLine->GetTextExtentList();
-
-       int left = 0;
-       int right = 0;
-       int blockStart = 0;
-       int blockEnd = 0;
+       Collection::ArrayListT<_FloatPair>* pGapList = pTextLine->GetTextExtentList();
+       
+       float left = 0;
+       float right = 0;
+       float blockStart = 0;
+       float blockEnd = 0;
 
-       _Util::Pair<int, int>* pPair = null;
-       IEnumeratorT<_Util::Pair<int, int>* >* pEnum = pGapList->GetEnumeratorN();
+       _FloatPair currentGap;
+       IEnumeratorT<_FloatPair >* pGapEnum = pGapList->GetEnumeratorN();
+       while (pGapEnum->MoveNext() == E_SUCCESS)
+       {
+               pGapEnum->GetCurrent(currentGap);
+       }
 
        for (int i = 0; i <= blockStartTextIndex; i++)
        {
-               pEnum->MoveNext();
+               pGapEnum->MoveNext();
        }
 
        for (int count = 0; count < blockTextLength; count++)
        {
-               pEnum->GetCurrent(pPair);
-               if (pPair)
+               pGapEnum->GetCurrent(currentGap);
+
+               if (right == currentGap.first || left == currentGap.second)
                {
-                       if (right == pPair->first || left == pPair->second)
-                       {
-                               blockStart = (pPair->first < blockStart) ? pPair->first : blockStart;
-                               blockEnd = (pPair->second > blockEnd) ? pPair->second : blockEnd;
-                       }
-                       else
+                       blockStart = (currentGap.first < blockStart) ? currentGap.first : blockStart;
+                       blockEnd = (currentGap.second > blockEnd) ? currentGap.second : blockEnd;
+               }
+               else
+               {
+                       if (blockStart != blockEnd)
                        {
-                               if (blockStart != blockEnd)
-                               {
-                                       pCanvas->FillRectangle(__defaultBlockColor, Rectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
-                               }
-
-                               blockStart = pPair->first;
-                               blockEnd = pPair->second;
+                               canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
                        }
 
-                       left = pPair->first;
-                       right = pPair->second;
+                       blockStart = currentGap.first;
+                       blockEnd = currentGap.second;
                }
 
-               pEnum->MoveNext();
+               left = currentGap.first;
+               right = currentGap.second;
+
+               pGapEnum->MoveNext();
        }
 
        if (blockStart != blockEnd)
        {
-               pCanvas->FillRectangle(__defaultBlockColor, Rectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
+               canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
        }
 
        if ((pTextLine->GetEndType() == TEXT_RETBY_LINEFEED) && (pTextLine->GetTextLength() == blockEndTextIndex))
        {
-               pCanvas->FillRectangle(__defaultBlockColor, Rectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height));
+               canvasImpl.FillRectangle(__defaultBlockColor, FloatRectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height));
        }
 
-       Release(pEnum);
+       Release(pGapEnum);
 
        return E_SUCCESS;
 }
 
 result
-TextComposite::DrawBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
-               const TextObjectAlignment align, const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawBlock(canvasImpl, newDisplayRect, startTextIndex, textLength, align, action);
-}
-
-result
-TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const Rectangle& displayRect, int startTextIndex, int textLength,
+TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
                const TextObjectAlignment align, const TextObjectActionType action)
 {
        if (textLength == 0)
@@ -1143,22 +1089,19 @@ TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const Rectangle& dis
        TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(__pCurrentTextColumn->GetLineIndexAtTextIndex(startTextIndex));
        SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
-
        int blockEndTextIndex = startTextIndex + textLength;
-       int prevLeft = 0;
-       int prevRight = 0;
-       int blockStart = 0;
-       int blockEnd = 0;
+       float prevLeft = 0;
+       float prevRight = 0;
+       float blockStart = 0;
+       float blockEnd = 0;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
 
-       Rectangle lineBounds = pTextLine->GetBounds();
+       FloatRectangle lineBounds = pTextLine->GetBoundsF();
        blockEndTextIndex -= pTextLine->GetTextOffset();
-       Rectangle blockRect = displayRect;
+       FloatRectangle blockRect = displayRect;
        blockRect.y = lineBounds.y;
 
        TextElement* pTextElement = GetElementAtTextIndex(startTextIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
@@ -1171,45 +1114,52 @@ TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const Rectangle& dis
                if (pSimpleText != null)
                {
                        Color backgroundColor = pSimpleText->GetBackgroundColor();
+                       const wchar_t* pText = pSimpleText->GetTextSource();
 
-                       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont())));
-                       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+                       _FontImpl* pFontImpl = (_FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont())));
+                       SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
-                       _Util::AccumList<_Util::Pair<int, int> > elemenGaptList;
-                       const wchar_t* pText = pSimpleText->GetTextSource();
-                       pFont->GetTextExtentList(_Util::String(pText, wcslen(pText), textIndexFromElementOffset, textLength), elemenGaptList);
+                       Collection::ArrayListT<_FloatPair> elemenGapListF;
+                       pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, textLength, elemenGapListF);
+
+                       _FloatPair currentGap;
+                       IEnumeratorT<_FloatPair >* pEnum = elemenGapListF.GetEnumeratorN();
 
-                       for (_Util::AccumList<_Util::Pair<int, int> >::Iterator iterator = elemenGaptList.Begin(); iterator != elemenGaptList.End(); iterator++)
+                       while (pEnum->MoveNext() == E_SUCCESS)
                        {
-                               if (prevRight == iterator->first || prevLeft == iterator->second)
+                               pEnum->GetCurrent(currentGap);
+
+                               if (prevRight == currentGap.first || prevLeft == currentGap.second)
                                {
-                                       blockStart = (iterator->first < blockStart) ? iterator->first : blockStart;
-                                       blockEnd = (iterator->second > blockEnd) ? iterator->second : blockEnd;
+                                       blockStart = (currentGap.first < blockStart) ? currentGap.first : blockStart;
+                                       blockEnd = (currentGap.second > blockEnd) ? currentGap.second : blockEnd;
                                }
                                else
                                {
                                        if (blockStart != blockEnd)
                                        {
-                                               pCanvas->FillRectangle(backgroundColor, Rectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
+                                               canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
                                        }
 
-                                       blockStart = iterator->first;
-                                       blockEnd = iterator->second;
+                                       blockStart = currentGap.first;
+                                       blockEnd = currentGap.second;
                                }
 
-                               prevLeft = iterator->first;
-                               prevRight = iterator->second;
+                               prevLeft = currentGap.first;
+                               prevRight = currentGap.second;
                        }
 
                        if (blockStart != blockEnd)
                        {
-                               pCanvas->FillRectangle(backgroundColor, Rectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
+                               canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockStart, displayRect.y, blockEnd - blockStart, displayRect.height));
                        }
 
                        if ((pTextLine->GetEndType() == TEXT_RETBY_LINEFEED) && (pTextLine->GetTextLength() == blockEndTextIndex))
                        {
-                               pCanvas->FillRectangle(backgroundColor, Rectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height));
+                               canvasImpl.FillRectangle(backgroundColor, FloatRectangle(blockRect.x + blockEnd, displayRect.y, LINE_FEED_WIDTH, displayRect.height));
                        }
+
+                       Release(pEnum);
                }
        }
 
@@ -1217,16 +1167,7 @@ TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const Rectangle& dis
 }
 
 result
-TextComposite::DrawBackgroundBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
-               const TextObjectAlignment align, const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawBackgroundBlock(canvasImpl, newDisplayRect, startTextIndex, textLength, align, action);
-}
-
-result
-TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const Rectangle& displayRect,
+TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const FloatRectangle& displayRect,
                const TextObjectAlignment align, const TextObjectActionType action)
 {
        SysTryReturn(NID_GRP, pTextLine, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
@@ -1234,17 +1175,14 @@ TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const Rect
        int lineOffset = 0;
        int lineLength = 0;
 
-       Rectangle adjustedRect;
-       Rectangle lineBounds;
-       Dimension lineTextSize;
-
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
+       FloatRectangle adjustedRect;
+       FloatRectangle lineBounds;
+       FloatDimension lineTextSize;
 
        lineLength = pTextLine->GetTextLength();
        lineOffset = pTextLine->GetTextOffset();
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        adjustedRect = displayRect;
@@ -1264,15 +1202,6 @@ TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const Rect
 }
 
 result
-TextComposite::DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const FloatRectangle& displayRect,
-               const TextObjectAlignment align, const TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawLine(canvasImpl, pTextLine, newDisplayRect, align, action);
-}
-
-result
 TextComposite::GetValue(TextElement* pTextElement, TextComponentInfoValueType type, unsigned int* value) const
 {
        SysTryReturn(NID_GRP, pTextElement, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
@@ -1817,7 +1746,7 @@ CATCH :
 }
 
 int
-TextComposite::Compose(Rectangle& rect, TextColumn* pTextColumn)
+TextComposite::Compose(FloatRectangle& rect, TextColumn* pTextColumn)
 {
        SysTryReturn(NID_GRP, pTextColumn, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
@@ -1919,14 +1848,6 @@ TextComposite::Compose(Rectangle& rect, TextColumn* pTextColumn)
        return lineCount;
 }
 
-int
-TextComposite::Compose(FloatRectangle& rect, TextColumn* pTextColumn)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return Compose(newRect, pTextColumn);
-}
-
 result
 TextComposite::SetRange(int textStartIndex, int textLength)
 {
@@ -2174,18 +2095,18 @@ TextComposite::SetFontSize(float size)
 int
 TextComposite::GetFontSize(int textIndex) const
 {
-       unsigned int value = 0;
-
-       result r = GetValue(textIndex, SET_FONT_SIZE, &value);
-       SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       return (int)value;
+       return _CoordinateSystemUtils::ConvertToInteger(GetFontSizeF(textIndex));
 }
 
 float
 TextComposite::GetFontSizeF(int textIndex) const
 {
-       return _CoordinateSystemUtils::ConvertToInteger(GetFontSize(textIndex));
+       unsigned int value = 0;
+
+       result r = GetValue(textIndex, SET_FONT_SIZE, &value);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return (float)value;
 }
 
 result
@@ -2800,14 +2721,22 @@ int
 TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, int maxWidth,
                                                                                                        int& cursorIndex, TextElementType& type)
 {
+       return ForwardAnalyzeWithFocusedObjectType(textIndex, textLength
+                                               , _CoordinateSystemUtils::ConvertToFloat(maxWidth), cursorIndex, type);
+}
+
+int
+TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, float maxWidth,
+                                                                                                       int& cursorIndex, TextElementType& type)
+{
        result r = E_SUCCESS;
-       Dimension textSize;
+       FloatDimension textSize;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
        int textCount = 0;
-       int remainingWidth = 0;
+       float remainingWidth = 0;
        int remainingLength = 0;
        int ret = TEXT_RETBY_NORMAL;
        bool isFirstWord = true;
@@ -2841,7 +2770,7 @@ TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength
 
                if ((objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) && (ret == TEXT_RETBY_LIMITWIDTH))
                {
-                       Dimension tempTextSize;
+                       FloatDimension tempTextSize;
                        r = pTextElement->GetRegion(textIndexFromElementOffset, textCount  + 1, tempTextSize.width, tempTextSize.height);
                        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -2931,15 +2860,6 @@ CATCH:
        return -1;
 }
 
-int
-TextComposite::ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, float maxWidth,
-                                                                                                       int& cursorIndex, TextElementType& type)
-{
-       int newMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-
-       return ForwardAnalyzeWithFocusedObjectType(textIndex, textLength, newMaxWidth, cursorIndex, type);
-}
-
 void
 TextComposite::HideFrontSpace(TextObjectSpaceHideType mode)
 {
@@ -2957,14 +2877,21 @@ TextComposite::HideRearSpace(TextObjectSpaceHideType mode)
 int
 TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, int maxWidth, int& textIndex)
 {
+       return ForwardAnalyzeInNoneCursorMode(startTextIndex, textLength
+                                                                               , _CoordinateSystemUtils::ConvertToFloat(maxWidth), textIndex);
+}
+
+int
+TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, float maxWidth, int& textIndex)
+{
        result r = E_SUCCESS;
-       Dimension textSize;
+       FloatDimension textSize;
        int currentLength = 0;
        int elementTextOffset = 0;
        int elementIndex = 0;
        int textIndexFromElementOffset = 0;
        int textCount = 0;
-       int remainingWidth = 0;
+       float remainingWidth = 0;
        int remainingLength = 0;
        int ret = TEXT_RETBY_NORMAL;
        bool isFirstWord = true;
@@ -2999,7 +2926,7 @@ TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength
 
                if ((objectType == TEXT_ELEMENT_TYPE_TEXT || objectType == TEXT_ELEMENT_TYPE_CUTLINK) && (ret == TEXT_RETBY_LIMITWIDTH))
                {
-                       Dimension tempTextSize;
+                       FloatDimension tempTextSize;
                        r = pTextElement->GetRegion(textIndexFromElementOffset, textCount + 1, tempTextSize.width, tempTextSize.height);
                        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -3087,14 +3014,6 @@ CATCH:
 }
 
 int
-TextComposite::ForwardAnalyzeInNoneCursorMode(int startTextIndex, int textLength, float maxWidth, int& textIndex)
-{
-       int newMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-
-       return ForwardAnalyzeInNoneCursorMode(startTextIndex, textLength, newMaxWidth, textIndex);
-}
-
-int
 TextComposite::GetCutLinkElementCount(void) const
 {
        return __pCutLinkListInfo->GetCutLinkElementCount();
@@ -3327,18 +3246,18 @@ TextComposite::SetAbbrevObjectFontInfo(TextSimple* pSimpleText)
 }
 
 int
-TextComposite::ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo)
+TextComposite::ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo)
 {
        SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
-       Dimension textSize;
+       FloatRectangle lineBounds;
+       FloatDimension textSize;
        int lineOffset = 0;
        int lineLength = 0;
        int endType = TEXT_RETBY_NORMAL;
        bool isChanged = false;
-       int baseline = 0;
+       float baseline = 0;
        int textIndex = 0;
 
        textIndex = (__workStart < 0) ? 0 : __workStart;
@@ -3350,7 +3269,7 @@ TextComposite::ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrap
                pTextLine = __pCurrentTextColumn->GetTextLine(0);
                SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                endType = pTextLine->GetEndType();
 
                if (lineBounds.width != rect.width)
@@ -3457,13 +3376,13 @@ TextComposite::ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrap
        }
        else if (forwardSearch && textIndex >= lineOffset + lineLength)
        {
-               Dimension needDim;
+               FloatDimension needDim;
                GetRegion(lineOffset + lineLength, textIndex - (lineOffset + lineLength) + 1, needDim.width, needDim.height);
 
                int index = 0;
-               int remainingWidth = needDim.width - (lineBounds.width - textSize.width);
+               float remainingWidth = needDim.width - (lineBounds.width - textSize.width);
 
-               Dimension charDim;
+               FloatDimension charDim;
                textSize.width += needDim.width;
                lineLength += textIndex - (lineOffset + lineLength) + 1;
 
@@ -3487,9 +3406,9 @@ TextComposite::ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrap
        {
                if (lineOffset > 0)
                {
-                       Dimension lineTextSize;
+                       FloatDimension lineTextSize;
                        int textCount = 0;
-                       int remainingWidth = 0;
+                       float remainingWidth = 0;
 
                        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
                        remainingWidth = lineBounds.width - lineTextSize.width;
@@ -3529,14 +3448,6 @@ TextComposite::ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrap
        return 1;
 }
 
-int
-TextComposite::ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInNoneWrap(newRect, pNoneWrapComposeInfo);
-}
-
 result
 TextComposite::GetTextExtentList(TextLine* pTextLine) const
 {
@@ -3548,8 +3459,8 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
        int currentLength = 0;
        int textIndexFromElementOffset = 0;
        int remainingLength = 0;
-       int right = 0;
-       int maxWidth = 0;
+       float right = 0;
+       float maxWidth = 0;
 
        TextElement* pTextElement = GetElementAtTextIndex(lineOffset, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
        SysTryReturn(NID_GRP, pTextElement, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text element.");
@@ -3557,15 +3468,15 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
        remainingLength = lineLength;
        currentLength = Math::Min(remainingLength, currentLength);
 
-       LinkedListT <_Util::Pair<int, int>* >* pGapList = new (std::nothrow) LinkedListT <_Util::Pair<int, int>* >;
-       _Util::Pair<int, int>* pGap = null;
-
        IEnumerator* pEnum = __pTextElementList->GetEnumeratorN();
        for (int i = 0; i <= elementIndex; i++)
        {
                r = pEnum->MoveNext();
        }
 
+       Collection::ArrayListT<_FloatPair>* pGapListF = new (std::nothrow) Collection::ArrayListT<_FloatPair>;
+       _FloatPair currentGap;
+
        while (remainingLength != 0)
        {
                TextElementType objectType = pTextElement->GetType();
@@ -3577,31 +3488,35 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
                                const Bitmap* pBitmap = pSimpleText->GetBitmap();
                                if (pBitmap)
                                {
-                                       pGap = new (std::nothrow) _Util::Pair<int, int>;
-                                       pGap->first = maxWidth;
-                                       pGap->second = pGap->first + pBitmap->GetWidth() ;
+                                       currentGap.first = maxWidth;
+                                       currentGap.second = currentGap.first + pBitmap->GetWidth();
 
-                                       pGapList->Add(pGap);
-                                       right = (right < pGap->second) ? pGap->second : right;
+                                       pGapListF->Add(currentGap);
+                                       right = (right < currentGap.second) ? currentGap.second : right;
                                }
                                else
                                {
-                                       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont())));
-                                       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+                                       _FontImpl* pFontImpl = _FontImpl::GetInstance(*const_cast < Font* >(pSimpleText->GetFont()));
+                                       SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+
+                                       Collection::ArrayListT<_FloatPair> pCurrentElementGapListF;
 
-                                       _Util::AccumList<_Util::Pair<int, int> > elemenGaptList;
                                        const wchar_t* pText = pSimpleText->GetTextSource();
-                                       pFont->GetTextExtentList(_Util::String(pText, wcslen(pText), textIndexFromElementOffset, currentLength), elemenGaptList);
+                                       pFontImpl->GetTextExtentList(pText, textIndexFromElementOffset, currentLength, pCurrentElementGapListF);
 
-                                       for (_Util::AccumList<_Util::Pair<int, int> >::Iterator iterator = elemenGaptList.Begin(); iterator != elemenGaptList.End(); iterator++)
+                                       IEnumeratorT<_FloatPair >* pCurrentElementGapEnum = pCurrentElementGapListF.GetEnumeratorN();
+                                       while (pCurrentElementGapEnum->MoveNext() == E_SUCCESS)
                                        {
-                                               pGap = new (std::nothrow) _Util::Pair<int, int>;
-                                               pGap->first = maxWidth + iterator->first;
-                                               pGap->second = maxWidth + iterator->second;
+                                               pCurrentElementGapEnum->GetCurrent(currentGap);
+
+                                               currentGap.first = maxWidth + currentGap.first;
+                                               currentGap.second = maxWidth + currentGap.second;
 
-                                               pGapList->Add(pGap);
-                                               right = (right < pGap->second) ? pGap->second : right;
+                                               pGapListF->Add(currentGap);
+                                               right = (right < currentGap.second) ? currentGap.second : right;
                                        }
+
+                                       Release(pCurrentElementGapEnum);
                                }
                        }
                }
@@ -3610,14 +3525,13 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
                        TextImage* pImageText = dynamic_cast < TextImage* >(pTextElement);
                        if (pImageText != null)
                        {
-                               Rectangle rect = pImageText->GetBounds();
+                               FloatRectangle rect = pImageText->GetBoundsF();
 
-                               pGap = new (std::nothrow) _Util::Pair<int, int>;
-                               pGap->first = maxWidth;
-                               pGap->second = pGap->first + rect.width;
+                               currentGap.first = maxWidth;
+                               currentGap.second = currentGap.first + rect.width;
 
-                               pGapList->Add(pGap);
-                               right = (right < pGap->second) ? pGap->second : right;
+                               pGapListF->Add(currentGap);
+                               right = (right < currentGap.second) ? currentGap.second : right;
                        }
                }
 
@@ -3640,7 +3554,7 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
                right = 0;
        }
 
-       pTextLine->SetTextExtentList(pGapList);
+       pTextLine->SetTextExtentList(pGapListF);
 
        Release(pEnum);
 
@@ -3648,7 +3562,7 @@ TextComposite::GetTextExtentList(TextLine* pTextLine) const
 }
 
 int
-TextComposite::ComposeInWrap(Rectangle& rect)
+TextComposite::ComposeInWrap(FloatRectangle& rect)
 {
        SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
@@ -3656,22 +3570,22 @@ TextComposite::ComposeInWrap(Rectangle& rect)
        int lineCount = 0;
        int textIndex = 0;
        int remainingLength = 0;
-       int remainingWidth = 0;
-       int remainingHeight = 0;
-       int offsetY = 0;
+       float remainingWidth = 0;
+       float remainingHeight = 0;
+       float offsetY = 0;
        bool hasPrevLine = false;
-       Dimension textSize;
+       FloatDimension textSize;
        TextLine* pTextLine = null;
        int ret = 0;
        int endType = TEXT_RETBY_NORMAL;
-       Rectangle lineBounds;
-       Dimension lineTextSize;
+       FloatRectangle lineBounds;
+       FloatDimension lineTextSize;
        int lineOffset = 0;
        int lineLength = 0;
        int displayLineCount = 0;
-       int displayHeight = 0;
-       int baseline = 0;
-       int lineBaseline = 0;
+       float displayHeight = 0;
+       float baseline = 0;
+       float lineBaseline = 0;
 
        pTextLine = __pCurrentTextColumn->GetPrevLineChangedStartLine();
        if (pTextLine != null)
@@ -3679,8 +3593,8 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                endType = pTextLine->GetEndType();
                lineOffset = pTextLine->GetTextOffset();
                lineLength = pTextLine->GetTextLength();
-               lineBounds = pTextLine->GetBounds();
-               lineBaseline = pTextLine->GetBaseline();
+               lineBounds = pTextLine->GetBoundsF();
+               lineBaseline = pTextLine->GetBaselineF();
                pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height);
 
                if (endType != TEXT_RETBY_LINEFEED)
@@ -3704,7 +3618,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
 
                        if (remainingLength == 0)
                        {
-                               int nextY = offsetY;
+                               float nextY = offsetY;
                                lineTextSize.height = lineBounds.height;
 
                                pTextLine = new (std::nothrow)TextLine(this);
@@ -3713,7 +3627,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                                lineBounds.y = nextY;
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -3754,11 +3668,11 @@ TextComposite::ComposeInWrap(Rectangle& rect)
 
                if (remainingLength == 0)
                {
-                       lineTextSize.height = GetHeight(0);
+                       lineTextSize.height = GetHeightF(0);
                        lineBounds.height = lineTextSize.height;
 
                        pTextLine->SetBounds(lineBounds);
-                       pTextLine->SetRegion(0, lineTextSize.height);
+                       pTextLine->SetRegion(0.0f, lineTextSize.height);
                        pTextLine->SetTextLength(0);
                        pTextLine->SetTextOffset(textIndex);
                        pTextLine->SetEndType(TEXT_RETBY_NORMAL);
@@ -3830,10 +3744,10 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                                {
                                        lineLength += textCount;
                                        lineTextSize.width += textSize.width;
-                                       lineBounds.height = Math::Max(lineBounds.height, textSize.height);
+                                       lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height: textSize.height;
                                        lineTextSize.height = lineBounds.height;
                                        endType = ret;
-                                       baseline = Math::Min(lineBaseline, baseline);
+                                       baseline = (lineBaseline > baseline) ? baseline : lineBaseline;
 
                                        pTextLine->SetBounds(lineBounds);
                                        pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
@@ -3851,10 +3765,10 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                        {
                                lineLength += textCount;
                                lineTextSize.width += textSize.width;
-                               lineBounds.height = Math::Max(lineBounds.height, textSize.height);
+                               lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height : textSize.height;
                                lineTextSize.height = lineBounds.height;
                                endType = ret;
-                               baseline = Math::Min(lineBaseline, baseline);
+                               baseline = (lineBaseline > baseline) ? baseline : lineBaseline;
 
                                pTextLine->SetBounds(lineBounds);
                                pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
@@ -3884,7 +3798,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
 
                if (remainingLength > 0)
                {
-                       int nextY = lineBounds.y + lineBounds.height;
+                       float nextY = lineBounds.y + lineBounds.height;
 
                        pTextLine = new (std::nothrow)TextLine(this);
                        SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
@@ -3900,7 +3814,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                {
                        if (endType == TEXT_RETBY_LINEFEED)
                        {
-                               int nextY = lineBounds.y + lineBounds.height;
+                               float nextY = lineBounds.y + lineBounds.height;
                                lineTextSize.height = lineBounds.height;
 
                                pTextLine = new (std::nothrow)TextLine(this);
@@ -3912,7 +3826,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                                lineBounds.height = lineTextSize.height;
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -3935,7 +3849,7 @@ TextComposite::ComposeInWrap(Rectangle& rect)
                }
        }
 
-       Dimension columnTextSize;
+       FloatDimension columnTextSize;
        __pCurrentTextColumn->GetRegion(0, __length, columnTextSize.width, columnTextSize.height);
        rect.height = columnTextSize.height;
 
@@ -3954,38 +3868,29 @@ TextComposite::ComposeInWrap(Rectangle& rect)
 }
 
 int
-TextComposite::ComposeInWrap(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInWrap(newRect);
-}
-
-int
-TextComposite::ComposeInPartialMode(Rectangle& rect)
+TextComposite::ComposeInPartialMode(FloatRectangle& rect)
 {
-       SysTryReturn(NID_GRP
-                       , __pCurrentTextColumn
-                       , -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
+       SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE
+               , "[E_INVALID_STATE] This instance is not constructed yet.");
 
        int textCount = 0;
        int lineCount = 0;
        int textIndex = 0;
        int remainingLength = 0;
-       int remainingWidth = 0;
-       int remainingHeight = 0;
+       float remainingWidth = 0;
+       float remainingHeight = 0;
        int lineOffset = 0;
        int lineLength = 0;
-       int offsetY = 0;
+       float offsetY = 0;
        int ret = 0;
-       Dimension textSize;
-       Dimension lineTextSize;
-       Rectangle lineBounds;
+       FloatDimension textSize;
+       FloatDimension lineTextSize;
+       FloatRectangle lineBounds;
        bool hasPrevLine = false;
        int displayLineCount = 0;
-       int displayHeight = 0;
-       int baseline = 0;
-       int lineBaseline = 0;
+       float displayHeight = 0;
+       float baseline = 0;
+       float lineBaseline = 0;
        TextLine* pTextLine = null;
        int endType = TEXT_RETBY_NORMAL;
 
@@ -4000,8 +3905,8 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                endType = pTextLine->GetEndType();
                lineOffset = pTextLine->GetTextOffset();
                lineLength = pTextLine->GetTextLength();
-               lineBounds = pTextLine->GetBounds();
-               lineBaseline = pTextLine->GetBaseline();
+               lineBounds = pTextLine->GetBoundsF();
+               lineBaseline = pTextLine->GetBaselineF();
                pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height);
 
                if (endType != TEXT_RETBY_LINEFEED)
@@ -4025,7 +3930,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
 
                        if (remainingLength == 0)
                        {
-                               int nextY = offsetY;
+                               float nextY = offsetY;
                                lineTextSize.height = lineBounds.height;
 
                                pTextLine = new (std::nothrow)TextLine(this);
@@ -4034,7 +3939,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                                lineBounds.y = nextY;
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -4075,11 +3980,11 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
 
                if (remainingLength == 0)
                {
-                       lineTextSize.height = GetHeight(0);
+                       lineTextSize.height = GetHeightF(0);
                        lineBounds.height = lineTextSize.height;
 
                        pTextLine->SetBounds(lineBounds);
-                       pTextLine->SetRegion(0, lineTextSize.height);
+                       pTextLine->SetRegion(0.0f, lineTextSize.height);
                        pTextLine->SetTextLength(0);
                        pTextLine->SetTextOffset(textIndex);
                        pTextLine->SetEndType(TEXT_RETBY_NORMAL);
@@ -4099,7 +4004,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                }
        }
 
-       remainingHeight = GetComposePartialLimitHeight();
+       remainingHeight = GetComposePartialLimitHeightF();
        if (remainingHeight == 0)
        {
                remainingHeight = rect.height;
@@ -4162,10 +4067,10 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                                {
                                        lineLength += textCount;
                                        lineTextSize.width += textSize.width;
-                                       lineBounds.height = Math::Max(lineBounds.height, textSize.height);
+                                       lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height: textSize.height;
                                        lineTextSize.height = lineBounds.height;
                                        endType = ret;
-                                       baseline = Math::Min(lineBaseline, baseline);
+                                       baseline = (lineBaseline > baseline) ? baseline : lineBaseline;
 
                                        pTextLine->SetBounds(lineBounds);
                                        pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
@@ -4183,10 +4088,10 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                        {
                                lineLength += textCount;
                                lineTextSize.width += textSize.width;
-                               lineBounds.height = Math::Max(lineBounds.height, textSize.height);
+                               lineBounds.height = (lineBounds.height > textSize.height) ? lineBounds.height  : textSize.height;
                                lineTextSize.height = lineBounds.height;
                                endType = ret;
-                               baseline = Math::Min(lineBaseline, baseline);
+                               baseline = (lineBaseline > baseline) ? baseline : lineBaseline;
 
                                pTextLine->SetBounds(lineBounds);
                                pTextLine->SetRegion(lineTextSize.width, lineTextSize.height);
@@ -4220,7 +4125,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
 
                if (remainingLength > 0)
                {
-                       int nextY = lineBounds.y + lineBounds.height;
+                       float nextY = lineBounds.y + lineBounds.height;
 
                        pTextLine = new (std::nothrow)TextLine(this);
                        SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
@@ -4236,7 +4141,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                {
                        if (endType == TEXT_RETBY_LINEFEED)
                        {
-                               int nextY = lineBounds.y + lineBounds.height;
+                               float nextY = lineBounds.y + lineBounds.height;
                                lineTextSize.height = lineBounds.height;
 
                                pTextLine = new (std::nothrow)TextLine(this);
@@ -4248,7 +4153,7 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
                                lineBounds.height = lineTextSize.height;
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -4297,29 +4202,13 @@ TextComposite::ComposeInPartialMode(Rectangle& rect)
 }
 
 int
-TextComposite::ComposeInPartialMode(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInPartialMode(newRect);
-}
-
-int
-TextComposite::ComposeInNormalWrap(Rectangle& rect)
-{
-       return ComposeInWrap(rect);
-}
-
-int
 TextComposite::ComposeInNormalWrap(FloatRectangle& rect)
 {
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInNormalWrap(newRect);
+       return ComposeInWrap(rect);
 }
 
 int
-TextComposite::ComposeInWordWrap(Rectangle& rect)
+TextComposite::ComposeInWordWrap(FloatRectangle& rect)
 {
        if (IsWidthManagerEnabled())
        {
@@ -4332,23 +4221,15 @@ TextComposite::ComposeInWordWrap(Rectangle& rect)
 }
 
 int
-TextComposite::ComposeInWordWrap(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInWordWrap(newRect);
-}
-
-int
-TextComposite::ComposeInNoneWrapMiddleEllipsis(Rectangle& rect)
+TextComposite::ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect)
 {
        int endType = TEXT_RETBY_NORMAL;
-       Rectangle lineBounds;
-       Dimension abbrevTextDim;
-       Dimension textSize;
+       FloatRectangle lineBounds;
+       FloatDimension abbrevTextDim;
+       FloatDimension textSize;
        int length = 0;
-       int maxHeight = 0;
-       int baseline = 0;
+       float maxHeight = 0;
+       float baseline = 0;
 
        lineBounds.width = rect.width;
        lineBounds.x = 0;
@@ -4382,7 +4263,7 @@ TextComposite::ComposeInNoneWrapMiddleEllipsis(Rectangle& rect)
        __pAbbrevTextElement->GetRegion(0, 1, abbrevTextDim.width, abbrevTextDim.height);
        __middleEllipsisWidth = abbrevTextDim.width;
 
-       ForwardAnalyze(0, __length, ((lineBounds.width - __middleEllipsisWidth + 10) >> 1), __wrap, length, textSize.width, textSize.height);
+       ForwardAnalyze(0, __length, ((lineBounds.width - __middleEllipsisWidth + 10.0f) / 2.0f), __wrap, length, textSize.width, textSize.height);
        __middleEllipsisTextLengthInHead = length;
        __middleEllipsisHeadWidth = textSize.width;
 
@@ -4413,25 +4294,17 @@ TextComposite::ComposeInNoneWrapMiddleEllipsis(Rectangle& rect)
 }
 
 int
-TextComposite::ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInNoneWrapMiddleEllipsis(newRect);
-}
-
-int
-TextComposite::ComposeInNoneWrapHeadEllipsis(Rectangle& rect)
+TextComposite::ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect)
 {
        SysTryReturn(NID_GRP, __pCurrentTextColumn, -1, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
        int endType = TEXT_RETBY_NORMAL;
-       Rectangle lineBounds;
-       Dimension abbrevTextDim;
-       Dimension textSize;
+       FloatRectangle lineBounds;
+       FloatDimension abbrevTextDim;
+       FloatDimension textSize;
        int length = 0;
-       int maxHeight = 0;
-       int baseline = 0;
+       float maxHeight = 0;
+       float baseline = 0;
 
        lineBounds.width = rect.width;
        lineBounds.x = 0;
@@ -4486,16 +4359,8 @@ TextComposite::ComposeInNoneWrapHeadEllipsis(Rectangle& rect)
        return 1;
 }
 
-int
-TextComposite::ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInNoneWrapHeadEllipsis(newRect);
-}
-
 result
-TextComposite::DrawAbbrev(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment align)
+TextComposite::DrawAbbrev(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment align)
 {
        if (__TextObjectEllipsisType == TEXT_OBJECT_ELLIPSIS_TYPE_MIDDLE)
        {
@@ -4510,14 +4375,6 @@ TextComposite::DrawAbbrev(_CanvasImpl& canvasImpl, const Rectangle& displayRect,
 }
 
 result
-TextComposite::DrawAbbrev(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment align)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawAbbrev(canvasImpl, newDisplayRect, align);
-}
-
-result
 TextComposite::GetValue(int textIndex, TextComponentInfoValueType type, unsigned int* value) const
 {
        IEnumerator* pEnum = null;
@@ -4559,11 +4416,11 @@ TextComposite::GetValue(int textIndex, TextComponentInfoValueType type, unsigned
 }
 
 bool
-TextComposite::BackwardAnalyze(int startTextIndex, int maxWidth, int* actualLength, int* width, int* height)
+TextComposite::BackwardAnalyze(int startTextIndex, float maxWidth, int* actualLength, float* width, float* height)
 {
-       int remainingWidth = 0;
+       float remainingWidth = 0;
        int length = 0;
-       Dimension textSize;
+       FloatDimension textSize;
 
        *actualLength = 0;
        *width = 0;
@@ -4590,16 +4447,6 @@ TextComposite::BackwardAnalyze(int startTextIndex, int maxWidth, int* actualLeng
        return true;
 }
 
-bool
-TextComposite::BackwardAnalyze(int startTextIndex, float maxWidth, int* actualLength, float* width, float* height)
-{
-       int newMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(*width);
-       int newHeight = _CoordinateSystemUtils::ConvertToInteger(*height);
-
-       return BackwardAnalyze(startTextIndex, newMaxWidth, actualLength, &newWidth, &newHeight);
-}
-
 int
 TextComposite::GetFirstTextIndexAt(int elementIndex) const
 {
@@ -4647,13 +4494,13 @@ TextComposite::GetFirstTextIndexAt(int elementIndex) const
 }
 
 result
-TextComposite::DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment alignment)
+TextComposite::DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment)
 {
        TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(0);
        SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       Dimension textSize;
-       Rectangle adjustedRect;
+       FloatDimension textSize;
+       FloatRectangle adjustedRect;
 
        pTextLine->GetRegion(0, __length, textSize.width, textSize.height);
        adjustedRect.x = displayRect.x;
@@ -4705,22 +4552,14 @@ TextComposite::DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const Rectang
 }
 
 result
-TextComposite::DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawAbbrevInMiddleEllipsis(canvasImpl, newDisplayRect, alignment);
-}
-
-result
-TextComposite::DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment alignment)
+TextComposite::DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment)
 {
        TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(0);
        SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        result r = E_SUCCESS;
-       Dimension textSize;
-       Rectangle adjustedRect;
+       FloatDimension textSize;
+       FloatRectangle adjustedRect;
 
        pTextLine->GetRegion(0, __length, textSize.width, textSize.height);
        adjustedRect.x = displayRect.x;
@@ -4770,15 +4609,7 @@ TextComposite::DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const Rectangle
 }
 
 result
-TextComposite::DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawAbbrevInHeadEllipsis(canvasImpl, newDisplayRect, alignment);
-}
-
-result
-TextComposite::DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength)
+TextComposite::DrawPartial(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength)
 {
        SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
        SysTryReturn(NID_GRP, textLength <= __length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
@@ -4787,20 +4618,17 @@ TextComposite::DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int
        IEnumerator* pEnum = null;
        TextElement* pTextElement = null;
 
-       Dimension textSize;
+       FloatDimension textSize;
        int currentLength = 0;
        int textIndexFromElementOffset = 0;
        int nodeIndex = 0;
        int elementTextOffset = 0;
-       Rectangle adjustedRect = displayRect;
+       FloatRectangle adjustedRect = displayRect;
        int blockStartTextIndex = 0;
        int blockEndTextIndex = 0;
        bool isAlternateLookEnabled = false;
        int textIndex = startTextIndex;
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
-
        pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, nodeIndex, currentLength,
                                                                                         textIndexFromElementOffset);
        SysTryReturn(NID_GRP, pTextElement, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element.");
@@ -4816,15 +4644,15 @@ TextComposite::DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int
 
                if (pTextElement->IsBackGroundDrawingModeEnable())
                {
-                       r = pCanvas->FillRectangle(pTextElement->GetBackgroundColor(), Rectangle(adjustedRect.x, displayRect.y, textSize.width, displayRect.height));
+                       r = canvasImpl.FillRectangle(pTextElement->GetBackgroundColor(), FloatRectangle(adjustedRect.x, displayRect.y, textSize.width, displayRect.height));
                        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
                isAlternateLookEnabled = (pTextElement->GetValue(SET_ALTERNATE_LOOK) > 0) ? true : false;
                if ((__displayBlock) && (isAlternateLookEnabled == false))
                {
-                       Dimension tempTextSize;
-                       int adjustedX = 0;
+                       FloatDimension tempTextSize;
+                       float adjustedX = 0;
 
                        blockStartTextIndex = Math::Max(__workStart, textIndex);
                        blockEndTextIndex = Math::Min(__workStart + __workLength, textIndex + currentLength);
@@ -4841,7 +4669,7 @@ TextComposite::DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int
                                        adjustedX += tempTextSize.width;
                                }
 
-                               Rectangle blockRect = adjustedRect;
+                               FloatRectangle blockRect = adjustedRect;
                                blockRect.x = adjustedX;
                        }
                }
@@ -4879,14 +4707,6 @@ TextComposite::DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int
        return E_SUCCESS;
 }
 
-result
-TextComposite::DrawPartial(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return DrawPartial(canvasImpl, newDisplayRect, startTextIndex, textLength);
-}
-
 void
 TextComposite::SetPartialComposingModeEnabled(bool enable)
 {
@@ -4924,20 +4744,20 @@ TextComposite::IsComposeDone() const
 }
 
 int
-TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
+TextComposite::ComposeInWrapByTextWidth(FloatRectangle& rect)
 {
        SysTryReturn(NID_GRP, __pCurrentTextColumn, false, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
        int lineCount = 0;
        int textIndex = 0;
        int remainingLength = 0;
-       int remainingWidth = 0;
-       int remainingHeight = 0;
-       int offsetY = 0;
+       float remainingWidth = 0;
+       float remainingHeight = 0;
+       float offsetY = 0;
        bool hasPrevLine = false;
        int endType = TEXT_RETBY_NORMAL;
-       Dimension lineTextSize;
+       FloatDimension lineTextSize;
        int lineOffset = 0;
        int lineLength = 0;
        TextLine* pTextLine = null;
@@ -4948,7 +4768,7 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
                endType = pTextLine->GetEndType();
                lineOffset = pTextLine->GetTextOffset();
                lineLength = pTextLine->GetTextLength();
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                pTextLine->GetRegion(0, pTextLine->GetTextLength(), lineTextSize.width, lineTextSize.height);
 
                if (endType != TEXT_RETBY_LINEFEED)
@@ -4979,7 +4799,7 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
                                SysTryReturn(NID_GRP, pTextLine, -1, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -5059,7 +4879,7 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
 
                if (remainingLength > 0)
                {
-                       int nextY = lineBounds.y + lineBounds.height;
+                       float nextY = lineBounds.y + lineBounds.height;
 
                        lineBounds.x = rect.x;
                        lineBounds.y = nextY;
@@ -5071,7 +4891,7 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
                {
                        if (composeInfo.endType == TEXT_RETBY_LINEFEED)
                        {
-                               int nextY = lineBounds.y + lineBounds.height;
+                               float nextY = lineBounds.y + lineBounds.height;
                                lineTextSize.height = lineBounds.height;
 
                                pTextLine = new (std::nothrow)TextLine(this);
@@ -5083,7 +4903,7 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
                                lineBounds.height = lineTextSize.height;
 
                                pTextLine->SetBounds(lineBounds);
-                               pTextLine->SetRegion(0, lineTextSize.height);
+                               pTextLine->SetRegion(0.0f, lineTextSize.height);
                                pTextLine->SetTextLength(0);
                                pTextLine->SetTextOffset(textIndex);
                                pTextLine->SetEndType(TEXT_RETBY_LINEFEED);
@@ -5105,21 +4925,13 @@ TextComposite::ComposeInWrapByTextWidth(Rectangle& rect)
 
        __pTextWidthManager->EndCompose();
 
-       Dimension columnSize;
+       FloatDimension columnSize;
        __pCurrentTextColumn->GetRegion(0, __length, columnSize.width, columnSize.height);
        rect.height = columnSize.height;
 
        return lineCount;
 }
 
-int
-TextComposite::ComposeInWrapByTextWidth(FloatRectangle& rect)
-{
-       Rectangle newRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-
-       return ComposeInWrapByTextWidth(newRect);
-}
-
 result
 TextComposite::GetCutLinkObjectInfo(int cutLinkIndex, int& textStartIndex, int& textLength) const
 {
@@ -5129,18 +4941,24 @@ TextComposite::GetCutLinkObjectInfo(int cutLinkIndex, int& textStartIndex, int&
 int
 TextComposite::GetTotalComposedHeight(void) const
 {
-       return __totalComposedHeight;
+       return _CoordinateSystemUtils::ConvertToInteger(__totalComposedHeight);
 }
 
 float
 TextComposite::GetTotalComposedHeightF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(__totalComposedHeight);
+       return __totalComposedHeight;
 }
 
 int
 TextComposite::GetAnalysedTotalHeight(void) const
 {
+       return _CoordinateSystemUtils::ConvertToInteger(GetAnalysedTotalHeightF());
+}
+
+float
+TextComposite::GetAnalysedTotalHeightF(void) const
+{
        TextLine* pTextLine = null;
        pTextLine = __pCurrentTextColumn->GetTextLine(__lineIndexCompositeDone - 1);
 
@@ -5158,38 +4976,31 @@ TextComposite::GetAnalysedTotalHeight(void) const
                return 0;
        }
 
-       return (int)(GetTotalComposedHeight() * __length / composedLength);
-}
-
-float
-TextComposite::GetAnalysedTotalHeightF(void) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetAnalysedTotalHeight());
+       return (float)(GetTotalComposedHeightF() * __length / composedLength);
 }
 
 void
 TextComposite::SetComposePartialLimitHeight(int limitHeight)
 {
-       __composePartialLimitHeight = limitHeight;
+       __composePartialLimitHeight = _CoordinateSystemUtils::ConvertToFloat(limitHeight);
 }
 
 void
 TextComposite::SetComposePartialLimitHeight(float limitHeight)
 {
-       __composePartialLimitHeight = _CoordinateSystemUtils::ConvertToInteger(limitHeight);
+       __composePartialLimitHeight = limitHeight;
 }
 
 int
 TextComposite::GetComposePartialLimitHeight(void) const
 {
-       return __composePartialLimitHeight;
-
+       return _CoordinateSystemUtils::ConvertToInteger(__composePartialLimitHeight);
 }
 
 float
 TextComposite::GetComposePartialLimitHeightF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(__composePartialLimitHeight);
+       return __composePartialLimitHeight;
 }
 
 TextElementType
@@ -5202,8 +5013,7 @@ TextComposite::GetObjectType(int textIndex) const
        int textIndexFromElementOffset = 0;
        int elementTextOffset = 0;
 
-       pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset
-                                                                                                       , elementIndex, currentLength, textIndexFromElementOffset);
+       pTextElement = GetElementAtTextIndex(textIndex, elementTextOffset, elementIndex, currentLength, textIndexFromElementOffset);
        if (pTextElement == null)
        {
                return TEXT_ELEMENT_TYPE_NONE;
@@ -5272,25 +5082,25 @@ TextComposite::GetWrap(void) const
 void
 TextComposite::SetLineSpace(int gap)
 {
-       __lineSpacing = gap;
+       SetLineSpace(_CoordinateSystemUtils::ConvertToFloat(gap));
 }
 
 void
 TextComposite::SetLineSpace(float gap)
-{
-       SetLineSpace(_CoordinateSystemUtils::ConvertToInteger(gap));
+{      
+       __lineSpacing = gap;
 }
 
 int
 TextComposite::GetLineSpace(void) const
 {
-       return __lineSpacing;
+       return _CoordinateSystemUtils::ConvertToInteger(__lineSpacing);
 }
 
 float
 TextComposite::GetLineSpaceF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(__lineSpacing);
+       return __lineSpacing;
 }
 
 void
@@ -5395,7 +5205,7 @@ TextComposite::GetBlockColor(void) const
 }
 
 Tizen::Base::String
-TextComposite::GetDisplayableText(Rectangle displayRect, TextObjectActionType action)
+TextComposite::GetDisplayableText(FloatRectangle displayRect, TextObjectActionType action)
 {
        int firstDisplayLineIndex = __pCurrentTextColumn->GetFirstDisplayLineIndex();
        TextLine* pTextLine = __pCurrentTextColumn->GetTextLine(firstDisplayLineIndex);
@@ -5448,9 +5258,9 @@ TextComposite::GetDisplayableText(Rectangle displayRect, TextObjectActionType ac
 
                if (action == TEXT_OBJECT_ACTION_TYPE_ABBREV)
                {
-                       Dimension textSize;
-                       Dimension abbrevTextSize;
-                       Rectangle lineBounds = pTextLine->GetBounds();
+                       FloatDimension textSize;
+                       FloatDimension abbrevTextSize;
+                       FloatRectangle lineBounds = pTextLine->GetBoundsF();
 
                        GetRegion(lineOffset, remainingLength, textSize.width, textSize.height);
 
@@ -5482,14 +5292,6 @@ TextComposite::GetDisplayableText(Rectangle displayRect, TextObjectActionType ac
        return text;
 }
 
-Tizen::Base::String
-TextComposite::GetDisplayableText(FloatRectangle displayRect, TextObjectActionType action)
-{
-       Rectangle newDisplayRect = _CoordinateSystemUtils::ConvertToInteger(displayRect);
-
-       return GetDisplayableText(newDisplayRect, action);
-}
-
 void
 TextComposite::SetTextWidthManager(TextWidthManager* pTextWidthManager)
 {
@@ -5512,8 +5314,8 @@ result
 TextComposite::SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int textLength)
 {
        result r = E_SUCCESS;
-       int width = 0;
-       int height = 0;
+       float width = 0;
+       float height = 0;
        int workLength = 0;
        const wchar_t* pSrc = &pText[workStart];
 
@@ -5534,7 +5336,7 @@ TextComposite::SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int text
        return E_SUCCESS;
 }
 
-int
+float
 TextComposite::GetWorkWidth(void)
 {
    return __workWidth;
index c35ce3e..1b32c16 100644 (file)
@@ -60,7 +60,7 @@ public:
                                                                                int& actualLength, int& width, int& height, int& baseline);
 
        virtual int ForwardAnalyzeWithBaseline(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
-                                                                               int& actualLength, float& width, float& height, int& baseline);
+                                                                               int& actualLength, float& width, float& height, float& baseline);
 
        virtual int ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, int maxWidth,
                                                                                int& cursorIndex, TextElementType& type);
@@ -68,24 +68,15 @@ public:
        virtual int ForwardAnalyzeWithFocusedObjectType(int textIndex, int textLength, float maxWidth,
                                                                                int& cursorIndex, TextElementType& type);
 
-       virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
-                       const TextObjectActionType action);
-
        virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
                        const TextObjectActionType action);
 
-       virtual result GetRegion(int textIndex, int textLength, int& width, int& height) const;
-
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual int GetHeight(int textIndex) const;
-
        virtual float GetHeightF(int textIndex) const;
 
        virtual int GetTextLength(void) const;
 
-       virtual int Compose(Rectangle& rect, TextColumn* pTextColumn);
-
        virtual int Compose(FloatRectangle& rect, TextColumn* pTextColumn);
 
        result DrawWithBaseline(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment alignment,
@@ -104,16 +95,10 @@ public:
 
        result RemoveAllElements(bool deallocate = true);
 
-       result DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const Rectangle& displayRect, const TextObjectAlignment align, const TextObjectActionType action);
-
        result DrawLine(_CanvasImpl& canvasImpl, TextLine* pTextLine, const FloatRectangle& displayRect, const TextObjectAlignment align, const TextObjectActionType action);
 
-       result DrawPartial(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength);
-
        result DrawPartial(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength);
 
-       result DrawAbbrev(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment align);
-
        result DrawAbbrev(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment align);
 
        result GetText(TextComposite* pTargetCompsiteText, int textIndex, int textLength);
@@ -284,7 +269,7 @@ public:
 
        result SetWorkWidth(Font* pFont, wchar_t* pText, int workStart, int textLength);
 
-       int GetWorkWidth(void);
+       float GetWorkWidth(void);
 
        void SetTextSweepInfo(TextObjectSweepInfo* pTextSweepInfo);
 
@@ -298,53 +283,29 @@ public:
 
        result GetTextExtentList(TextLine* pTextLine) const;
 
-       Tizen::Base::String GetDisplayableText(Rectangle displayRect, TextObjectActionType action);
-
        Tizen::Base::String GetDisplayableText(FloatRectangle displayRect, TextObjectActionType action);
 
 private:
-       int ComposeInNoneWrap(Rectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null);
-
        int ComposeInNoneWrap(FloatRectangle& rect, NoneWrapComposeInfo* pNoneWrapComposeInfo = null);
 
-       int ComposeInNormalWrap(Rectangle& rect);
-
        int ComposeInNormalWrap(FloatRectangle& rect);
 
-       int ComposeInWordWrap(Rectangle& rect);
-
        int ComposeInWordWrap(FloatRectangle& rect);
 
-       int ComposeInWrap(Rectangle& rect);
-
        int ComposeInWrap(FloatRectangle& rect);
 
-       int ComposeInWrapByTextWidth(Rectangle& rect);
-
        int ComposeInWrapByTextWidth(FloatRectangle& rect);
 
-       int ComposeInNoneWrapMiddleEllipsis(Rectangle& rect);
-
        int ComposeInNoneWrapMiddleEllipsis(FloatRectangle& rect);
 
-       int ComposeInNoneWrapHeadEllipsis(Rectangle& rect);
-
        int ComposeInNoneWrapHeadEllipsis(FloatRectangle& rect);
 
-       int ComposeInPartialMode(Rectangle& rect);
-
        int ComposeInPartialMode(FloatRectangle& rect);
 
-       bool BackwardAnalyze(int startTextIndex, int maxWidth, int* actualLength, int* width, int* height);
-
        bool BackwardAnalyze(int startTextIndex, float maxWidth, int* actualLength, float* width, float* height);
 
-       result DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment alignment);
-
        result DrawAbbrevInMiddleEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignment);
 
-       result DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const Rectangle& displayRect, const TextObjectAlignment alignmen);
-
        result DrawAbbrevInHeadEllipsis(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, const TextObjectAlignment alignmen);
 
        result SetValueToAllTextElements(TextComponentInfoValueType type, unsigned int value);
@@ -355,15 +316,9 @@ private:
 
        int GetFirstTextIndexAt(int elementIndex) const;
 
-       result DrawBlock(_CanvasImpl& canvasImpl, const Rectangle& displayRect, int startTextIndex, int textLength,
-                       const TextObjectAlignment align, const TextObjectActionType action);
-
        result DrawBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
                        const TextObjectAlignment align, const TextObjectActionType action);
 
-       result DrawBackgroundBlock(_CanvasImpl& canvasImpl, const Rectangle& displayRect, int startTextIndex, int textLength,
-                       const TextObjectAlignment align, const TextObjectActionType action);
-
        result DrawBackgroundBlock(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect, int startTextIndex, int textLength,
                        const TextObjectAlignment align, const TextObjectActionType action);
 
@@ -376,29 +331,29 @@ private:
        bool __displayBlock;
        int __workStart;
        int __workLength;
-       int __workWidth;
+       float __workWidth;
        int __cursorIndex;
        bool __ignoreRearBlank;
        bool __ignoreFrontBlank;
        TextObjectSpaceHideType __rearSpaceHideMode;
        TextObjectSpaceHideType __frontSpaceHideMode;
-       int __lineSpacing;
+       float __lineSpacing;
        TextObjectAlignment __elementVertialAlignment;
        TextColumn* __pCurrentTextColumn;
        TextSimple* __pAbbrevTextElement;
        bool __partialComposingModeEnabled;
        int __lineIndexCompositeDone;
-       int __totalComposedHeight;
-       int __composePartialLimitHeight;
+       float __totalComposedHeight;
+       float __composePartialLimitHeight;
        TextCutLinkListInfo* __pCutLinkListInfo;
        TextObjectEllipsisType __TextObjectEllipsisType;
        bool __drawAbbrevText;
        bool __drawTextEllipsis;
        int __middleEllipsisTextLengthInHead;
-       int __middleEllipsisHeadWidth;
-       int __middleEllipsisWidth;
+       float __middleEllipsisHeadWidth;
+       float __middleEllipsisWidth;
        int __middleEllipsisTextLengthInTail;
-       int __headEllipsisWidth;
+       float __headEllipsisWidth;
        int __headEllipsisTextLength;
        TextWidthManager* __pTextWidthManager;
        bool __widthManagerEnabled;
index f3d4732..efbb73d 100644 (file)
@@ -116,18 +116,6 @@ TextElement::GetRegion(int textIndex, int textLength, float& width, float& heigh
        return E_SYSTEM;
 }
 
-result
-TextElement::GetBlockRegion(int textIndex, int textLength, int& width, int& height) const
-{
-       return E_SYSTEM;
-}
-
-result
-TextElement::GetBlockRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       return E_SYSTEM;
-}
-
 int
 TextElement::GetHeight(void) const
 {
@@ -212,6 +200,13 @@ TextElement::GetBaseline(void) const
 {
        return -1;
 }
+
+float
+TextElement::GetBaselineF(void) const
+{
+       return -1;
+}
+
 void
 TextElement::SetForegroundColor(const Color& color)
 {
old mode 100755 (executable)
new mode 100644 (file)
index 2276f68..491c7e3
@@ -28,8 +28,6 @@
 #include "FGrp_TextCommon.h"
 #include "FGrp_TextTextElement.h"
 #include "FGrp_TextTextImage.h"
-#include "../FGrp_BitmapUtil.h"
-#include "../FGrp_Canvas.h"
 #include "FGrp_CoordinateSystemUtils.h"
 
 namespace Tizen { namespace Graphics
@@ -38,7 +36,7 @@ namespace Tizen { namespace Graphics
 namespace _Text
 {
 
-TextImage::TextImage(Bitmap& bitmap, TextElementSourceType sourceType, Rectangle* pRect, TextObjectAlignment align)
+TextImage::TextImage(Bitmap& bitmap, TextElementSourceType sourceType, TextObjectAlignment align)
        : TextElement()
 {
        result r = E_SUCCESS;
@@ -67,17 +65,11 @@ TextImage::TextImage(Bitmap& bitmap, TextElementSourceType sourceType, Rectangle
                __pBitmap = &bitmap;
        }
 
-       if (pRect == null)
-       {
-               __rect.x = 0;
-               __rect.y = 0;
-               __rect.width = __pBitmap->GetWidth();
-               __rect.height = __pBitmap->GetHeight();
-       }
-       else
-       {
-               __rect = *pRect;
-       }
+       __rect.x = 0;
+       __rect.y = 0;
+       __rect.width = __pBitmap->GetWidthF();
+       __rect.height = __pBitmap->GetHeightF();
+
        return;
 
 CATCH:
@@ -101,15 +93,13 @@ TextImage::~TextImage(void)
 }
 
 int
-TextImage::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
-                                                  int& width, int& height)
+TextImage::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
+                                       int& actualLength, float& width, float& height)
 {
-       SysTryReturn(NID_GRP
-                       , 0 <= startTextIndex && startTextIndex < _length
+       SysTryReturn(NID_GRP, 0 <= startTextIndex && startTextIndex < _length
                        , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       SysTryReturn(NID_GRP
-                       , textLength <= _length
+       SysTryReturn(NID_GRP, textLength <= _length
                        , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        actualLength = 0;
@@ -135,28 +125,13 @@ TextImage::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Text
        return TEXT_RETBY_NORMAL;
 }
 
-int
-TextImage::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
-                                       int& actualLength, float& width, float& height)
-{
-       int iMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       int r = ForwardAnalyze(startTextIndex, textLength, iMaxWidth, wrap, actualLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
 result
-TextImage::GetRegion(int textIndex, int textLength, int& width, int& height) const
+TextImage::GetRegion(int textIndex, int textLength, float& width, float& height) const
 {
-       SysTryReturn(NID_GRP
-                       , 0 <= textIndex && textIndex < _length
+       SysTryReturn(NID_GRP, 0 <= textIndex && textIndex < _length
                        , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       SysTryReturn(NID_GRP
-                       , textLength <= _length
+       SysTryReturn(NID_GRP, textLength <= _length
                        , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        if (textLength == 0)
@@ -172,52 +147,23 @@ TextImage::GetRegion(int textIndex, int textLength, int& width, int& height) con
        return E_SUCCESS;
 }
 
-result
-TextImage::GetRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       result r = GetRegion(textIndex, textLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
-result
-TextImage::GetBlockRegion(int textIndex, int textLength, int& width, int& height) const
-{
-       return GetRegion(textIndex, textLength, width, height);
-}
-
-result
-TextImage::GetBlockRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       result r = GetBlockRegion(textIndex, textLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
 int
 TextImage::GetHeight(void) const
 {
-       return __rect.height;
+       return _CoordinateSystemUtils::ConvertToInteger(GetHeightF());
 }
 
 float
 TextImage::GetHeightF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetHeight());
+       return __rect.height;
 }
 
 result
-TextImage::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align, const TextObjectActionType action)
+TextImage::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
+                       const TextObjectAlignment align, const TextObjectActionType action)
 {
-       SysTryReturn(NID_GRP
-               , __pBitmap
-               , E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
+       SysTryReturn(NID_GRP, __pBitmap, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
        result r = E_SUCCESS;
        if (textLength == 0)
@@ -225,13 +171,7 @@ TextImage::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIn
                return E_SUCCESS;
        }
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP
-                       , pCanvas
-                       , E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
-
-
-       Rectangle bitmapRect = displayRect;
+       FloatRectangle bitmapRect = displayRect;
 
        if (bitmapRect.width <= 0)
        {
@@ -283,35 +223,18 @@ TextImage::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIn
                break;
        }
 
-       r = pCanvas->DrawBitmap(bitmapRect, *_GetBitmapEx(*_BitmapImpl::GetInstance(*__pBitmap)));
-       SysTryReturn(NID_GRP
-               , r == E_SUCCESS
-               , r, r, "[%s] Propagating.", GetErrorMessage(r));
+       r = canvasImpl.DrawBitmap(bitmapRect, *_BitmapImpl::GetInstance(*__pBitmap));
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        if (_hasFocus)
        {
-               r = pCanvas->DrawRectangle(_Util::Convert<Rectangle, _Util::Rectangle<double> >(bitmapRect));
-               SysTryReturn(NID_GRP
-                       , r == E_SUCCESS
-                       , r, r, "[%s] Propagating.", GetErrorMessage(r));
+               r = canvasImpl.DrawRectangle(bitmapRect);
+               SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
        return E_SUCCESS;
 }
 
-result
-TextImage::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
-                       const TextObjectAlignment align, const TextObjectActionType action)
-{
-       Rectangle iDisplayRect;
-       iDisplayRect.x = _CoordinateSystemUtils::ConvertToInteger(displayRect.x);
-       iDisplayRect.y = _CoordinateSystemUtils::ConvertToInteger(displayRect.y);
-       iDisplayRect.width = _CoordinateSystemUtils::ConvertToInteger(displayRect.width);
-       iDisplayRect.height = _CoordinateSystemUtils::ConvertToInteger(displayRect.height);
-
-       return Draw(canvasImpl, iDisplayRect, startTextIndex, textLength, align, action);
-}
-
 TextElement*
 TextImage::CloneN(TextComponentInfoValueType type, unsigned int value)
 {
@@ -319,7 +242,7 @@ TextImage::CloneN(TextComponentInfoValueType type, unsigned int value)
 
        TextImage* pImageText = null;
 
-       pImageText = new (std::nothrow) TextImage(*__pBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, &__rect, __align);
+       pImageText = new (std::nothrow) TextImage(*__pBitmap, TEXT_ELEMENT_SOURCE_TYPE_EXTERNAL, __align);
        SysTryReturn(NID_GRP
                , pImageText
                , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
@@ -346,12 +269,8 @@ TextImage::CopyN(int startTextIndex, int textLength)
                textLength = 1;
        }
 
-       TextImage* pImageText = null;
-
-       pImageText = new (std::nothrow) TextImage(*__pBitmap, _sourceType, &__rect, __align);
-       SysTryReturn(NID_GRP
-               , pImageText
-               , null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
+       TextImage* pImageText = new (std::nothrow) TextImage(*__pBitmap, _sourceType, __align);
+       SysTryReturn(NID_GRP, pImageText, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
 
        return pImageText;
 }
@@ -418,18 +337,17 @@ TextImage::SetValue(TextComponentInfoValueType type, unsigned int value)
 result
 TextImage::SetBounds(const Rectangle& rect)
 {
-       __rect = rect;
-       __rect.x = 0;
-       __rect.y = 0;
-
-       return E_SUCCESS;
+       return SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
 }
 
 result
 TextImage::SetBounds(const FloatRectangle& rect)
 {
-       const Rectangle iRect = _CoordinateSystemUtils::ConvertToInteger(rect);
-       return SetBounds(iRect);
+       __rect = rect;
+       __rect.x = 0;
+       __rect.y = 0;
+
+       return E_SUCCESS;
 }
 
 result
@@ -447,13 +365,13 @@ TextImage::SetAlignment(TextObjectAlignment alignment)
 Rectangle
 TextImage::GetBounds(void) const
 {
-       return __rect;
+       return _CoordinateSystemUtils::ConvertToInteger(GetBoundsF());
 }
 
 FloatRectangle
 TextImage::GetBoundsF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetBounds());
+       return __rect;
 }
 
 TextObjectAlignment
@@ -480,4 +398,10 @@ TextImage::GetBaseline(void) const
        return 0;
 }
 
+float
+TextImage::GetBaselineF(void) const
+{
+       return 0;
+}
+
 }}} // Tizen::Graphics::_Text
index 9294011..d7e9fec 100644 (file)
@@ -91,10 +91,23 @@ TextLine::~TextLine(void)
 result
 TextLine::GetRegion(int textIndex, int textLength, int& width, int& height) const
 {
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF = _CoordinateSystemUtils::ConvertToFloat(height);
+
+       result r = GetRegion(textIndex, textLength, widthF, heightF);
+
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+
+       return r;
+}
+
+result
+TextLine::GetRegion(int textIndex, int textLength, float& width, float& height) const
+{
        if (textIndex != 0 || textLength != __textLength)
        {
                return __pCompositeText->GetRegion(textIndex + __textOffset, textIndex + textLength + __textOffset, width, height);
-
        }
 
        width = __width;
@@ -103,19 +116,8 @@ TextLine::GetRegion(int textIndex, int textLength, int& width, int& height) cons
        return E_SUCCESS;
 }
 
-result
-TextLine::GetRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       result r = GetRegion(textIndex, textLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
-int
-TextLine::GetHeight(int textIndex) const
+float
+TextLine::GetHeightF(int textIndex) const
 {
        if (textIndex == -1)
        {
@@ -123,7 +125,7 @@ TextLine::GetHeight(int textIndex) const
        }
        else if (textIndex >= 0 && textIndex < __textLength)
        {
-               return __pCompositeText->GetHeight(textIndex + __textOffset);
+               return __pCompositeText->GetHeightF(textIndex + __textOffset);
        }
        else
        {
@@ -131,68 +133,26 @@ TextLine::GetHeight(int textIndex) const
        }
 }
 
-float
-TextLine::GetHeightF(int textIndex) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetHeight(textIndex));
-}
-
-result
-TextLine::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength, const TextObjectAlignment align,
-                               const TextObjectActionType action)
-{
-       SysTryReturn(NID_GRP
-               , startTextIndex == 0  && textLength == __textLength && __pCompositeText != null
-               , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
-
-       return __pCompositeText->DrawLine(canvasImpl, this, displayRect, align, action);
-}
-
 result
 TextLine::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
                        const TextObjectAlignment align, const TextObjectActionType action)
 {
-       SysTryReturn(NID_GRP
-               , startTextIndex == 0  && textLength == __textLength && __pCompositeText != null
+       SysTryReturn(NID_GRP, startTextIndex == 0  && textLength == __textLength && __pCompositeText != null
                , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       Rectangle iDisplayRect;
-       iDisplayRect.x = _CoordinateSystemUtils::ConvertToInteger(displayRect.x);
-       iDisplayRect.y = _CoordinateSystemUtils::ConvertToInteger(displayRect.y);
-       iDisplayRect.width = _CoordinateSystemUtils::ConvertToInteger(displayRect.width);
-       iDisplayRect.height = _CoordinateSystemUtils::ConvertToInteger(displayRect.height);
-
-       return Draw(canvasImpl, iDisplayRect, startTextIndex, textLength, align, action);
+       return __pCompositeText->DrawLine(canvasImpl, this, displayRect, align, action);
 }
 
 result
-TextLine::DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, Rectangle& displayRect)
+TextLine::DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, FloatRectangle& displayRect)
 {
-       SysTryReturn(NID_GRP
-               , __pCompositeText != null
-               , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, __pCompositeText != null, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        int textIndexAtLine = GetTextOffset() + startTextIndex;
 
        return __pCompositeText->DrawPartial(canvasImpl, displayRect, textIndexAtLine, textLength);
 }
 
-result
-TextLine::DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, FloatRectangle& displayRect)
-{
-       SysTryReturn(NID_GRP
-               , __pCompositeText != null
-               , E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
-
-       Rectangle iDisplayRect;
-       iDisplayRect.x = _CoordinateSystemUtils::ConvertToInteger(displayRect.x);
-       iDisplayRect.y = _CoordinateSystemUtils::ConvertToInteger(displayRect.y);
-       iDisplayRect.width = _CoordinateSystemUtils::ConvertToInteger(displayRect.width);
-       iDisplayRect.height = _CoordinateSystemUtils::ConvertToInteger(displayRect.height);
-
-       return DrawPartial(canvasImpl, startTextIndex, textLength, iDisplayRect);
-}
-
 TextLine*
 TextLine::CopyN(void)
 {
@@ -298,35 +258,40 @@ TextLine::GetEndType(void) const
 void
 TextLine::SetRegion(int width, int height)
 {
-       __width = width;
-       __height = height;
+       SetRegion(_CoordinateSystemUtils::ConvertToFloat(width), _CoordinateSystemUtils::ConvertToFloat(height));
        return;
 }
 
 void
 TextLine::SetRegion(float width, float height)
 {
-       SetRegion(_CoordinateSystemUtils::ConvertToInteger(width), _CoordinateSystemUtils::ConvertToInteger(height));
+       __width = width;
+       __height = height;
        return;
 }
 
 void
 TextLine::SetBaseline(int baseline)
 {
+       __baseline = _CoordinateSystemUtils::ConvertToFloat(baseline);
+}
+
+void
+TextLine::SetBaseline(float baseline)
+{
        __baseline = baseline;
 }
 
 int
 TextLine::GetBaseline(void) const
 {
-       return __baseline;
+       return _CoordinateSystemUtils::ConvertToInteger(__baseline);
 }
 
-int
-TextLine::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap,
-                                                                       int& actualLength, int& width, int& height)
+float
+TextLine::GetBaselineF(void) const
 {
-       return -1;
+       return __baseline;
 }
 
 int
@@ -373,24 +338,24 @@ TextLine::GetSweepComposeInfo(void) const
 }
 
 void
-TextLine::SetSweepIn(int sweepIn)
+TextLine::SetSweepIn(float sweepIn)
 {
    __sweepIn = sweepIn;
 }
 
-int
+float
 TextLine::GetSweepIn(void) const
 {
    return __sweepIn;
 }
 
 void
-TextLine::SetSweepOut(int sweepOut)
+TextLine::SetSweepOut(float sweepOut)
 {
    __sweepOut = sweepOut;
 }
 
-int
+float
 TextLine::GetSweepOut(void) const
 {
    return __sweepOut;
@@ -445,7 +410,7 @@ TextLine::GetKeyInputLength(void)
 }
 
 result
-TextLine::SetTextExtentList(LinkedListT<_Util::Pair<int, int>* >* pList)
+TextLine::SetTextExtentList(Collection::ArrayListT<_FloatPair>* pList)
 {
        if (__pExtentList)
        {
@@ -458,7 +423,7 @@ TextLine::SetTextExtentList(LinkedListT<_Util::Pair<int, int>* >* pList)
        return E_SUCCESS;
 }
 
-LinkedListT<_Util::Pair<int, int>* >*
+Tizen::Base::Collection::ArrayListT<_FloatPair>*
 TextLine::GetTextExtentList(void) const
 {
        return __pExtentList;
@@ -467,44 +432,40 @@ TextLine::GetTextExtentList(void) const
 int
 TextLine::GetTextIndexFromPosition(int pcX, bool cursorMode)
 {
-       SysTryReturn(NID_GRP, pcX >= 0
-                       , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
-
-       SysTryReturn(NID_GRP, __pExtentList
-               , -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
-
-       _Util::Pair<int, int>* pPair = null;
-       IEnumeratorT<_Util::Pair<int, int>* >* pEnum = __pExtentList->GetEnumeratorN();
-       pEnum->MoveNext();
+       SysTryReturn(NID_GRP, pcX >= 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, __pExtentList, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
+       int index = 0;
        int textIndex = -1;
+       _FloatPair currentGap;
+       IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN();
 
-       for (int i = 0; i < __textLength; i++, pEnum->MoveNext())
+       while (pEnum->MoveNext() == E_SUCCESS)
        {
-               pEnum->GetCurrent(pPair);
-               if (pPair)
+               pEnum->GetCurrent(currentGap);
+
+               if (currentGap.first <= pcX && pcX < currentGap.second)
                {
-                       if (pPair->first <= pcX && pcX < pPair->second)
+                       textIndex = index + __textOffset;
+
+                       FriBidiChar text[1] = { __pCompositeText->GetCharacter(textIndex) };
+                       FriBidiCharType type[1] = { 0 };
+                       fribidi_get_bidi_types(text, 1, type);
+                       bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+
+                       if (isRtl == true)
+                       {
+                               textIndex = (pcX - currentGap.first < currentGap.second - pcX) ? index + __textOffset + 1 : index + __textOffset;
+                       }
+                       else
                        {
-                               textIndex = i + __textOffset;
-
-                               FriBidiChar text[1] = { __pCompositeText->GetCharacter(textIndex) };
-                               FriBidiCharType type[1] = { 0 };
-                               fribidi_get_bidi_types(text, 1, type);
-                               bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
-
-                               if (isRtl == true)
-                               {
-                                       textIndex = (pcX - pPair->first < pPair->second - pcX) ? i + __textOffset + 1 : i + __textOffset;
-                               }
-                               else
-                               {
-                                       textIndex = (pcX - pPair->first < pPair->second - pcX) ? i + __textOffset : i + __textOffset + 1;
-                               }
-
-                               break;
+                               textIndex = (pcX - currentGap.first < currentGap.second - pcX) ? index + __textOffset : index + __textOffset + 1;
                        }
+
+                       break;
                }
+
+               index++;
        }
 
        if (textIndex < 0)
@@ -526,15 +487,21 @@ TextLine::GetTextIndexFromPosition(float pcX, bool cursorMode)
 Rectangle
 TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const
 {
+       return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF(textIndexFromLineOffset, textLength));
+}
+
+FloatRectangle
+TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const
+{
        SysTryReturn(NID_GRP, 0 <= textIndexFromLineOffset && textLength <= __textLength
-               , Rectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+               , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        SysTryReturn(NID_GRP, __pExtentList
-               , Rectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+               , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       _Util::Pair<int, int>* pPair = null;
-       Rectangle extent;
-       IEnumeratorT<_Util::Pair<int, int>* >* pEnum = __pExtentList->GetEnumeratorN();
+       FloatRectangle extent;
+       _FloatPair currentGap;
+       IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN();
 
        if (textIndexFromLineOffset == __textLength)
        {
@@ -543,47 +510,41 @@ TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const
                        pEnum->MoveNext();
                }
 
-               pEnum->GetCurrent(pPair);
-               if (pPair)
-               {
-                       FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) };
-                       FriBidiCharType type[1] = { 0 };
-                       fribidi_get_bidi_types(text, 1, type);
-                       bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+               pEnum->GetCurrent(currentGap);
 
-                       extent.x = (isRtl == true) ? pPair->first : pPair->second;
-                       extent.width = 0;
-               }
+               FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) };
+               FriBidiCharType type[1] = { 0 };
+               fribidi_get_bidi_types(text, 1, type);
+               bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+
+               extent.x = (isRtl == true) ? currentGap.first : currentGap.second;
+               extent.width = 0;
        }
        else if (textIndexFromLineOffset == 0)
        {
                pEnum->MoveNext();
-               pEnum->GetCurrent(pPair);
-               if (pPair)
-               {
-                       FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) };
-                       FriBidiCharType type[1] = { 0 };
-                       fribidi_get_bidi_types(text, 1, type);
-                       bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+               pEnum->GetCurrent(currentGap);
 
-                       extent.x = (isRtl == true) ? pPair->second : pPair->first;
-                       extent.width = 0;
-               }
+               FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) };
+               FriBidiCharType type[1] = { 0 };
+               fribidi_get_bidi_types(text, 1, type);
+               bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+
+               extent.x = (isRtl == true) ? currentGap.second : currentGap.first;
+               extent.width = 0;
 
                for (int i = 0; i < textLength; i++)
                {
-                       pEnum->GetCurrent(pPair);
-                       if (pPair)
-                       {
-                               extent.width += pPair->second - pPair->first;
-                       }
+                       pEnum->GetCurrent(currentGap);
+                       extent.width += currentGap.second - currentGap.first;
+
                        pEnum->MoveNext();
                }
        }
        else
        {
-               int prevLeft = 0;
-               int prevRight = 0;
+               float prevLeft = 0;
+               float prevRight = 0;
                FriBidiChar text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1),  __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)};
                FriBidiCharType type[2] = { 0, 0 };
                fribidi_get_bidi_types(text, 2, type);
@@ -594,45 +555,36 @@ TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const
                        pEnum->MoveNext();
                }
 
-               pEnum->GetCurrent(pPair);
-               if (pPair)
-               {
-                       prevLeft = pPair->first;
-                       prevRight = pPair->second;
-               }
+               pEnum->GetCurrent(currentGap);
+               prevLeft = currentGap.first;
+               prevRight = currentGap.second;
 
                pEnum->MoveNext();
-               pEnum->GetCurrent(pPair);
+               pEnum->GetCurrent(currentGap);
 
-               if (pPair)
+               if (isRtl[0] && isRtl[1]) // R + R
                {
-                       if (isRtl[0] && isRtl[1]) // R + R
-                       {
-                               extent.x = prevLeft;
-                       }
-                       else if (isRtl[0] && !isRtl[1]) // R + L
-                       {
-                               extent.x = prevLeft;
-                       }
-                       else if (!isRtl[0] && !isRtl[1]) // L + L
-                       {
-                               extent.x = pPair->first;
-                       }
-                       else if (!isRtl[0] && isRtl[1]) // L + R
-                       {
-                               extent.x = prevRight;
-                       }
+                       extent.x = prevLeft;
+               }
+               else if (isRtl[0] && !isRtl[1]) // R + L
+               {
+                       extent.x = prevLeft;
+               }
+               else if (!isRtl[0] && !isRtl[1]) // L + L
+               {
+                       extent.x = currentGap.first;
+               }
+               else if (!isRtl[0] && isRtl[1]) // L + R
+               {
+                       extent.x = prevRight;
                }
 
                extent.width = 0;
 
                for (int i = 0; i < textLength; i++)
                {
-                       pEnum->GetCurrent(pPair);
-                       if (pPair)
-                       {
-                               extent.width += pPair->second - pPair->first;
-                       }
+                       pEnum->GetCurrent(currentGap);
+                       extent.width += currentGap.second - currentGap.first;
 
                        pEnum->MoveNext();
                }
@@ -643,24 +595,24 @@ TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const
        return extent;
 }
 
-FloatRectangle
-TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const
+Rectangle
+TextLine::GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetTextExtent(textIndexFromLineOffset, textLength));
+       return _CoordinateSystemUtils::ConvertToInteger(GetBlockTextExtentF(textIndexFromLineOffset, textLength));
 }
 
-Rectangle
-TextLine::GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const
+FloatRectangle
+TextLine::GetBlockTextExtentF(int textIndexFromLineOffset, int textLength) const
 {
        SysTryReturn(NID_GRP, 0 <= textIndexFromLineOffset && textLength <= __textLength
-               , Rectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+               , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        SysTryReturn(NID_GRP, __pExtentList
-               , Rectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+               , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
-       _Util::Pair<int, int>* pPair = null;
-       Rectangle extent;
-       IEnumeratorT<_Util::Pair<int, int>* >* pEnum = __pExtentList->GetEnumeratorN();
+       FloatRectangle extent;
+       _FloatPair currentGap;
+       IEnumeratorT<_FloatPair >* pEnum = __pExtentList->GetEnumeratorN();
 
        if (textIndexFromLineOffset == __textLength)
        {
@@ -669,108 +621,91 @@ TextLine::GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const
                        pEnum->MoveNext();
                }
 
-               pEnum->GetCurrent(pPair);
-               if (pPair)
+               pEnum->GetCurrent(currentGap);
+               if (__endType == TEXT_RETBY_LINEFEED)
                {
-                       if (__endType == TEXT_RETBY_LINEFEED)
-                       {
-                               extent.x = pPair->first + 10;
-                               extent.width = 0;
-                       }
-                       else
-                       {
-                               FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) };
-                               FriBidiCharType type[1] = { 0 };
-                               fribidi_get_bidi_types(text, 1, type);
-                               bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
-
-                               extent.x = (isRtl == true) ? pPair->first : pPair->second;
-                               extent.width = 0;
-                       }
+                       extent.x = currentGap.first + 10;
+                       extent.width = 0;
                }
-       }
-       else if (textIndexFromLineOffset == 0)
-       {
-               pEnum->MoveNext();
-               pEnum->GetCurrent(pPair);
-               if (pPair)
+               else
                {
-                       FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) };
+                       FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1) };
                        FriBidiCharType type[1] = { 0 };
                        fribidi_get_bidi_types(text, 1, type);
                        bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
 
-                       extent.x = (isRtl == true) ? pPair->second : pPair->first;
+                       extent.x = (isRtl == true) ? currentGap.first : currentGap.second;
                        extent.width = 0;
                }
+       }
+       else if (textIndexFromLineOffset == 0)
+       {
+               pEnum->MoveNext();
+               pEnum->GetCurrent(currentGap);
+
+               FriBidiChar text[1] = { __pCompositeText->GetCharacter(__textOffset) };
+               FriBidiCharType type[1] = { 0 };
+               fribidi_get_bidi_types(text, 1, type);
+               bool isRtl = (type[0] & FRIBIDI_MASK_RTL) > 0;
+
+               extent.x = (isRtl == true) ? currentGap.second : currentGap.first;
+               extent.width = 0;
 
                for (int i = 0; i < textLength; i++)
                {
-                       pEnum->GetCurrent(pPair);
-                       if (pPair)
-                       {
-                               extent.width += pPair->second - pPair->first;
-                       }
+                       pEnum->GetCurrent(currentGap);
+                       extent.width += currentGap.second - currentGap.first;
+
                        pEnum->MoveNext();
                }
        }
        else
        {
+               float prevLeft = 0;
+               float prevRight = 0;
+               FriBidiChar text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1),  __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)};
+               FriBidiCharType type[2] = { 0, 0 };
+               fribidi_get_bidi_types(text, 2, type);
+               bool isRtl[2] = {(type[0] & FRIBIDI_MASK_RTL) > 0, (type[1] & FRIBIDI_MASK_RTL) > 0};
+
+               for (int i = 0; i < textIndexFromLineOffset; i++)
                {
-                       int prevLeft = 0;
-                       int prevRight = 0;
-                       FriBidiChar text[2] = { __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset - 1),  __pCompositeText->GetCharacter(__textOffset + textIndexFromLineOffset)};
-                       FriBidiCharType type[2] = { 0, 0 };
-                       fribidi_get_bidi_types(text, 2, type);
-                       bool isRtl[2] = {(type[0] & FRIBIDI_MASK_RTL) > 0, (type[1] & FRIBIDI_MASK_RTL) > 0};
-
-                       for (int i = 0; i < textIndexFromLineOffset; i++)
-                       {
-                               pEnum->MoveNext();
-                       }
+                       pEnum->MoveNext();
+               }
 
-                       pEnum->GetCurrent(pPair);
-                       if (pPair)
-                       {
-                               prevLeft = pPair->first;
-                               prevRight = pPair->second;
-                       }
+               pEnum->GetCurrent(currentGap);
 
-                       pEnum->MoveNext();
-                       pEnum->GetCurrent(pPair);
+               prevLeft = currentGap.first;
+               prevRight = currentGap.second;
 
-                       if (pPair)
-                       {
-                               if (isRtl[0] && isRtl[1]) // R + R
-                               {
-                                       extent.x = prevLeft;
-                               }
-                               else if (isRtl[0] && !isRtl[1]) // R + L
-                               {
-                                       extent.x = pPair->first;
-                               }
-                               else if (!isRtl[0] && !isRtl[1]) // L + L
-                               {
-                                       extent.x = pPair->first;
-                               }
-                               else if (!isRtl[0] && isRtl[1]) // L + R
-                               {
-                                       extent.x = prevRight;
-                               }
-                       }
+               pEnum->MoveNext();
+               pEnum->GetCurrent(currentGap);
 
-                       extent.width = 0;
+               if (isRtl[0] && isRtl[1]) // R + R
+               {
+                       extent.x = prevLeft;
+               }
+               else if (isRtl[0] && !isRtl[1]) // R + L
+               {
+                       extent.x = currentGap.first;
+               }
+               else if (!isRtl[0] && !isRtl[1]) // L + L
+               {
+                       extent.x = currentGap.first;
+               }
+               else if (!isRtl[0] && isRtl[1]) // L + R
+               {
+                       extent.x = prevRight;
+               }
 
-                       for (int i = 0; i < textLength; i++)
-                       {
-                               pEnum->GetCurrent(pPair);
-                               if (pPair)
-                               {
-                                       extent.width += pPair->second - pPair->first;
-                               }
+               extent.width = 0;
 
-                               pEnum->MoveNext();
-                       }
+               for (int i = 0; i < textLength; i++)
+               {
+                       pEnum->GetCurrent(currentGap);
+                       extent.width += currentGap.second - currentGap.first;
+
+                       pEnum->MoveNext();
                }
        }
 
@@ -779,10 +714,4 @@ TextLine::GetBlockTextExtent(int textIndexFromLineOffset, int textLength) const
        return extent;
 }
 
-FloatRectangle
-TextLine::GetBlockTextExtentF(int textIndexFromLineOffset, int textLength) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetBlockTextExtent(textIndexFromLineOffset, textLength));
-}
-
 }}} // Tizen::Graphics::_Text
index de696c7..a3bff75 100644 (file)
@@ -28,7 +28,7 @@
 #include <FBaseColLinkedListT.h>
 
 #include "FGrp_TextCommon.h"
-#include "../FGrp_Font.h"
+#include "FGrp_FontImpl.h"
 
 namespace Tizen { namespace Graphics
 {
@@ -48,19 +48,11 @@ public:
        virtual ~TextLine(void);
 
 public:
-       virtual result Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength,
-                       const TextObjectAlignment align, const TextObjectActionType action);
-
        virtual result Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
                        const TextObjectAlignment align, const TextObjectActionType action);
 
-       virtual result DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, Rectangle& displayRect);
-
        virtual result DrawPartial(_CanvasImpl& canvasImpl, int startTextIndex, int textLength, FloatRectangle& displayRect);
 
-       virtual int ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap,
-                                                                               int& actualLength, int& width, int& height);
-
        virtual int ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
                                                                                int& actualLength, float& width, float& height);
 
@@ -68,8 +60,6 @@ public:
 
        virtual result GetRegion(int textIndex, int textLength, float& width, float& height) const;
 
-       virtual int GetHeight(int textIndex) const;
-
        virtual float GetHeightF(int textIndex) const;
 
        virtual int GetTextLength(void) const;
@@ -104,21 +94,25 @@ public:
 
        void SetBaseline(int baseline);
 
+       void SetBaseline(float baseline);
+
        int GetBaseline(void) const;
 
+       float GetBaselineF(void) const;
+
        result ResetSweepInfo(void);
 
        void SetSweepComposeInfo(TextObjectSweepComposeLineInfo& textSweepComposeLineInfo);
 
        TextObjectSweepComposeLineInfo GetSweepComposeInfo(void) const;
 
-       void SetSweepIn(int sweepIn);
+       void SetSweepIn(float sweepIn);
 
-       int GetSweepIn(void) const;
+       float GetSweepIn(void) const;
 
-       void SetSweepOut(int sweepOut);
+       void SetSweepOut(float sweepOut);
 
-       int GetSweepOut(void) const;
+       float GetSweepOut(void) const;
 
        void SetKeyInputResult(int keyInputResult);
 
@@ -136,9 +130,9 @@ public:
 
        int GetKeyInputLength(void);
 
-       result SetTextExtentList(Tizen::Base::Collection::LinkedListT<_Util::Pair<int, int>* >* pList);
+       result SetTextExtentList(Tizen::Base::Collection::ArrayListT<_FloatPair>* pList);
 
-       Tizen::Base::Collection::LinkedListT<_Util::Pair<int, int>* >* GetTextExtentList(void) const;
+       Tizen::Base::Collection::ArrayListT<_FloatPair>* GetTextExtentList(void) const;
 
        int GetTextIndexFromPosition(int pcX, bool cursorMode = true);
 
@@ -160,17 +154,17 @@ private:
        int __index;
        int __textOffset;
        int __textLength;
-       int __width;
-       int __height;
-       int __baseline;
+       float __width;
+       float __height;
+       float __baseline;
        TextObjectSweepComposeLineInfo __sweepComposeLineInfo;
-       int __sweepIn;
-       int __sweepOut;
+       float __sweepIn;
+       float __sweepOut;
        int __sweepType;
        bool __isKeyInputChanged;
        int __keyInputTextIndex;
        int __keyInputTextLength;
-       Tizen::Base::Collection::LinkedListT<_Util::Pair<int, int>* >* __pExtentList;
+       Tizen::Base::Collection::ArrayListT<_FloatPair>* __pExtentList;
 
 private:
        TextLine(const TextLine& other); // NOT IMPLMENTED
index 31e13e8..5d33ab1 100644 (file)
  */
 
 #include <new>
-#include <math.h>
 #include <FGrpBitmap.h>
 #include <FBaseSysLog.h>
 #include "FGrp_FontImpl.h"
-#include "../FGrp_Font.h"
-#include "../FGrp_Canvas.h"
+#include "FGrp_CanvasImpl.h"
 #include "../FGrp_ResUtil.h"
 #include "FGrp_TextTextObject.h"
 #include "FGrp_TextTextElement.h"
@@ -67,125 +65,6 @@ namespace Tizen { namespace Graphics
 namespace _Text
 {
 
-namespace // unnamed
-{
-       const long long MAX_INT = 0x7FFFFFFF;
-       const long long MIN_INT = -MAX_INT - 1;
-}
-
-inline int
-ToVirCoord(const int& sour)
-{
-       int logicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolutionInt();
-       Dimension physicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetPhysicalResolutionDim();
-
-       long long tempSrc = sour;
-
-       if (logicalResolution == 720 && physicalResolution.width == 480)
-       {
-               if (tempSrc >= 0)
-               {
-                       tempSrc = tempSrc * 3 / 2;
-
-                       return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc);
-               }
-               else
-               {
-                       tempSrc = (tempSrc * 3 - 1) / 2;
-
-                       return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc);
-               }
-       }
-       else if (logicalResolution == 480 && physicalResolution.width == 720)
-       {
-
-               if (tempSrc > 0)
-               {
-                       tempSrc = (tempSrc + 1) * 2 / 3;
-
-                       return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc);
-               }
-               else
-               {
-                       tempSrc = tempSrc * 2 / 3;
-
-                       return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc);
-               }
-       }
-       else
-       {
-               return _ResUtil::ConvertToVirCoord(sour);
-       }
-}
-
-inline int
-ConvertToVirCoord(const int& sour)
-{
-       return _ResUtil::NeedToConvertCoord() ? ToVirCoord(sour) : sour;
-}
-
-inline int
-ToPhyCoord(const int& sour)
-{
-       int logicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetLogicalResolutionInt();
-       Dimension physicalResolution = Tizen::Graphics::_CoordinateSystem::GetInstance()->GetPhysicalResolutionDim();
-
-       long long tempSrc = sour;
-
-       if (logicalResolution == 720 && physicalResolution.width == 480)
-       {
-               if (tempSrc > 0)
-               {
-                       tempSrc = (tempSrc + 1) * 2 / 3;
-
-                       return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc);
-               }
-               else
-               {
-                       tempSrc = tempSrc * 2 / 3;
-
-                       return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc);
-               }
-       }
-       else if (logicalResolution == 480 && physicalResolution.width == 720)
-       {
-               if (tempSrc >= 0)
-               {
-                       tempSrc = tempSrc * 3 / 2;
-
-                       return (tempSrc > MAX_INT) ? MAX_INT : int(tempSrc);
-               }
-               else
-               {
-                       tempSrc = (tempSrc * 3 - 1) / 2;
-
-                       return (tempSrc < MIN_INT) ? MIN_INT : int(tempSrc);
-               }
-       }
-       else
-       {
-               return _ResUtil::ConvertToPhyCoord(sour);
-       }
-}
-
-inline int
-ConvertToPhyCoord(const int& sour)
-{
-       return _ResUtil::NeedToConvertCoord() ? ToPhyCoord(sour) : sour;
-}
-
-inline int
-ConvertToPhyCoordWidth(const int& sour)
-{
-       return _ResUtil::NeedToConvertCoord() ? ToPhyCoord(sour) : sour;
-}
-
-inline int
-ConvertToPhyCoordHeight(const int& sour)
-{
-       return _ResUtil::NeedToConvertCoord() ? ToPhyCoord(sour) : sour;
-}
-
 TextObject::TextObject(void)
 {
        __action = TEXT_OBJECT_ACTION_TYPE_NONE;
@@ -206,10 +85,6 @@ TextObject::TextObject(void)
        __rect.y = 0;
        __rect.width = 0;
        __rect.height = 0;
-       __pcRect.x = 0;
-       __pcRect.y = 0;
-       __pcRect.width = 0;
-       __pcRect.height = 0;
        __slidingGap = 30;
        __slidingStep = 2;
        __pTextWidthManager = null;
@@ -306,11 +181,7 @@ TextObject::Construct(const Rectangle& rect)
        __isAlternateLookEnabled = false;
        __linkViewModeEnabled = false;
        __pTextWidthManager = null;
-       __rect = rect;
-       __pcRect.x = _Text::ConvertToPhyCoord(rect.x);
-       __pcRect.y = _Text::ConvertToPhyCoord(rect.y);
-       __pcRect.width = _Text::ConvertToPhyCoordWidth(rect.width);
-       __pcRect.height = _Text::ConvertToPhyCoordHeight(rect.height);
+       __rect = _CoordinateSystemUtils::ConvertToFloat(rect);
 
        __pCompositeText = new (std::nothrow)TextComposite();
        SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
@@ -355,11 +226,7 @@ TextObject::Construct(const FloatRectangle& rect)
        __isAlternateLookEnabled = false;
        __linkViewModeEnabled = false;
        __pTextWidthManager = null;
-       __rect = _CoordinateSystemUtils::ConvertToInteger(rect);
-       __pcRect.x = _Text::ConvertToPhyCoord(rect.x);
-       __pcRect.y = _Text::ConvertToPhyCoord(rect.y);
-       __pcRect.width = _Text::ConvertToPhyCoordWidth(rect.width);
-       __pcRect.height = _Text::ConvertToPhyCoordHeight(rect.height);
+       __rect = rect;
 
        __pCompositeText = new (std::nothrow)TextComposite();
        SysTryCatch(NID_GRP, __pCompositeText, r = E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
@@ -428,24 +295,21 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       if (__pcRect.width == 0 || __pcRect.height == 0)
+       if (__rect.width == 0 || __rect.height == 0)
        {
                return E_SUCCESS;
        }
 
        result r = E_SUCCESS;
        TextLine* pTextLine = null;
-       Rectangle clipRect;
-       Rectangle lineBounds;
-       Rectangle targetBounds;
-       int totalHeight = 0;
-       int slidingWidth = 0;
-
-       SysTryReturn(NID_GRP, __pcRect.width > 0 && __pcRect.height > 0, E_INVALID_STATE, E_INVALID_STATE
-                       , "[E_INVALID_STATE] This instance is not constructed yet. (width = %d, height = %d)", __pcRect.width, __pcRect.height);
+       FloatRectangle clipRect;
+       FloatRectangle lineBounds;
+       FloatRectangle targetBounds;
+       float totalHeight = 0;
+       float slidingWidth = 0;
 
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, __rect.width > 0 && __rect.height > 0, E_INVALID_STATE, E_INVALID_STATE
+                       , "[E_INVALID_STATE] This instance is not constructed yet. (width = %d, height = %d)", __rect.width, __rect.height);
 
        r = Compose();
        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -456,7 +320,7 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
                __pTextColumn->SetFirstDisplayPositionY(0);
        }
 
-       targetBounds = __pcRect;
+       targetBounds = __rect;
 
        if (__action == TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT)
        {
@@ -465,11 +329,11 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
                        return E_SUCCESS;
                }
 
-               totalHeight = TextUtility::GetFontMaxHeight(__pDefaultFont);
+               totalHeight = TextUtility::GetFontMaxHeightF(__pDefaultFont);
        }
        else
        {
-               totalHeight = __pTextColumn->GetTotalHeight();
+               totalHeight = __pTextColumn->GetTotalHeightF();
        }
 
        if (totalHeight == 0)
@@ -510,7 +374,7 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
                                }
                                else
                                {
-                                       int lineHeight = __pTextColumn->GetLineHeightAt(0);
+                                       float lineHeight = __pTextColumn->GetLineHeightAtF(0);
 
                                        if (targetBounds.height < lineHeight)
                                        {
@@ -522,13 +386,14 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
 
                                                for (i = 0; i < lineCount; i++)
                                                {
-                                                       lineHeight += __pTextColumn->GetLineHeightAt(i);
+                                                       lineHeight += __pTextColumn->GetLineHeightAtF(i);
                                                        if (targetBounds.height < lineHeight)
                                                        {
-                                                               lineHeight -= __pTextColumn->GetLineHeightAt(i);
+                                                               lineHeight -= __pTextColumn->GetLineHeightAtF(i);
                                                                break;
                                                        }
                                                }
+
                                                totalHeight = lineHeight;
                                        }
                                }
@@ -562,17 +427,19 @@ TextObject::Draw(_CanvasImpl& canvasImpl)
        }
 
 CONTINUE_PROC:
-       Rectangle finalClipRect;
-       clipRect = pCanvas->GetClipBounds();
+       FloatRectangle finalClipRect;
+       clipRect = canvasImpl.GetClipBoundsF();
 
-       finalClipRect.x = Math::Max(clipRect.x, targetBounds.x);
-       finalClipRect.y = Math::Max(clipRect.y, targetBounds.y);
-       finalClipRect.width = Math::Min(clipRect.x + clipRect.width, targetBounds.x + targetBounds.width) - finalClipRect.x;
-       finalClipRect.height = Math::Min(clipRect.y + clipRect.height, targetBounds.y + targetBounds.height) - finalClipRect.y;
+       finalClipRect.x = (clipRect.x > targetBounds.x) ? clipRect.x : targetBounds.x; //Math::Max(clipRect.x, targetBounds.x);
+       finalClipRect.y = (clipRect.y > targetBounds.y) ? clipRect.y: targetBounds.y; //Math::Max(clipRect.y, targetBounds.y);
+       //finalClipRect.width = Math::Min(clipRect.x + clipRect.width, targetBounds.x + targetBounds.width) - finalClipRect.x;
+       finalClipRect.width = (clipRect.x + clipRect.width > targetBounds.x + targetBounds.width) ? clipRect.x + clipRect.width - finalClipRect.x : targetBounds.x + targetBounds.width - finalClipRect.x;
+       //finalClipRect.height = Math::Min(clipRect.y + clipRect.height, targetBounds.y + targetBounds.height) - finalClipRect.y;
+       finalClipRect.height = (clipRect.y + clipRect.height > targetBounds.y + targetBounds.height) ? clipRect.y + clipRect.height - finalClipRect.y : targetBounds.y + targetBounds.height - finalClipRect.y;
 
        SysTryReturn(NID_GRP, 0 <= finalClipRect.width && 0 <= finalClipRect.height, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get clip rectangle.");
 
-       pCanvas->SetClipBounds(finalClipRect);
+       canvasImpl.SetClipBounds(finalClipRect);
 
        switch (__action)
        {
@@ -580,23 +447,23 @@ CONTINUE_PROC:
                pTextLine = __pTextColumn->GetTextLine(0);
                SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                __pTextColumn->SetDisplayLineCount(1);
                __pTextColumn->SetDisplayHeight(lineBounds.height);
 
-               slidingWidth = Math::Max(__pTextColumn->GetSlidingDimension().width, __pcRect.width);
+               slidingWidth = (__pTextColumn->GetSlidingDimension().width > __rect.width) ? __pTextColumn->GetSlidingDimension().width : __rect.width;
 
                if (__isActionOn)
                {
-                       Rectangle slidingRect;
+                       FloatRectangle slidingRect;
 
                        targetBounds.width = lineBounds.width;
                        targetBounds.height = lineBounds.height;
 
                        slidingRect = targetBounds;
 
-                       slidingRect.x += __pTextColumn->GetSlidingPosition();
-                       Dimension slidingDim = __pTextColumn->GetSlidingDimension();
+                       slidingRect.x += __pTextColumn->GetSlidingPositionF();
+                       FloatDimension slidingDim = __pTextColumn->GetSlidingDimensionF();
                        slidingRect.width = slidingDim.width;
                        slidingRect.height = slidingDim.height;
 
@@ -620,7 +487,7 @@ CONTINUE_PROC:
 
        case TEXT_OBJECT_ACTION_TYPE_SLIDE_UP:
        {
-               Rectangle slidingRect = targetBounds;
+               FloatRectangle slidingRect = targetBounds;
                slidingRect.y += __pTextColumn->GetSlidingPosition();
 
                int lineCount = __pTextColumn->GetTotalLineCount();
@@ -629,7 +496,7 @@ CONTINUE_PROC:
                        pTextLine = __pTextColumn->GetTextLine(i);
                        if (pTextLine != null)
                        {
-                               lineBounds = pTextLine->GetBounds();
+                               lineBounds = pTextLine->GetBoundsF();
                                slidingRect.height = lineBounds.height;
                                if ((slidingRect.y + slidingRect.height >= targetBounds.y) && (slidingRect.y < targetBounds.y + targetBounds.height))
                                {
@@ -660,7 +527,7 @@ CONTINUE_PROC:
                break;
        }
 
-       pCanvas->SetClipBounds(clipRect);
+       canvasImpl.SetClipBounds(clipRect);
 
        return E_SUCCESS;
 }
@@ -690,7 +557,7 @@ TextObject::DrawLine(_CanvasImpl& canvasImpl, int lineIndex)
 
        result r = E_SUCCESS;
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
        int firstDisplayY = __pTextColumn->GetFirstDisplayPositionY();
 
        r = Compose();
@@ -705,7 +572,7 @@ TextObject::DrawLine(_CanvasImpl& canvasImpl, int lineIndex)
                return E_INVALID_ARG;
        }
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
        lineBounds.y = lineBounds.y - firstDisplayY + __rect.y;
 
        int length = pTextLine->GetTextLength();
@@ -721,15 +588,15 @@ TextObject::DrawWithOffset(_CanvasImpl& canvasImpl)
 
        SysTryReturn(NID_GRP, __isActionOn, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Action is off.");
 
-       int slidingStartIndex = __pTextColumn->GetSlidingPosition();
-       Dimension slidingDim = __pTextColumn->GetSlidingDimension();
+       float slidingStartIndex = __pTextColumn->GetSlidingPositionF();
+       FloatDimension slidingDim = __pTextColumn->GetSlidingDimensionF();
 
        switch (__action)
        {
        case TEXT_OBJECT_ACTION_TYPE_SLIDE_LEFT:
-               if (__pcRect.width < slidingDim.width)
+               if (__rect.width < slidingDim.width)
                {
-                       slidingDim.width = Math::Max(slidingDim.width, __pcRect.width);
+                       slidingDim.width = (slidingDim.width > __rect.width) ? slidingDim.width: __rect.width;//Math::Max(slidingDim.width, __rect.width);
 
                        if (__slidingStep < slidingStartIndex + slidingDim.width + __slidingGap)
                        {
@@ -748,7 +615,7 @@ TextObject::DrawWithOffset(_CanvasImpl& canvasImpl)
                        }
                        else
                        {
-                               slidingStartIndex = __pcRect.width + __slidingGap + slidingStartIndex;
+                               slidingStartIndex = __rect.width + __slidingGap + slidingStartIndex;
                        }
                }
                __pTextColumn->SetSlidingPosition(slidingStartIndex);
@@ -761,7 +628,7 @@ TextObject::DrawWithOffset(_CanvasImpl& canvasImpl)
                }
                else
                {
-                       slidingStartIndex = __pcRect.height;
+                       slidingStartIndex = __rect.height;
                }
                __pTextColumn->SetSlidingPosition(slidingStartIndex);
                break;
@@ -838,11 +705,11 @@ TextObject::Compose(void)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       SysTryReturn(NID_GRP, __pcRect.width >= 0 && __pcRect.height >= 0, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
+       SysTryReturn(NID_GRP, __rect.width >= 0 && __rect.height >= 0, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not constructed yet.");
 
        int lineCount = 0;
-       Rectangle rect = __pcRect;
-       Rectangle lineBounds;
+       FloatRectangle rect = __rect;
+       FloatRectangle lineBounds;
 
        if (__pCompositeText->IsPartialComposingModeEnabled())
        {
@@ -889,12 +756,12 @@ TextObject::Compose(void)
                                __isActionOn = true;
                                __pTextColumn->SetSlidingPosition(0);
 
-                               Dimension slidingDim;
-                               Dimension lineTextSize;
+                               FloatDimension slidingDim;
+                               FloatDimension lineTextSize;
 
                                __pCompositeText->GetRegion(0, totalLength, slidingDim.width, slidingDim.height);
                                pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
-                               lineBounds = pTextLine->GetBounds();
+                               lineBounds = pTextLine->GetBoundsF();
 
                                __pTextColumn->SetSlidingDimension(slidingDim);
 
@@ -912,14 +779,14 @@ TextObject::Compose(void)
        {
                __pTextColumn->SetSlidingPosition(0);
 
-               int totalHeight = __pTextColumn->GetTotalHeight();
-               Dimension slidingDim;
-               slidingDim.width = __pcRect.width;
+               float totalHeight = __pTextColumn->GetTotalHeightF();
+               FloatDimension slidingDim;
+               slidingDim.width = __rect.width;
                slidingDim.height = totalHeight;
 
                __pTextColumn->SetSlidingDimension(slidingDim);
 
-               if (__pcRect.height < totalHeight)
+               if (__rect.height < totalHeight)
                {
                        __isActionOn = true;
                }
@@ -998,13 +865,13 @@ TextObject::SetFirstDisplayLineIndex(int lineIndex)
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
        result r = E_SUCCESS;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
        TextLine* pTextLine = null;
-       int firstDisplayPositionY = 0;
-       int rollbackFirstDisplayPositionY = 0;
+       float firstDisplayPositionY = 0;
+       float rollbackFirstDisplayPositionY = 0;
        int rollbackFirstDisplayLineIndex = 0;
 
-       rollbackFirstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
+       rollbackFirstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
        rollbackFirstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex();
 
        __pTextColumn->SetFirstDisplayLineIndex(lineIndex);
@@ -1012,7 +879,7 @@ TextObject::SetFirstDisplayLineIndex(int lineIndex)
        pTextLine = __pTextColumn->GetTextLine(lineIndex);
        SysTryCatch(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text element.");
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
        firstDisplayPositionY = lineBounds.y;
 
        __pTextColumn->SetFirstDisplayPositionY(firstDisplayPositionY);
@@ -1027,20 +894,25 @@ CATCH:
 }
 
 result
-TextObject::SetFirstDisplayPositionY(int lcY)
+TextObject::SetFirstDisplayPositionY(int y)
+{
+       return SetFirstDisplayPositionY(_CoordinateSystemUtils::ConvertToFloat(y));
+}
+
+result
+TextObject::SetFirstDisplayPositionY(float y)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
        result r = E_SUCCESS;
 
-       int pcY = _Text::ConvertToPhyCoord(lcY);
        if (IsPartialComposingModeEnabled())
        {
                __isFirstDisplayPositionYChanged = true;
 
-               if (__pCompositeText->GetTotalComposedHeight() <= (pcY + __pcRect.height))
+               if (__pCompositeText->GetTotalComposedHeight() <= (y + __rect.height))
                {
-                       __pCompositeText->SetComposePartialLimitHeight(pcY + __pcRect.height - GetTotalComposedHeight());
+                       __pCompositeText->SetComposePartialLimitHeight(y + __rect.height - GetTotalComposedHeight());
 
                        r = Compose();
                        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -1048,7 +920,7 @@ TextObject::SetFirstDisplayPositionY(int lcY)
        }
 
        __isFirstDisplayPositionYChanged = false;
-       __pTextColumn->SetFirstDisplayPositionY(pcY);
+       __pTextColumn->SetFirstDisplayPositionY(y);
 
        return E_SUCCESS;
 
@@ -1057,28 +929,21 @@ CATCH:
        return r;
 }
 
-result
-TextObject::SetFirstDisplayPositionY(float lcY)
-{
-       return SetFirstDisplayPositionY(_CoordinateSystemUtils::ConvertToInteger(lcY));
-}
-
 int
 TextObject::GetMaxLineHeight(void) const
 {
-       IF_NOT_CONSTRUCTED(return -1);
-
-       int pcMaxHeight = __pCompositeText->GetMaxLineHeight();
-       pcMaxHeight = Math::Max(pcMaxHeight, TextUtility::GetFontMaxHeight(__pDefaultFont));
-       int lcMaxHeight = _Text::ConvertToVirCoord(pcMaxHeight);
-
-       return lcMaxHeight;
+       return _CoordinateSystemUtils::ConvertToInteger(GetMaxLineHeightF());
 }
 
 float
 TextObject::GetMaxLineHeightF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetMaxLineHeight());
+       IF_NOT_CONSTRUCTED(return -1);
+
+       float lineMaxHeight = __pCompositeText->GetMaxLineHeightF();
+       float fontMaxHeight = TextUtility::GetFontMaxHeightF(__pDefaultFont);
+
+       return (lineMaxHeight > fontMaxHeight) ? lineMaxHeight: fontMaxHeight;
 }
 
 bool
@@ -1086,7 +951,7 @@ TextObject::IsDisplayedAtStartPosition(void) const
 {
        IF_NOT_CONSTRUCTED(return false);
 
-       int firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
+       float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
 
        bool isDisplayedAtStartPosition = (firstDisplayPositionY == 0) ? true : false;
 
@@ -1098,13 +963,13 @@ TextObject::IsDisplayedAtEndPosition(void) const
 {
        IF_NOT_CONSTRUCTED(return false);
 
-       int totalHeight = 0;
-       int firstDisplayPositionY = 0;
+       float totalHeight = 0;
+       float firstDisplayPositionY = 0;
 
-       firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
-       totalHeight = __pTextColumn->GetTotalHeight();
+       firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
+       totalHeight = __pTextColumn->GetTotalHeightF();
 
-       bool isDisplayedAtEndPosition = ((totalHeight - firstDisplayPositionY) <= __pcRect.height) ? true : false;
+       bool isDisplayedAtEndPosition = ((totalHeight - firstDisplayPositionY) <= __rect.height) ? true : false;
 
        return isDisplayedAtEndPosition;
 }
@@ -1156,71 +1021,52 @@ TextObject::SetAlignment(TextObjectAlignment alignment)
 }
 
 result
-TextObject::SetBounds(const Rectangle& lcRect)
+TextObject::SetBounds(const Rectangle& rect)
+{
+       return SetBounds(_CoordinateSystemUtils::ConvertToFloat(rect));
+}
+
+result
+TextObject::SetBounds(const FloatRectangle& rect)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       SysTryReturn(NID_GRP, (lcRect.width >= 0) && (lcRect.height >= 0), E_OUT_OF_RANGE, E_OUT_OF_RANGE
-                       , "[E_OUT_OF_RANGE] The given rectangle(width:%d,height:%d) is out of range.\n", lcRect.width, lcRect.height);
+       SysTryReturn(NID_GRP, (rect.width >= 0) && (rect.height >= 0), E_OUT_OF_RANGE, E_OUT_OF_RANGE
+                       , "[E_OUT_OF_RANGE] The given rectangle(width:%d,height:%d) is out of range.\n", rect.width, rect.height);
 
-       if (__rect.width != lcRect.width)
+       if (__rect.width != rect.width)
        {
                UpdateChangedInfo(0, 0, false);
        }
 
-       __rect = lcRect;
-
-       if (_ResUtil::NeedToConvertCoord())
-       {
-               __pcRect.x = _Text::ConvertToPhyCoord(__rect.x);
-               __pcRect.y = _Text::ConvertToPhyCoord(__rect.y);
-               __pcRect.width = _Text::ConvertToPhyCoordWidth(__rect.width);
-
-               if (_Screen::GetWidth() == 600 || _Screen::GetWidth() == 1280 || _Screen::GetWidth() == 1920 || _Screen::GetWidth() == 2560)
-               {
-                       __pcRect.width++;
-               }
-
-               __pcRect.height = _Text::ConvertToPhyCoordHeight(__rect.height);
-       }
-       else
-       {
-               __pcRect = __rect;
-       }
+       __rect = rect;
 
        return E_SUCCESS;
 }
 
 result
-TextObject::SetBounds(const FloatRectangle& lcRect)
+TextObject::SetLineSpace(int lineSpacing)
 {
-       return SetBounds(_CoordinateSystemUtils::ConvertToInteger(FloatRectangle(lcRect.x, lcRect.y, ceil(lcRect.width), ceil(lcRect.height))));
+       return SetLineSpace(_CoordinateSystemUtils::ConvertToFloat(lineSpacing));
 }
 
 result
-TextObject::SetLineSpace(int lcLineSpacing)
+TextObject::SetLineSpace(float lineSpacing)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       SysTryReturn(NID_GRP, lcLineSpacing >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
+       SysTryReturn(NID_GRP, lineSpacing >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. lineSpacing(%d)", lineSpacing);
 
-       int pcLineSpacing = _Text::ConvertToPhyCoord(lcLineSpacing);
-
-       if (__pCompositeText->GetLineSpace() != pcLineSpacing)
+       if (__pCompositeText->GetLineSpace() != lineSpacing)
        {
-               __pCompositeText->SetLineSpace(pcLineSpacing);
+               __pCompositeText->SetLineSpace(lineSpacing);
                __isChanged = true;
        }
 
-       return E_SUCCESS;
+       return E_SUCCESS;       
 }
 
 result
-TextObject::SetLineSpace(float lcLineSpacing)
-{
-       return SetLineSpace(_CoordinateSystemUtils::ConvertToInteger(lcLineSpacing));
-}
-result
 TextObject::SetElementVerticalAlignment(TextObjectAlignment alignment)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
@@ -1243,24 +1089,21 @@ TextObject::SetElementVerticalAlignment(TextObjectAlignment alignment)
 Dimension
 TextObject::GetTextExtent(int startTextIndex, int textLength) const
 {
-       IF_NOT_CONSTRUCTED(return Dimension(-1, -1));
-
-       Dimension pcTextSize;
-       result r = __pCompositeText->GetRegion(startTextIndex, textLength, pcTextSize.width, pcTextSize.height);
-       SysTryReturn(NID_GRP, r == E_SUCCESS, Dimension(-1, -1), r, "[%s] Propagating.", GetErrorMessage(r));
-
-       Dimension lcTextSize;
-       lcTextSize.width = _Text::ConvertToVirCoord(pcTextSize.width);
-       lcTextSize.height = _Text::ConvertToVirCoord(pcTextSize.height);
-       SetLastResult(E_SUCCESS);
-
-       return lcTextSize;
+       return _CoordinateSystemUtils::ConvertToInteger(GetTextExtentF(startTextIndex,textLength));
 }
 
 FloatDimension
 TextObject::GetTextExtentF(int startTextIndex, int textLength) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetTextExtent(startTextIndex,textLength));
+       IF_NOT_CONSTRUCTED(return FloatDimension(-1, -1));
+
+       FloatDimension textSize;
+       result r = __pCompositeText->GetRegion(startTextIndex, textLength, textSize.width, textSize.height);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, FloatDimension(-1, -1), r, "[%s] Propagating.", GetErrorMessage(r));
+
+       SetLastResult(E_SUCCESS);
+
+       return textSize;        
 }
 
 result
@@ -1512,7 +1355,7 @@ TextObject::SetFont(Font* pFont, int startTextIndex, int textLength)
        __pDefaultFont = pTmpFont;
 
        __pCompositeText->SetRange(startTextIndex, textLength);
-       r = __pCompositeText->SetFont(pFont);
+       r = __pCompositeText->SetFont(__pDefaultFont);
        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        UpdateChangedInfo(__pCompositeText->GetWorkStart(), 0);
@@ -1538,17 +1381,17 @@ TextObject::GetFont(int textIndex) const
 result
 TextObject::SetDefaultFontSize(int size)
 {
-       IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
-
-       _FontImpl::GetInstance(*__pDefaultFont)->SetSize(size);
-
-       return E_SUCCESS;
+       return SetDefaultFontSize(_CoordinateSystemUtils::ConvertToFloat(size));
 }
 
 result
 TextObject::SetDefaultFontSize(float size)
 {
-       return SetDefaultFontSize(_CoordinateSystemUtils::ConvertToInteger(size));
+       IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
+
+       _FontImpl::GetInstance(*__pDefaultFont)->SetSize(size);
+
+       return E_SUCCESS;
 }
 
 int
@@ -1808,7 +1651,7 @@ TextObject::InsertElementAt(int textIndex, Bitmap& bitmap, TextElementSourceType
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, null, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
+       TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
        SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
 
        int addedTextLength = pImageText->GetTextLength();
@@ -1825,7 +1668,7 @@ TextObject::AppendElement(Bitmap& bitmap, TextElementSourceType sourceType)
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
        result r = E_SUCCESS;
-       TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, null, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
+       TextImage* pImageText = new (std::nothrow)TextImage(bitmap, sourceType, (TextObjectAlignment)(TEXT_OBJECT_ALIGNMENT_LEFT | TEXT_OBJECT_ALIGNMENT_TOP));
        SysTryReturn(NID_GRP, pImageText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
 
        r = __pCompositeText->AppendElement(*pImageText);
@@ -1962,7 +1805,13 @@ CATCH:
 }
 
 int
-TextObject::GetTextIndexFromPosition(int lcX, int lcY, bool cursorMode) const
+TextObject::GetTextIndexFromPosition(int x, int y, bool cursorMode) const
+{
+       return GetTextIndexFromPosition(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode);
+}
+
+int
+TextObject::GetTextIndexFromPosition(float x, float y, bool cursorMode) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
@@ -1972,27 +1821,24 @@ TextObject::GetTextIndexFromPosition(int lcX, int lcY, bool cursorMode) const
                return -1;
        }
 
-       int pcX = _Text::ConvertToPhyCoord(lcX);
-       int pcY = _Text::ConvertToPhyCoord(lcY);
-
        if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE)
        {
-               return GetTextIndexFromPositionInNoneWrap(pcX, pcY, !cursorMode);
+               return GetTextIndexFromPositionInNoneWrap(x, y, !cursorMode);
        }
        else
        {
-               return GetTextIndexFromPositionInWrap(pcX, pcY, !cursorMode);
-       }
+               return GetTextIndexFromPositionInWrap(x, y, !cursorMode);
+       }       
 }
 
 int
-TextObject::GetTextIndexFromPosition(float lcX, float lcY, bool cursorMode) const
+TextObject::GetTextIndexFromPositionAtLine(int lineIndex, int x, bool cursorMode) const
 {
-       return GetTextIndexFromPosition(_CoordinateSystemUtils::ConvertToInteger(lcX), _CoordinateSystemUtils::ConvertToInteger(lcY), cursorMode);
+       return GetTextIndexFromPositionAtLine(lineIndex, _CoordinateSystemUtils::ConvertToFloat(x), cursorMode);
 }
 
 int
-TextObject::GetTextIndexFromPositionAtLine(int lineIndex, int lcX, bool cursorMode) const
+TextObject::GetTextIndexFromPositionAtLine(int lineIndex, float x, bool cursorMode) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
@@ -2001,13 +1847,12 @@ TextObject::GetTextIndexFromPositionAtLine(int lineIndex, int lcX, bool cursorMo
        TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex);
        SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       int pcX = _Text::ConvertToPhyCoord(lcX);
        int lineOffset = pTextLine->GetTextOffset();
        int lineLength = pTextLine->GetTextLength();
        int length = 0;
        TextElementType objectType;
-       Rectangle lineBounds = pTextLine->GetBounds();
-       Dimension lineTextSize;
+       FloatRectangle lineBounds = pTextLine->GetBoundsF();
+       FloatDimension lineTextSize;
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        switch (__align & TEXT_ALIGNMASK_HORIZ)
@@ -2016,118 +1861,26 @@ TextObject::GetTextIndexFromPositionAtLine(int lineIndex, int lcX, bool cursorMo
                break;
 
        case TEXT_OBJECT_ALIGNMENT_CENTER:
-               pcX -= (lineBounds.width - lineTextSize.width) / 2;
+               x -= (lineBounds.width - lineTextSize.width) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-               pcX -= (lineBounds.width - lineTextSize.width);
+               x -= (lineBounds.width - lineTextSize.width);
                break;
        }
 
-       pcX = (pcX < 0) ? 0 : pcX;
+       x = (x < 0) ? 0 : x;
        __pCompositeText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
 
        int endType = 0;
 
        if (cursorMode)
        {
-               __pCompositeText->ForwardAnalyzeWithFocusedObjectType(lineOffset, lineLength, pcX, length, objectType);
+               __pCompositeText->ForwardAnalyzeWithFocusedObjectType(lineOffset, lineLength, x, length, objectType);
        }
        else
        {
-               endType = __pCompositeText->ForwardAnalyzeInNoneCursorMode(lineOffset, lineLength, pcX, length);
-       }
-
-       __pCompositeText->SetWrap(__wrap);
-
-       if (!cursorMode)
-       {
-               if (endType == -1)
-               {
-                       return -1;
-               }
-       }
-
-       int index = pTextLine->GetTextOffset() + length;
-       if (pTextLine->GetEndType() == TEXT_RETBY_LINEFEED && lineLength == length && pTextLine->GetTextOffset() < index)
-       {
-               index--;
-       }
-
-       if (index != GetTextLength() && index == lineOffset + lineLength)
-       {
-               TextElement* pTextElement = GetElementAtTextIndex(index-1);
-               if (pTextElement != null)
-               {
-                       const TextSimple* pSimpleText = dynamic_cast <const TextSimple*>(pTextElement);
-                       if (pSimpleText != null)
-                       {
-                               const wchar_t* pText = pSimpleText->GetText();
-                               SysTryReturn(NID_GRP, pText, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text.");
-
-                               int i = index - 1 - pSimpleText->GetTextOffset();
-                               SysTryReturn(NID_GRP, i >= 0 && i < pSimpleText->GetTextLength(), -1, E_OUT_OF_RANGE
-                                               , "[E_OUT_OF_RANGE] text index(%d) must greater than 0 and must be less than total string length(%d)",i, pSimpleText->GetTextLength());
-
-                               if (pText[i] == L' ')
-                               {
-                                       index--;
-                               }
-                       }
-               }
-       }
-
-       SetLastResult(E_SUCCESS);
-
-       return index;
-}
-
-int
-TextObject::GetTextIndexFromPositionAtLine(int lineIndex, float lcX, bool cursorMode) const
-{
-       IF_NOT_CONSTRUCTED(return -1);
-
-       SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
-
-       TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex);
-       SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
-
-       lcX = _CoordinateSystemUtils::ConvertToInteger(lcX);
-       int pcX = _Text::ConvertToPhyCoord(lcX);
-       int lineOffset = pTextLine->GetTextOffset();
-       int lineLength = pTextLine->GetTextLength();
-       int length = 0;
-       TextElementType objectType;
-       Rectangle lineBounds = pTextLine->GetBounds();
-       Dimension lineTextSize;
-       pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
-
-       switch (__align & TEXT_ALIGNMASK_HORIZ)
-       {
-       case TEXT_OBJECT_ALIGNMENT_LEFT:
-               break;
-
-       case TEXT_OBJECT_ALIGNMENT_CENTER:
-               pcX -= (lineBounds.width - lineTextSize.width) / 2;
-               break;
-
-       case TEXT_OBJECT_ALIGNMENT_RIGHT:
-               pcX -= (lineBounds.width - lineTextSize.width);
-               break;
-       }
-
-       pcX = (pcX < 0) ? 0 : pcX;
-       __pCompositeText->SetWrap(TEXT_OBJECT_WRAP_TYPE_NONE);
-
-       int endType = 0;
-
-       if (cursorMode)
-       {
-               __pCompositeText->ForwardAnalyzeWithFocusedObjectType(lineOffset, lineLength, pcX, length, objectType);
-       }
-       else
-       {
-               endType = __pCompositeText->ForwardAnalyzeInNoneCursorMode(lineOffset, lineLength, pcX, length);
+               endType = __pCompositeText->ForwardAnalyzeInNoneCursorMode(lineOffset, lineLength, x, length);
        }
 
        __pCompositeText->SetWrap(__wrap);
@@ -2204,7 +1957,13 @@ TextObject::SetCutLinkViewMode(bool enable)
 }
 
 int
-TextObject::GetCutLinkIndexFromPositionData(int lcX, int lcY) const
+TextObject::GetCutLinkIndexFromPositionData(int x, int y) const
+{
+       return GetCutLinkIndexFromPositionData(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y));
+}
+
+int
+TextObject::GetCutLinkIndexFromPositionData(float x, float y) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
@@ -2216,16 +1975,14 @@ TextObject::GetCutLinkIndexFromPositionData(int lcX, int lcY) const
        }
 
        int textIndex = 0;
-       int pcX = _Text::ConvertToPhyCoord(lcX);
-       int pcY = _Text::ConvertToPhyCoord(lcY);
 
        if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE)
        {
-               textIndex = GetTextIndexFromPositionInNoneWrap(pcX, pcY, false);
+               textIndex = GetTextIndexFromPositionInNoneWrap(x, y, false);
        }
        else
        {
-               textIndex = GetTextIndexFromPositionInWrap(pcX, pcY, false);
+               textIndex = GetTextIndexFromPositionInWrap(x, y, false);
        }
 
        if (textIndex < 0)
@@ -2233,10 +1990,11 @@ TextObject::GetCutLinkIndexFromPositionData(int lcX, int lcY) const
                return -1;
        }
 
-       int width = 0;
-       int height = 0;
-       Point absPoint;
-       Point relPoint;
+       float width = 0;
+       float height = 0;
+       FloatPoint absPoint;
+       FloatPoint relPoint;
+
        if (__wrap == TEXT_OBJECT_WRAP_TYPE_NONE)
        {
                r = GetTextPositionInfoInNoneWrapAt(textIndex, width, height, absPoint.x, absPoint.y, relPoint.x, relPoint.y);
@@ -2246,15 +2004,9 @@ TextObject::GetCutLinkIndexFromPositionData(int lcX, int lcY) const
                r = GetTextPositionInfoInWrapAt(textIndex, width, height, absPoint.x, absPoint.y, relPoint.x, relPoint.y);
        }
        SysTryReturn(NID_GRP, r == E_SUCCESS, -1, r, "[%s] Propagating.", GetErrorMessage(r));
-       SysTryReturn(NID_GRP, pcY + __pcRect.y >= relPoint.y, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text position information");
-
-       return __pCompositeText->GetCutLinkElementIndexAt(textIndex);
-}
+       SysTryReturn(NID_GRP, y + __rect.y >= relPoint.y, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text position information");
 
-int
-TextObject::GetCutLinkIndexFromPositionData(float lcX, float lcY) const
-{
-       return GetCutLinkIndexFromPositionData(_CoordinateSystemUtils::ConvertToInteger(lcX), _CoordinateSystemUtils::ConvertToInteger(lcY));
+       return __pCompositeText->GetCutLinkElementIndexAt(textIndex);   
 }
 
 TextElement*
@@ -2355,14 +2107,29 @@ TextObject::ResetCutLinkColor(LinkType linkType)
 result
 TextObject::GetCutLinkBounds(int cutLinkIndex, Point& startPoint, Point& endPoint) const
 {
+       FloatPoint startPointF = _CoordinateSystemUtils::ConvertToFloat(startPoint);
+       FloatPoint endPointF =  _CoordinateSystemUtils::ConvertToFloat(endPoint);
+
+       result r = GetCutLinkBounds(cutLinkIndex, startPointF, endPointF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       startPoint = _CoordinateSystemUtils::ConvertToInteger(startPointF);
+       endPoint = _CoordinateSystemUtils::ConvertToInteger(endPointF);
+
+       return E_SUCCESS;
+}
+
+result
+TextObject::GetCutLinkBounds(int cutLinkIndex, FloatPoint& startPoint, FloatPoint& endPoint) const
+{
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
        result r = E_SUCCESS;
        int textIndex = 0;
        int textLength = 0;
-       int width = 0;
-       int heigth = 0;
-       Point tempPoint;
+       float width = 0;
+       float heigth = 0;
+       FloatPoint tempPoint;
 
        r = __pCompositeText->GetCutLinkObjectInfo(cutLinkIndex, textIndex, textLength);
        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
@@ -2387,14 +2154,6 @@ TextObject::GetCutLinkBounds(int cutLinkIndex, Point& startPoint, Point& endPoin
        endPoint.x = endPoint.x + width;
        endPoint.y = endPoint.y + heigth;
 
-       if (_ResUtil::NeedToConvertCoord())
-       {
-               startPoint.x = _Text::ConvertToVirCoord(startPoint.x);
-               startPoint.y = _Text::ConvertToVirCoord(startPoint.y);
-               endPoint.x = _Text::ConvertToVirCoord(endPoint.x);
-               endPoint.y = _Text::ConvertToVirCoord(endPoint.y);
-       }
-
        return E_SUCCESS;
 
 CATCH:
@@ -2407,20 +2166,32 @@ CATCH:
 }
 
 result
-TextObject::GetCutLinkBounds(int cutLinkIndex, FloatPoint& startPoint, FloatPoint& endPoint) const
+TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const
 {
-       Point newStartPoint = _CoordinateSystemUtils::ConvertToInteger(startPoint);
-       Point newEndPoint =  _CoordinateSystemUtils::ConvertToInteger(endPoint);
-       result r = GetCutLinkBounds(cutLinkIndex, newStartPoint, newEndPoint);
+       IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       startPoint = _CoordinateSystemUtils::ConvertToFloat(newStartPoint);
-       endPoint = _CoordinateSystemUtils::ConvertToFloat(newEndPoint);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF =  _CoordinateSystemUtils::ConvertToFloat(height);
+       float absXF = _CoordinateSystemUtils::ConvertToFloat(absX);
+       float absYF = _CoordinateSystemUtils::ConvertToFloat(absY);
+       float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX);
+       float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY);
 
-       return r;
+       result r = GetTextPositionInfoAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       absX = _CoordinateSystemUtils::ConvertToInteger(absXF);
+       absY = _CoordinateSystemUtils::ConvertToInteger(absYF);
+       logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF);
+       logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF);
+
+       return E_SUCCESS;
 }
 
 result
-TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const
+TextObject::GetTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
@@ -2429,12 +2200,12 @@ TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& a
 
        if (lineCount < 1)
        {
-               _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+               _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
                SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
-               int maxHeight = TextUtility::GetFontMaxHeight(pFont);
 
-               int posX = 0;
-               int posY = 0;
+               float maxHeight = TextUtility::GetFontMaxHeightF(pFont);
+               float posX = 0;
+               float posY = 0;
                absX = 0;
                absY = 0;
 
@@ -2446,14 +2217,14 @@ TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& a
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-                               posY += (__pcRect.height - maxHeight) / 2;
+                               posY += (__rect.height - maxHeight) / 2;
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-                               posY += (__pcRect.height - maxHeight);
+                               posY += (__rect.height - maxHeight);
                                break;
                        }
-                       logicalY = __pcRect.y + posY;
+                       logicalY = __rect.y + posY;
 
                        switch (__align & TEXT_ALIGNMASK_HORIZ)
                        {
@@ -2461,18 +2232,18 @@ TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& a
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_CENTER:
-                               posX += __pcRect.width / 2;
+                               posX += __rect.width / 2;
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-                               posX += __pcRect.width;
+                               posX += __rect.width;
                                break;
                        }
-                       logicalX = __pcRect.x + posX;
+                       logicalX = __rect.x + posX;
                }
                else
                {
-                       int lineHeight = maxHeight + __pCompositeText->GetLineSpace();
+                       float lineHeight = maxHeight + __pCompositeText->GetLineSpaceF();
                        TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment();
                        switch (alignment & TEXT_ALIGNMASK_VERT)
                        {
@@ -2496,16 +2267,16 @@ TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& a
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_CENTER:
-                               posX += __pcRect.width / 2;
+                               posX += __rect.width / 2;
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-                               posX += __pcRect.width;
+                               posX += __rect.width;
                                break;
                        }
 
-                       logicalX = posX + __pcRect.x;
-                       logicalY = posY + __pcRect.y;
+                       logicalX = posX + __rect.x;
+                       logicalY = posY + __rect.y;
                }
 
                width = 0;
@@ -2520,43 +2291,34 @@ TextObject::GetTextPositionInfoAt(int textIndex, int& width, int& height, int& a
                SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
-       if (_ResUtil::NeedToConvertCoord())
-       {
-               width = _Text::ConvertToVirCoord(width);
-               height = _Text::ConvertToVirCoord(height);
-               absX = _Text::ConvertToVirCoord(absX);
-               absY = _Text::ConvertToVirCoord(absY);
-               logicalX = _Text::ConvertToVirCoord(logicalX);
-               logicalY = _Text::ConvertToVirCoord(logicalY);
-       }
-
        return E_SUCCESS;
 }
 
 result
-TextObject::GetTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const
+TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const
 {
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight =  _CoordinateSystemUtils::ConvertToInteger(height);
-       int newAbsX = _CoordinateSystemUtils::ConvertToInteger(absX);
-       int newAbsY = _CoordinateSystemUtils::ConvertToInteger(absY);
-       int newLogicalX = _CoordinateSystemUtils::ConvertToInteger(logicalX);
-       int newLogicalY = _CoordinateSystemUtils::ConvertToInteger(logicalY);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF =  _CoordinateSystemUtils::ConvertToFloat(height);
+       float absXF = _CoordinateSystemUtils::ConvertToFloat(absX);
+       float absYF = _CoordinateSystemUtils::ConvertToFloat(absY);
+       float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX);
+       float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY);
 
-       result r = GetTextPositionInfoAt(textIndex, newWidth, newHeight, newAbsX, newAbsY, newLogicalX, newLogicalY);
+       result r = GetBlockTextPositionInfoAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newHeight);
-       absX = _CoordinateSystemUtils::ConvertToFloat(newAbsX);
-       absY = _CoordinateSystemUtils::ConvertToFloat(newAbsY);
-       logicalX = _CoordinateSystemUtils::ConvertToFloat(newLogicalX);
-       logicalY = _CoordinateSystemUtils::ConvertToFloat(newLogicalY);
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       absX = _CoordinateSystemUtils::ConvertToInteger(absXF);
+       absY = _CoordinateSystemUtils::ConvertToInteger(absYF);
+       logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF);
+       logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF);
 
-       return r;
+       return E_SUCCESS;
 }
 
 result
-TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, int& absX, int& absY, int& logicalX, int& logicalY) const
+TextObject::GetBlockTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
@@ -2565,12 +2327,12 @@ TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, i
 
        if (lineCount < 1)
        {
-               _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+               _FontImpl* pFont =_FontImpl::GetInstance(*__pDefaultFont);
                SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
-               int maxHeight = TextUtility::GetFontMaxHeight(pFont);
 
-               int posX = 0;
-               int posY = 0;
+               float maxHeight = TextUtility::GetFontMaxHeightF(pFont);
+               float posX = 0;
+               float posY = 0;
                absX = 0;
                absY = 0;
 
@@ -2582,14 +2344,14 @@ TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, i
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-                               posY += (__pcRect.height - maxHeight) / 2;
+                               posY += (__rect.height - maxHeight) / 2;
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-                               posY += (__pcRect.height - maxHeight);
+                               posY += (__rect.height - maxHeight);
                                break;
                        }
-                       logicalY = __pcRect.y + posY;
+                       logicalY = __rect.y + posY;
 
                        switch (__align & TEXT_ALIGNMASK_HORIZ)
                        {
@@ -2597,18 +2359,18 @@ TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, i
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_CENTER:
-                               posX += __pcRect.width / 2;
+                               posX += __rect.width / 2;
                                break;
 
                        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-                               posX += __pcRect.width;
+                               posX += __rect.width;
                                break;
                        }
-                       logicalX = __pcRect.x + posX;
+                       logicalX = __rect.x + posX;
                }
                else
                {
-                       int lineHeight = maxHeight + __pCompositeText->GetLineSpace();
+                       float lineHeight = maxHeight + __pCompositeText->GetLineSpace();
                        TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment();
                        switch (alignment & TEXT_ALIGNMASK_VERT)
                        {
@@ -2626,8 +2388,8 @@ TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, i
                                break;
                        }
 
-                       logicalX = __pcRect.x;
-                       logicalY = posY + __pcRect.y;
+                       logicalX = __rect.x;
+                       logicalY = posY + __rect.y;
                }
 
                width = 0;
@@ -2642,42 +2404,10 @@ TextObject::GetBlockTextPositionInfoAt(int textIndex, int& width, int& height, i
                SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
-       if (_ResUtil::NeedToConvertCoord())
-       {
-               width = _Text::ConvertToVirCoord(width);
-               height = _Text::ConvertToVirCoord(height);
-               absX = _Text::ConvertToVirCoord(absX);
-               absY = _Text::ConvertToVirCoord(absY);
-               logicalX = _Text::ConvertToVirCoord(logicalX);
-               logicalY = _Text::ConvertToVirCoord(logicalY);
-       }
-
        return E_SUCCESS;
 }
 
 result
-TextObject::GetBlockTextPositionInfoAt(int textIndex, float& width, float& height, float& absX, float& absY, float& logicalX, float& logicalY) const
-{
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight =  _CoordinateSystemUtils::ConvertToInteger(height);
-       int newAbsX = _CoordinateSystemUtils::ConvertToInteger(absX);
-       int newAbsY = _CoordinateSystemUtils::ConvertToInteger(absY);
-       int newLogicalX = _CoordinateSystemUtils::ConvertToInteger(logicalX);
-       int newLogicalY = _CoordinateSystemUtils::ConvertToInteger(logicalY);
-
-       result r = GetBlockTextPositionInfoAt(textIndex, newWidth, newHeight, newAbsX, newAbsY, newLogicalX, newLogicalY);
-
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newHeight);
-       absX = _CoordinateSystemUtils::ConvertToFloat(newAbsX);
-       absY = _CoordinateSystemUtils::ConvertToFloat(newAbsY);
-       logicalX = _CoordinateSystemUtils::ConvertToFloat(newLogicalX);
-       logicalY = _CoordinateSystemUtils::ConvertToFloat(newLogicalY);
-
-       return r;
-}
-
-result
 TextObject::SetTextObjectEllipsisType(TextObjectEllipsisType type)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
@@ -2732,28 +2462,33 @@ TextObject::NotifyTextDeleted(int textIndex, int textLength)
 result
 TextObject::DrawByLine(_CanvasImpl& canvasImpl, const Rectangle& displayRect)
 {
-       Rectangle targetBounds = displayRect;
-
-       return __pTextColumn->Draw(canvasImpl, targetBounds, 0, __pTextColumn->GetTextLength(), __align, __action);
+       return DrawByLine(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(displayRect));
 }
 
 result
 TextObject::DrawByLine(_CanvasImpl& canvasImpl, const FloatRectangle& displayRect)
 {
-       return DrawByLine(canvasImpl, _CoordinateSystemUtils::ConvertToInteger(displayRect));
+       FloatRectangle targetBounds = displayRect;
+
+       return __pTextColumn->Draw(canvasImpl, targetBounds, 0, __pTextColumn->GetTextLength(), __align, __action);
 }
 
 int
-TextObject::GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode) const
+TextObject::GetTextIndexFromPositionInWrap(int x, int y, bool cursorMode) const
+{
+       return GetTextIndexFromPositionInWrap(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode);
+}
+
+int
+TextObject::GetTextIndexFromPositionInWrap(float x, float y, bool cursorMode) const
 {
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
+       FloatRectangle lineBounds;
        int firstDisplayLineIndex = __pTextColumn->GetFirstDisplayLineIndex();
-       int firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
+       float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
        int lineCount = __pTextColumn->GetTotalLineCount();
        int lineIndex = 0;
-
-       int totalHeight = __pTextColumn->GetTotalHeight();
+       float totalHeight = __pTextColumn->GetTotalHeightF();
 
        switch (__align & TEXT_ALIGNMASK_VERT)
        {
@@ -2761,11 +2496,11 @@ TextObject::GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode) co
                break;
 
        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-               pcY -= (__pcRect.height - totalHeight) / 2;
+               y -= (__rect.height - totalHeight) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-               pcY -= (__pcRect.height - totalHeight);
+               y -= (__rect.height - totalHeight);
                break;
        }
 
@@ -2774,17 +2509,17 @@ TextObject::GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode) co
                pTextLine = __pTextColumn->GetTextLine(lineIndex);
                SysTryReturn(NID_GRP, pTextLine, -1, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
 
                if (lineIndex == firstDisplayLineIndex)
                {
-                       if (pcY < lineBounds.y - firstDisplayPositionY)
+                       if (y < lineBounds.y - firstDisplayPositionY)
                        {
                                return -1;
                        }
                }
 
-               if ((lineBounds.y - firstDisplayPositionY <= pcY) && (pcY < lineBounds.y + lineBounds.height - firstDisplayPositionY))
+               if ((lineBounds.y - firstDisplayPositionY <= y) && (y < lineBounds.y + lineBounds.height - firstDisplayPositionY))
                {
                        break;
                }
@@ -2814,20 +2549,20 @@ TextObject::GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode) co
                break;
 
        case TEXT_OBJECT_ALIGNMENT_CENTER:
-               pcX -= (lineBounds.width - lineTextSize.width) / 2;
+               x -= (lineBounds.width - lineTextSize.width) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-               pcX -= (lineBounds.width - lineTextSize.width);
+               x -= (lineBounds.width - lineTextSize.width);
                break;
        }
 
-       if (pcX < 0)
+       if (x < 0)
        {
-               pcX = 0;
+               x = 0;
        }
 
-       int index = pTextLine->GetTextIndexFromPosition(pcX, cursorMode);
+       int index = pTextLine->GetTextIndexFromPosition(x, cursorMode);
 
        SetLastResult(E_SUCCESS);
 
@@ -2835,16 +2570,16 @@ TextObject::GetTextIndexFromPositionInWrap(int pcX, int pcY, bool cursorMode) co
 }
 
 int
-TextObject::GetTextIndexFromPositionInWrap(float pcX, float pcY, bool cursorMode) const
+TextObject::GetTextIndexFromPositionInNoneWrap(int x, int y, bool cursorMode) const
 {
-       return GetTextIndexFromPositionInWrap(_CoordinateSystemUtils::ConvertToInteger(pcX), _CoordinateSystemUtils::ConvertToInteger(pcY), cursorMode);
+       return GetTextIndexFromPositionInNoneWrap(_CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), cursorMode);
 }
 
 int
-TextObject::GetTextIndexFromPositionInNoneWrap(int pcX, int pcY, bool cursorMode) const
+TextObject::GetTextIndexFromPositionInNoneWrap(float x, float y, bool cursorMode) const
 {
-       Dimension lineTextSize;
-       Rectangle lineBounds;
+       FloatDimension lineTextSize;
+       FloatRectangle lineBounds;
        int lineOffset = 0;
        int lineLength = 0;
        TextLine* pTextLine = null;
@@ -2854,7 +2589,7 @@ TextObject::GetTextIndexFromPositionInNoneWrap(int pcX, int pcY, bool cursorMode
 
        lineOffset = pTextLine->GetTextOffset();
        lineLength = pTextLine->GetTextLength();
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        switch (__align & TEXT_ALIGNMASK_HORIZ)
@@ -2863,11 +2598,11 @@ TextObject::GetTextIndexFromPositionInNoneWrap(int pcX, int pcY, bool cursorMode
                break;
 
        case TEXT_OBJECT_ALIGNMENT_CENTER:
-               pcX -= (lineBounds.width - lineTextSize.width) / 2;
+               x -= (lineBounds.width - lineTextSize.width) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_RIGHT:
-               pcX -= (lineBounds.width - lineTextSize.width);
+               x -= (lineBounds.width - lineTextSize.width);
                break;
        }
 
@@ -2877,42 +2612,36 @@ TextObject::GetTextIndexFromPositionInNoneWrap(int pcX, int pcY, bool cursorMode
                break;
 
        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-               pcY -= (__pcRect.height - lineTextSize.height) / 2;
+               y -= (__rect.height - lineTextSize.height) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-               pcY -= (__pcRect.height - lineTextSize.height);
+               y -= (__rect.height - lineTextSize.height);
                break;
        }
 
-       if (pcX < 0)
+       if (x < 0)
        {
-               pcX = 0;
+               x = 0;
        }
 
-       int index = pTextLine->GetTextIndexFromPosition(pcX, cursorMode);
+       int index = pTextLine->GetTextIndexFromPosition(x, cursorMode);
 
        SetLastResult(E_SUCCESS);
-       return index;
-}
-
-int
-TextObject::GetTextIndexFromPositionInNoneWrap(float pcX, float pcY, bool cursorMode) const
-{
-       return GetTextIndexFromPositionInNoneWrap(_CoordinateSystemUtils::ConvertToInteger(pcX), _CoordinateSystemUtils::ConvertToInteger(pcY), cursorMode);
+       return index;   
 }
 
 result
 TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
 {
        result r = E_SUCCESS;
-       Rectangle lineBounds;
-       int firstDisplayPositionY = 0;
+       FloatRectangle lineBounds;
+       float firstDisplayPositionY = 0;
        int currentTextIndex = textIndex;
        int firstDisplayLineIndex = 0;
        int lineIndex = 0;
        int lineCount = 0;
-       int remainingHeight = 0;
+       float remainingHeight = 0;
        TextLine* pTextLine = null;
        bool isChanged = false;
 
@@ -2929,7 +2658,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
        pTextLine = __pTextColumn->GetTextLine(lineIndex);
        SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
 
        if (firstDisplayLineIndex < lineIndex)
        {
@@ -2941,7 +2670,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
                pTextLine = __pTextColumn->GetTextLine(currentLineIndex);
                SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               remainingHeight = __pcRect.height;
+               remainingHeight = __rect.height;
 
                while ((remainingHeight != 0) && firstDisplayLineIndex < lineCount)
                {
@@ -2950,7 +2679,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
                                break;
                        }
 
-                       lineBounds = pTextLine->GetBounds();
+                       lineBounds = pTextLine->GetBoundsF();
 
                        remainingHeight -= lineBounds.height;
                        displayLineCount++;
@@ -2972,7 +2701,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
 
                                while (remainingHeight && pTextLine)
                                {
-                                       lineBounds = pTextLine->GetBounds();
+                                       lineBounds = pTextLine->GetBoundsF();
                                        remainingHeight -= lineBounds.height;
 
                                        if (remainingHeight < 0)
@@ -3000,8 +2729,8 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
                                pTextLine = __pTextColumn->GetTextLine(lineIndex);
                                SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-                               lineBounds = pTextLine->GetBounds();
-                               remainingHeight = __pcRect.height;
+                               lineBounds = pTextLine->GetBoundsF();
+                               remainingHeight = __rect.height;
 
                                firstDisplayLineIndex = lineIndex;
                                firstDisplayPositionY = lineBounds.y;
@@ -3012,7 +2741,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
 
                                while ((pTextLine != null) && 0 < firstDisplayLineIndex && 0 < remainingHeight)
                                {
-                                       lineBounds = pTextLine->GetBounds();
+                                       lineBounds = pTextLine->GetBoundsF();
 
                                        if (remainingHeight < lineBounds.height)
                                        {
@@ -3037,9 +2766,9 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
                        pTextLine = __pTextColumn->GetTextLine(lineIndex);
                        SysTryReturn(NID_GRP, pTextLine, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-                       lineBounds = pTextLine->GetBounds();
+                       lineBounds = pTextLine->GetBoundsF();
 
-                       remainingHeight = __pcRect.height;
+                       remainingHeight = __rect.height;
 
                        firstDisplayLineIndex = lineIndex;
                        firstDisplayPositionY = lineBounds.y;
@@ -3050,7 +2779,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
 
                        while (pTextLine && 0 < firstDisplayLineIndex && 0 < remainingHeight)
                        {
-                               lineBounds = pTextLine->GetBounds();
+                               lineBounds = pTextLine->GetBoundsF();
 
                                if (remainingHeight < lineBounds.height)
                                {
@@ -3072,7 +2801,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInWrap(int textIndex)
        }
        else
        {
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                firstDisplayLineIndex = lineIndex;
                firstDisplayPositionY = lineBounds.y;
                isChanged = true;
@@ -3095,10 +2824,10 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex)
        int lineOffset = 0;
        int lineEndIndex = 0;
        int lineLength = 0;
-       Rectangle lineBounds;
-       Dimension lineTextSize;
+       FloatRectangle lineBounds;
+       FloatDimension lineTextSize;
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+       _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
        SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
        TextLine* pTextLine = __pTextColumn->GetTextLine(0);
@@ -3108,7 +2837,7 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex)
        lineLength = pTextLine->GetTextLength();
        lineEndIndex = pTextLine->GetTextOffset() + pTextLine->GetTextLength();
 
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        if (currentTextIndex < pTextLine->GetTextOffset() + 1)
@@ -3125,10 +2854,10 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex)
                __pCompositeText->ForwardAnalyze(lineOffset, __pCompositeText->GetTextLength() - lineOffset, lineBounds.width,
                                                                                __wrap, lineLength, lineTextSize.width, lineTextSize.height);
 
-               lineBounds.height = Math::Max(lineBounds.height, lineTextSize.height);
+               lineBounds.height = (lineBounds.height > lineTextSize.height) ? lineBounds.height : lineTextSize.height;
                if (lineBounds.height == 0)
                {
-                       lineBounds.height = TextUtility::GetFontMaxHeight(pFont);
+                       lineBounds.height = TextUtility::GetFontMaxHeightF(pFont);
                }
 
                pTextLine->SetBounds(lineBounds);
@@ -3138,10 +2867,10 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex)
        }
        else if (lineEndIndex <= currentTextIndex)
        {
-               int gapWidth = 0;
-               int gapHeight = 0;
+               float gapWidth = 0;
+               float gapHeight = 0;
+               float tempWidth = 0;            
                int textCount = 0;
-               int tempWidth = 0;
 
                r = __pCompositeText->GetRegion(lineEndIndex, currentTextIndex - lineEndIndex, gapWidth, gapHeight);
                SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
@@ -3163,10 +2892,10 @@ TextObject::SetFirstDisplayLineIndexFromTextIndexInNoneWrap(int textIndex)
                __pCompositeText->ForwardAnalyze(lineOffset, __pCompositeText->GetTextLength() - lineOffset, lineBounds.width,
                                                                                __wrap, lineLength, lineTextSize.width, lineTextSize.height);
 
-               lineBounds.height = Math::Max(lineBounds.height, lineTextSize.height);
+               lineBounds.height = (lineBounds.height > lineTextSize.height) ? lineBounds.height: lineTextSize.height;
                if (lineBounds.height == 0)
                {
-                       lineBounds.height = TextUtility::GetFontMaxHeight(pFont);
+                       lineBounds.height = TextUtility::GetFontMaxHeightF(pFont);
                }
 
                pTextLine->SetBounds(lineBounds);
@@ -3186,19 +2915,43 @@ result
 TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY,
                                                                                                                                        int& logicalX, int& logicalY) const
 {
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF =  _CoordinateSystemUtils::ConvertToFloat(height);
+       float absXF = _CoordinateSystemUtils::ConvertToFloat(absX);
+       float absYF = _CoordinateSystemUtils::ConvertToFloat(absY);
+       float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX);
+       float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY);
+
+       result r = GetTextPositionInfoInWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       absX = _CoordinateSystemUtils::ConvertToInteger(absXF);
+       absY = _CoordinateSystemUtils::ConvertToInteger(absYF);
+       logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF);
+       logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF);
+
+       return E_SUCCESS;
+}
+
+result
+TextObject::GetTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
+                                                                                                                                       float& logicalX, float& logicalY) const
+{
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
-       int firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
+       FloatRectangle lineBounds;
+       float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
        int lineCount = __pTextColumn->GetTotalLineCount();
        int lineIndex = 0;
        int lineOffset = 0;
        int lineLength = 0;
        int textIndexFromLineOffset = 0;
-       int lineY = 0;
-       int posX = 0;
-       int posY = 0;
+       float lineY = 0;
+       float posX = 0;
+       float posY = 0;
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+       _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
        SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
        for (lineIndex = 0; lineIndex < lineCount; lineIndex++)
@@ -3206,7 +2959,7 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
                pTextLine = __pTextColumn->GetTextLine(lineIndex);
                SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                lineOffset = pTextLine->GetTextOffset();
                lineLength = pTextLine->GetTextLength();
 
@@ -3232,12 +2985,12 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
                textIndexFromLineOffset = textIndex - lineOffset;
        }
 
-       Dimension lineTextSize;
+       FloatDimension lineTextSize;
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        if (lineTextSize.height == 0)
        {
-               lineTextSize.height = TextUtility::GetFontMaxHeight(pFont);
+               lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont);
        }
 
        switch (__align & TEXT_ALIGNMASK_HORIZ)
@@ -3260,11 +3013,11 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
                break;
 
        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-               posY += (__pcRect.height - __pTextColumn->GetDisplayHeight()) / 2;
+               posY += (__rect.height - __pTextColumn->GetDisplayHeightF()) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-               posY += (__pcRect.height - __pTextColumn->GetDisplayHeight());
+               posY += (__rect.height - __pTextColumn->GetDisplayHeightF());
                break;
        }
 
@@ -3278,7 +3031,7 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
                posY = 0;
        }
 
-       Rectangle textExtent = pTextLine->GetTextExtent(textIndexFromLineOffset, 1);
+       FloatRectangle textExtent = pTextLine->GetTextExtentF(textIndexFromLineOffset, 1);
 
        if (lineIndex == lineCount)
        {
@@ -3288,12 +3041,12 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
        if (textIndex >= 1)
        {
                Font* pTextFont = __pCompositeText->GetFont(textIndex - 1);
-               textExtent.height = TextUtility::GetFontMaxHeight(pTextFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont);
        }
 
        if (textExtent.height < 0)
        {
-               textExtent.height = TextUtility::GetFontMaxHeight(pFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pFont);
        }
 
        TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment();
@@ -3316,53 +3069,54 @@ TextObject::GetTextPositionInfoInWrapAt(int textIndex, int& width, int& height,
        width =  textExtent.width;
        height =  textExtent.height;
        absX = posX + textExtent.x;
-       logicalX = absX + __pcRect.x;
+       logicalX = absX + __rect.x;
        absY = lineY;
-       logicalY = absY - firstDisplayPositionY + __pcRect.y + posY;
+       logicalY = absY - firstDisplayPositionY + __rect.y + posY;
 
        return E_SUCCESS;
 }
 
 result
-TextObject::GetTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
-                                                                                                                                       float& logicalX, float& logicalY) const
+TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY,
+                                                                                                                                       int& logicalX, int& logicalY) const
 {
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight =  _CoordinateSystemUtils::ConvertToInteger(height);
-       int newAbsX = _CoordinateSystemUtils::ConvertToInteger(absX);
-       int newAbsY = _CoordinateSystemUtils::ConvertToInteger(absY);
-       int newLogicalX = _CoordinateSystemUtils::ConvertToInteger(logicalX);
-       int newLogicalY = _CoordinateSystemUtils::ConvertToInteger(logicalY);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF =  _CoordinateSystemUtils::ConvertToFloat(height);
+       float absXF = _CoordinateSystemUtils::ConvertToFloat(absX);
+       float absYF = _CoordinateSystemUtils::ConvertToFloat(absY);
+       float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX);
+       float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY);
 
-       result r = GetTextPositionInfoInWrapAt(textIndex, newWidth, newHeight, newAbsX, newAbsY, newLogicalX, newLogicalY);
+       result r = GetBlockTextPositionInfoInWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newHeight);
-       absX = _CoordinateSystemUtils::ConvertToFloat(newAbsX);
-       absY = _CoordinateSystemUtils::ConvertToFloat(newAbsY);
-       logicalX = _CoordinateSystemUtils::ConvertToFloat(newLogicalX);
-       logicalY = _CoordinateSystemUtils::ConvertToFloat(newLogicalY);
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       absX = _CoordinateSystemUtils::ConvertToInteger(absXF);
+       absY = _CoordinateSystemUtils::ConvertToInteger(absYF);
+       logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF);
+       logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF);
 
-       return r;
+       return E_SUCCESS;
 }
 
 result
-TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& height, int& absX, int& absY,
-                                                                                                                                       int& logicalX, int& logicalY) const
+TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
+                                                                                                                                       float& logicalX, float& logicalY) const
 {
        TextLine* pTextLine = null;
-       Rectangle lineBounds;
-       int firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
+       FloatRectangle lineBounds;
+       float firstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionYF();
        int lineCount = __pTextColumn->GetTotalLineCount();
        int lineIndex = 0;
        int lineOffset = 0;
        int lineLength = 0;
        int textIndexFromLineOffset = 0;
-       int lineY = 0;
-       int posX = 0;
-       int posY = 0;
+       float lineY = 0;
+       float posX = 0;
+       float posY = 0;
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+       _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
        SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
        for (lineIndex = 0; lineIndex < lineCount; lineIndex++)
@@ -3370,7 +3124,7 @@ TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& hei
                pTextLine = __pTextColumn->GetTextLine(lineIndex);
                SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-               lineBounds = pTextLine->GetBounds();
+               lineBounds = pTextLine->GetBoundsF();
                lineOffset = pTextLine->GetTextOffset();
                lineLength = pTextLine->GetTextLength();
 
@@ -3424,11 +3178,11 @@ TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& hei
                break;
 
        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-               posY += (__pcRect.height - __pTextColumn->GetDisplayHeight()) / 2;
+               posY += (__rect.height - __pTextColumn->GetDisplayHeight()) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-               posY += (__pcRect.height - __pTextColumn->GetDisplayHeight());
+               posY += (__rect.height - __pTextColumn->GetDisplayHeight());
                break;
        }
 
@@ -3442,7 +3196,7 @@ TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& hei
                posY = 0;
        }
 
-       Rectangle textExtent = pTextLine->GetBlockTextExtent(textIndexFromLineOffset, 1);
+       FloatRectangle textExtent = pTextLine->GetBlockTextExtentF(textIndexFromLineOffset, 1);
 
        if (lineIndex == lineCount)
        {
@@ -3452,12 +3206,12 @@ TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& hei
        if (textIndex >= 1)
        {
                Font* pTextFont = __pCompositeText->GetFont(textIndex - 1);
-               textExtent.height = TextUtility::GetFontMaxHeight(pTextFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont);
        }
 
        if (textExtent.height < 0)
        {
-               textExtent.height = TextUtility::GetFontMaxHeight(pFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pFont);
        }
 
        TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment();
@@ -3480,59 +3234,60 @@ TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, int& width, int& hei
        width =  textExtent.width;
        height =  textExtent.height;
        absX = posX + textExtent.x;
-       logicalX = absX + __pcRect.x;
+       logicalX = absX + __rect.x;
        absY = lineY;
-       logicalY = absY - firstDisplayPositionY + __pcRect.y + posY;
+       logicalY = absY - firstDisplayPositionY + __rect.y + posY;
 
        return E_SUCCESS;
 }
 
 result
-TextObject::GetBlockTextPositionInfoInWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
-                                                                                                                                       float& logicalX, float& logicalY) const
+TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& height, int& absX, int& absY,
+                                                                                                                               int& logicalX, int& logicalY) const
 {
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight =  _CoordinateSystemUtils::ConvertToInteger(height);
-       int newAbsX = _CoordinateSystemUtils::ConvertToInteger(absX);
-       int newAbsY = _CoordinateSystemUtils::ConvertToInteger(absY);
-       int newLogicalX = _CoordinateSystemUtils::ConvertToInteger(logicalX);
-       int newLogicalY = _CoordinateSystemUtils::ConvertToInteger(logicalY);
+       float widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       float heightF =  _CoordinateSystemUtils::ConvertToFloat(height);
+       float absXF = _CoordinateSystemUtils::ConvertToFloat(absX);
+       float absYF = _CoordinateSystemUtils::ConvertToFloat(absY);
+       float logicalXF = _CoordinateSystemUtils::ConvertToFloat(logicalX);
+       float logicalYF = _CoordinateSystemUtils::ConvertToFloat(logicalY);
 
-       result r = GetBlockTextPositionInfoInWrapAt(textIndex, newWidth, newHeight, newAbsX, newAbsY, newLogicalX, newLogicalY);
+       result r = GetTextPositionInfoInNoneWrapAt(textIndex, widthF, heightF, absXF, absYF, logicalXF, logicalYF);
+       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newHeight);
-       absX = _CoordinateSystemUtils::ConvertToFloat(newAbsX);
-       absY = _CoordinateSystemUtils::ConvertToFloat(newAbsY);
-       logicalX = _CoordinateSystemUtils::ConvertToFloat(newLogicalX);
-       logicalY = _CoordinateSystemUtils::ConvertToFloat(newLogicalY);
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+       absX = _CoordinateSystemUtils::ConvertToInteger(absXF);
+       absY = _CoordinateSystemUtils::ConvertToInteger(absYF);
+       logicalX = _CoordinateSystemUtils::ConvertToInteger(logicalXF);
+       logicalY = _CoordinateSystemUtils::ConvertToInteger(logicalYF);
 
-       return r;
+       return E_SUCCESS;
 }
 
 result
-TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& height, int& absX, int& absY,
-                                                                                                                               int& logicalX, int& logicalY) const
+TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
+                                                                                                                               float& logicalX, float& logicalY) const
 {
        TextLine* pTextLine = null;
        pTextLine = __pTextColumn->GetTextLine(0);
        SysTryReturn(NID_GRP, pTextLine, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        int lineLength = pTextLine->GetTextLength();
-       int posX = 0;
-       int posY = 0;
+       float posX = 0;
+       float posY = 0;
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*__pDefaultFont));
+       _FontImpl* pFont = _FontImpl::GetInstance(*__pDefaultFont);
        SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
-       Dimension lineTextSize;
-       Rectangle lineBounds;
-       lineBounds = pTextLine->GetBounds();
+       FloatDimension lineTextSize;
+       FloatRectangle lineBounds;
+       lineBounds = pTextLine->GetBoundsF();
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
 
        if (lineTextSize.height == 0 || pTextLine->GetTextLength() == 0)
        {
-               lineTextSize.height = TextUtility::GetFontMaxHeight(pFont);
+               lineTextSize.height = TextUtility::GetFontMaxHeightF(pFont);
        }
 
        switch (__align & TEXT_ALIGNMASK_HORIZ)
@@ -3555,28 +3310,28 @@ TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& heig
                break;
 
        case TEXT_OBJECT_ALIGNMENT_MIDDLE:
-               posY += (__pcRect.height - lineTextSize.height) / 2;
+               posY += (__rect.height - lineTextSize.height) / 2;
                break;
 
        case TEXT_OBJECT_ALIGNMENT_BOTTOM:
-               posY += (__pcRect.height - lineTextSize.height);
+               posY += (__rect.height - lineTextSize.height);
                break;
        }
 
        posX = (posX < 0) ? 0 : posX;
        posY = (posY < 0) ? 0 : posY;
 
-       Rectangle textExtent = pTextLine->GetTextExtent(textIndex - pTextLine->GetTextOffset(), 1);
+       FloatRectangle textExtent = pTextLine->GetTextExtentF(textIndex - pTextLine->GetTextOffset(), 1);
 
        if (textIndex >= 1)
        {
                Font* pTextFont = __pCompositeText->GetFont(textIndex - 1);
-               textExtent.height = TextUtility::GetFontMaxHeight(pTextFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pTextFont);
        }
 
        if (textExtent.height < 0)
        {
-               textExtent.height = TextUtility::GetFontMaxHeight(pFont);
+               textExtent.height = TextUtility::GetFontMaxHeightF(pFont);
        }
 
        TextObjectAlignment alignment = __pCompositeText->GetElementVerticalAlignment();
@@ -3597,38 +3352,15 @@ TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, int& width, int& heig
        }
 
        absX = posX + textExtent.x;
-       logicalX = (absX >= 0) ? absX + __pcRect.x : absX;
+       logicalX = (absX >= 0) ? absX + __rect.x : absX;
        absY = posY;
-       logicalY = absY + __pcRect.y;
+       logicalY = absY + __rect.y;
        width = textExtent.width;
        height = textExtent.height;
 
        return E_SUCCESS;
 }
 
-result
-TextObject::GetTextPositionInfoInNoneWrapAt(int textIndex, float& width, float& height, float& absX, float& absY,
-                                                                                                                               float& logicalX, float& logicalY) const
-{
-       int newWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int newHeight =  _CoordinateSystemUtils::ConvertToInteger(height);
-       int newAbsX = _CoordinateSystemUtils::ConvertToInteger(absX);
-       int newAbsY = _CoordinateSystemUtils::ConvertToInteger(absY);
-       int newLogicalX = _CoordinateSystemUtils::ConvertToInteger(logicalX);
-       int newLogicalY = _CoordinateSystemUtils::ConvertToInteger(logicalY);
-
-       result r = GetTextPositionInfoInNoneWrapAt(textIndex, newWidth, newHeight, newAbsX, newAbsY, newLogicalX, newLogicalY);
-
-       width = _CoordinateSystemUtils::ConvertToFloat(newWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(newHeight);
-       absX = _CoordinateSystemUtils::ConvertToFloat(newAbsX);
-       absY = _CoordinateSystemUtils::ConvertToFloat(newAbsY);
-       logicalX = _CoordinateSystemUtils::ConvertToFloat(newLogicalX);
-       logicalY = _CoordinateSystemUtils::ConvertToFloat(newLogicalY);
-
-       return r;
-}
-
 int
 TextObject::GetTotalComposedHeight(void) const
 {
@@ -3644,62 +3376,55 @@ TextObject::GetTotalComposedHeightF(void) const
 int
 TextObject::GetLineWidthAt(int lineIndex) const
 {
+       return _CoordinateSystemUtils::ConvertToInteger(GetLineWidthAtF(lineIndex));
+}
+
+float
+TextObject::GetLineWidthAtF(int lineIndex) const
+{
        IF_NOT_CONSTRUCTED(return -1);
 
        result r = E_SUCCESS;
        TextLine* pTextLine = null;
-       Dimension lineTextSize;
+       FloatDimension lineTextSize;
        int lineLength = 0;
-       int pcWidth = 0;
-       int lcWidth = 0;
 
        pTextLine = __pTextColumn->GetTextLine(lineIndex);
        SysTryCatch(NID_GRP, pTextLine, , E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        lineLength = pTextLine->GetTextLength();
        r = pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
-       SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-       pcWidth = lineTextSize.width;
-       lcWidth = _Text::ConvertToVirCoord(pcWidth);
+       SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        SetLastResult(E_SUCCESS);
-       return lcWidth;
+       return lineTextSize.width;
 
 CATCH:
-       return -1;
+       return -1;      
 }
 
-float
-TextObject::GetLineWidthAtF(int lineIndex) const
+int
+TextObject::GetTotalHeight(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetLineWidthAt(lineIndex));
+       return _CoordinateSystemUtils::ConvertToInteger(GetTotalHeightF());
 }
 
-int
-TextObject::GetTotalHeight(void) const
+float
+TextObject::GetTotalHeightF(void) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
-       int pcHeight = 0;
+       float height = 0;
        if (IsPartialComposingModeEnabled())
        {
-               pcHeight = __pCompositeText->GetAnalysedTotalHeight();
+               height = __pCompositeText->GetAnalysedTotalHeightF();
        }
        else
        {
-               pcHeight = __pTextColumn->GetTotalHeight();
+               height = __pTextColumn->GetTotalHeightF();
        }
 
-       int lcHeight = _Text::ConvertToVirCoord(pcHeight);
-
-       return lcHeight;
-}
-
-float
-TextObject::GetTotalHeightF(void) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetTotalHeight());
+       return height;
 }
 
 int
@@ -3743,19 +3468,15 @@ TextObject::GetSlidingStep(void) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
-       int lcSlidingStep = _Text::ConvertToVirCoord(__slidingStep);
-
-       return lcSlidingStep;
+       return __slidingStep;
 }
 
 result
-TextObject::SetSlidingStep(int lcSlidingStep)
+TextObject::SetSlidingStep(int slidingStep)
 {
        IF_NOT_CONSTRUCTED(return E_INVALID_STATE);
 
-       int pcSlidingStep = _Text::ConvertToPhyCoord(lcSlidingStep);
-
-       __slidingStep = pcSlidingStep;
+       __slidingStep = slidingStep;
 
        return E_SUCCESS;
 }
@@ -3778,22 +3499,19 @@ TextObject::GetLineIndexAtTextIndex(int textIndex)  const
 
 int
 TextObject::GetLineHeightAt(int lineIndex)  const
+{      
+       return _CoordinateSystemUtils::ConvertToInteger(GetLineHeightAtF(lineIndex));
+}
+
+float
+TextObject::GetLineHeightAtF(int lineIndex) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
        SysTryReturn(NID_GRP, lineIndex >= 0, -1, E_INVALID_ARG
                        , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
 
-       int pcHeight = __pTextColumn->GetLineHeightAt(lineIndex);
-       int lcHeight = _Text::ConvertToVirCoord(pcHeight);
-
-       return lcHeight;
-}
-
-float
-TextObject::GetLineHeightAtF(int lineIndex) const
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetLineHeightAt(lineIndex));
+       return __pTextColumn->GetLineHeightAtF(lineIndex);
 }
 
 int
@@ -3815,34 +3533,29 @@ TextObject::GetFirstDisplayLineIndex(void) const
 int
 TextObject::GetFirstDisplayPositionY(void) const
 {
-       IF_NOT_CONSTRUCTED(return -1);
-
-       int pcFirstDisplayPositionY = __pTextColumn->GetFirstDisplayPositionY();
-       int lcFirstDisplayPositionY = _Text::ConvertToVirCoord(pcFirstDisplayPositionY);
-
-       return lcFirstDisplayPositionY;
+       return _CoordinateSystemUtils::ConvertToInteger(GetFirstDisplayPositionYF());
 }
 
 float
 TextObject::GetFirstDisplayPositionYF(void) const
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetFirstDisplayPositionY());
+       IF_NOT_CONSTRUCTED(return -1);
+
+       return __pTextColumn->GetFirstDisplayPositionYF();
 }
 
 int
-TextObject::GetLineIndexAtPositionY(int lcY) const
+TextObject::GetLineIndexAtPositionY(int y) const
 {
-       IF_NOT_CONSTRUCTED(return -1);
-
-       int pcY = _Text::ConvertToPhyCoord(lcY);
-
-       return __pTextColumn->GetLineIndexAtPositionY(pcY);
+       return GetLineIndexAtPositionY(_CoordinateSystemUtils::ConvertToFloat(y));
 }
 
 int
-TextObject::GetLineIndexAtPositionY(float lcY) const
+TextObject::GetLineIndexAtPositionY(float y) const
 {
-       return GetLineIndexAtPositionY(_CoordinateSystemUtils::ConvertToInteger(lcY));
+       IF_NOT_CONSTRUCTED(return -1);
+
+       return __pTextColumn->GetLineIndexAtPositionY(y);
 }
 
 int
@@ -3872,7 +3585,7 @@ TextObject::GetBounds(void) const
 {
        IF_NOT_CONSTRUCTED(return Rectangle(0,0,0,0));
 
-       return __rect;
+       return _CoordinateSystemUtils::ConvertToInteger(__rect);
 }
 
 FloatRectangle
@@ -3886,10 +3599,7 @@ TextObject::GetLineSpace(void) const
 {
        IF_NOT_CONSTRUCTED(return -1);
 
-       int pcLineSpacing = __pCompositeText->GetLineSpace();
-       int lcLineSpacing = _Text::ConvertToVirCoord(pcLineSpacing);
-
-       return lcLineSpacing;
+       return __pCompositeText->GetLineSpace();
 }
 
 float
@@ -4278,45 +3988,51 @@ TextObject::GetTextLengthAtLine(int lineIndex) const
 Rectangle
 TextObject::GetBoundsAtLine(int lineIndex) const
 {
-       IF_NOT_CONSTRUCTED(return Rectangle(-1, -1, -1, -1));
+       return _CoordinateSystemUtils::ConvertToInteger(GetBoundsAtLineF(lineIndex));
+}
+
+FloatRectangle
+TextObject::GetBoundsAtLineF(int lineIndex) const
+{
+       IF_NOT_CONSTRUCTED(return FloatRectangle(-1, -1, -1, -1));
 
-       SysTryReturn(NID_GRP, lineIndex >= 0, Rectangle(-1, -1, -1, -1), E_INVALID_ARG
+       SysTryReturn(NID_GRP, lineIndex >= 0, FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG
                        , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
 
        TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex);
-       SysTryReturn(NID_GRP, pTextLine, Rectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, FloatRectangle(-1, -1, -1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
-       Rectangle lineBounds = pTextLine->GetBounds();
+       FloatRectangle lineBounds = pTextLine->GetBoundsF();
 
-       return lineBounds;
+       return lineBounds;      
 }
 
-FloatRectangle
-TextObject::GetBoundsAtLineF(int lineIndex) const
+Point
+TextObject::GetDisplayPositionAtLine(int lineIndex, int textIndexFromLineOffset)
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetBoundsAtLine(lineIndex));
+       return _CoordinateSystemUtils::ConvertToInteger(GetDisplayPositionAtLineF(lineIndex, textIndexFromLineOffset));
 }
 
-Point
-TextObject::GetDisplayPositionAtLine(int lineIndex, int textIndexFromLineOffset)
+FloatPoint
+TextObject::GetDisplayPositionAtLineF(int lineIndex, int textIndexFromLineOffset)
 {
-       IF_NOT_CONSTRUCTED(return Point(-1, -1));
+       IF_NOT_CONSTRUCTED(return FloatPoint(-1.0f, -1.0f));
 
-       SysTryReturn(NID_GRP, lineIndex >= 0, Point(-1, -1), E_INVALID_ARG
+       SysTryReturn(NID_GRP, lineIndex >= 0, FloatPoint(-1.0f, -1.0f), E_INVALID_ARG
                        , "[E_INVALID_ARG] The argument is invalid. (lineIndex = %d)", lineIndex);
 
        TextLine* pTextLine = __pTextColumn->GetTextLine(lineIndex);
-       SysTryReturn(NID_GRP, pTextLine, Point(-1, -1), E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
+       SysTryReturn(NID_GRP, pTextLine, FloatPoint(-1.0f, -1.0f), E_SYSTEM, "[E_SYSTEM] Fail to get text line.");
 
        int lineOffset = pTextLine->GetTextOffset();
        int lineLength = pTextLine->GetTextLength();
-       Dimension lineTextSize;
-       Dimension extentDim;
+       FloatDimension lineTextSize;
+       FloatDimension extentDim;
+       FloatRectangle lineBounds;
        int textCount = 0;
-       Rectangle lineBounds;
 
        pTextLine->GetRegion(0, lineLength, lineTextSize.width, lineTextSize.height);
-       lineBounds = pTextLine->GetBounds();
+       lineBounds = pTextLine->GetBoundsF();
 
        __pCompositeText->ForwardAnalyze(lineOffset, textIndexFromLineOffset, lineTextSize.width, __wrap, textCount, extentDim.width, extentDim.height);
 
@@ -4334,18 +4050,12 @@ TextObject::GetDisplayPositionAtLine(int lineIndex, int textIndexFromLineOffset)
                break;
        }
 
-       if (extentDim.width < 0)
+       if (extentDim.width < 0.0f)
        {
-               extentDim.width = 0;
+               extentDim.width = 0.0f;
        }
 
-       return Point(extentDim.width + __rect.x, lineBounds.y - __pTextColumn->GetFirstDisplayPositionY() + __rect.y);
-}
-
-FloatPoint
-TextObject::GetDisplayPositionAtLineF(int lineIndex, int textIndexFromLineOffset)
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetDisplayPositionAtLine(lineIndex, textIndexFromLineOffset));
+       return FloatPoint(extentDim.width + __rect.x, lineBounds.y - __pTextColumn->GetFirstDisplayPositionYF() + __rect.y);
 }
 
 Tizen::Base::String
index 3ab22cf..e20979e 100644 (file)
@@ -29,8 +29,6 @@
 #include "FGrp_TextTextUtility.h"
 #include "FGrp_FontImpl.h"
 #include "../FGrp_BitmapUtil.h"
-#include "../FGrp_Font.h"
-#include "../FGrp_Canvas.h"
 #include "FGrp_CoordinateSystemUtils.h"
 
 #include <fribidi.h>
@@ -125,6 +123,22 @@ int
 TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, TextObjectWrapType wrap, int& actualLength,
                                                        int& width, int& height)
 {
+       int maxWidthF = _CoordinateSystemUtils::ConvertToFloat(maxWidth);
+       int widthF = _CoordinateSystemUtils::ConvertToFloat(width);
+       int heightF = _CoordinateSystemUtils::ConvertToFloat(height);
+
+       int r = ForwardAnalyze(startTextIndex, textLength, maxWidthF, wrap, actualLength, widthF, heightF);
+
+       width = _CoordinateSystemUtils::ConvertToInteger(widthF);
+       height = _CoordinateSystemUtils::ConvertToInteger(heightF);
+
+       return r;
+}
+
+int
+TextSimple::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
+                                               int& actualLength, float& width, float& height)
+{
        int charCount = 0;
        int r = TEXT_RETBY_NORMAL;
 
@@ -175,8 +189,8 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
        }
 
        Font* pCurrentFont = GetCurrentFont();
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*pCurrentFont));
-       SysTryReturn(NID_GRP, pFont, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont);
+       SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
        const wchar_t* pText = &_pText[startTextIndex];
 
@@ -192,7 +206,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
                        int length = ConvertEnterToSpace(pModifiedText, pText, textLength);
                        pModifiedText[length] = 0;
 
-                       actualLength = TextUtility::GetCharCountInWidth(pFont, pModifiedText, length, maxWidth, _outline, width, height);
+                       actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pModifiedText, length, maxWidth, _outline, width, height);
 
                        charCount = textLength;
                        r = TEXT_RETBY_NORMAL;
@@ -202,7 +216,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
                }
                else
                {
-                       actualLength = TextUtility::GetCharCountInWidth(pFont, pText, textLength, maxWidth, _outline, width, height);
+                       actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, textLength, maxWidth, _outline, width, height);
                        charCount = textLength;
                        r = TEXT_RETBY_NORMAL;
                }
@@ -211,7 +225,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
 
        case TEXT_OBJECT_WRAP_TYPE_CHARACTER:
                r = GetSentenceLength(pText, textLength, charCount);
-               actualLength = TextUtility::GetCharCountInWidth(pFont, pText, charCount, maxWidth, _outline, width, height);
+               actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height);
                if (_pText[startTextIndex + actualLength] == TEXT_LINE_FEED || _pText[startTextIndex + actualLength] == TEXT_CARRIAGE_RETURN)
                {
                        (actualLength)++;
@@ -235,7 +249,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
 
                                if (charCount != 0)
                                {
-                                       actualLength = TextUtility::GetCharCountInWidth(pFont, pText, charCount, maxWidth, _outline, width, height);
+                                       actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height);
                                        actualLength = charCount;
                                }
                        }
@@ -244,7 +258,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
                break;
 
        case TEXT_OBJECT_WRAP_TYPE_WORD:
-               actualLength = TextUtility::GetCharCountInWidth(pFont, pText, textLength, maxWidth, _outline, width, height);
+               actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, textLength, maxWidth, _outline, width, height);
                int widthcheck = width;
 
                if (_pText[startTextIndex + actualLength] == TEXT_LINE_FEED || _pText[startTextIndex + actualLength] == TEXT_CARRIAGE_RETURN)
@@ -276,13 +290,13 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
                                if (charCount > (actualLength / 2))
                                {
                                        const wchar_t* pExtraText = &_pText[startTextIndex + charCount];
-                                       int overCharCount = TextUtility::GetCharCountInWidth(pFont, pExtraText, actualLength - charCount, maxWidth, _outline, width, height);
+                                       int overCharCount = TextUtility::GetCharCountInWidth(pFontImpl, pExtraText, actualLength - charCount, maxWidth, _outline, width, height);
                                        actualLength = actualLength - overCharCount;
                                        width = widthcheck - width;
                                }
                                else
                                {
-                                       actualLength = TextUtility::GetCharCountInWidth(pFont, pText, charCount, maxWidth, _outline, width, height);
+                                       actualLength = TextUtility::GetCharCountInWidth(pFontImpl, pText, charCount, maxWidth, _outline, width, height);
                                }
 
                                actualLength = charCount;
@@ -294,7 +308,7 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
 
        if (height == 0 && (textLength > 0))
        {
-               height = pFont->GetLeading().ToInt();
+               height = pFontImpl->GetLeading();
        }
 
        if (actualLength < charCount)
@@ -305,19 +319,6 @@ TextSimple::ForwardAnalyze(int startTextIndex, int textLength, int maxWidth, Tex
        return r;
 }
 
-int
-TextSimple::ForwardAnalyze(int startTextIndex, int textLength, float maxWidth, TextObjectWrapType wrap,
-                                               int& actualLength, float& width, float& height)
-{
-       int iMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       int r = ForwardAnalyze(startTextIndex, textLength, iMaxWidth, wrap, actualLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
 bool
 TextSimple::IsKorean(const wchar_t* ch) const
 {
@@ -378,96 +379,26 @@ TextSimple::IsChinese(const wchar_t* ch) const
 result
 TextSimple::GetRegion(int textIndex, int textLength, int& width, int& height) const
 {
-       const wchar_t* pText = null;
-       Font* pCurrentFont = GetCurrentFont();
-       SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
+       float widthF = _CoordinateSystemUtils::ConvertToInteger(width);
+       float heightF = _CoordinateSystemUtils::ConvertToInteger(height);
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*pCurrentFont));
-       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       result r = GetRegion(textIndex, textLength, widthF, heightF);
 
-       if (textLength > _length)
-       {
-               textLength = _length;
-       }
+       width = _CoordinateSystemUtils::ConvertToFloat(widthF);
+       height = _CoordinateSystemUtils::ConvertToFloat(heightF);
 
-       if (textLength == 0)
-       {
-               width = 0;
-               height = 0;
-
-               return E_SUCCESS;
-       }
-
-       if (__bitmapProperty.pBitmap)
-       {
-               if (__bitmapProperty.displayEnable)
-               {
-                       width = __bitmapProperty.pBitmap->GetWidth();
-                       height = __bitmapProperty.pBitmap->GetHeight();
-               }
-               else
-               {
-                       width = 0;
-                       height = 0;
-               }
-
-               return E_SUCCESS;
-       }
-
-       pText = &_pText[textIndex];
-
-       switch (_userWrap)
-       {
-       case TEXT_OBJECT_WRAP_TYPE_NONE:
-       {
-               wchar_t* pModifiedText = new (std::nothrow) wchar_t[textLength + 1];
-               SysTryReturn(NID_GRP, pModifiedText, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
-
-               int length = ConvertEnterToSpace(pModifiedText, pText, textLength);
-               pModifiedText[textLength] = 0;
-
-               TextUtility::GetTextExtent(pFont, pModifiedText, length, _outline, width, height);
-
-               delete[] pModifiedText;
-               pModifiedText = null;
-       }
-       break;
-
-       case TEXT_OBJECT_WRAP_TYPE_CHARACTER:
-               // fall through
-       case TEXT_OBJECT_WRAP_TYPE_WORD:
-               TextUtility::GetTextExtent(pFont, pText, textLength, _outline, width, height);
-               break;
-       }
-
-       if (height == 0 && (textLength > 0))
-       {
-               height = pFont->GetLeading().ToInt();
-       }
-
-       return E_SUCCESS;
-}
-
-result
-TextSimple::GetRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       result r = GetRegion(textIndex, textLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
        return r;
 }
 
 result
-TextSimple::GetBlockRegion(int textIndex, int textLength, int& width, int& height) const
+TextSimple::GetRegion(int textIndex, int textLength, float& width, float& height) const
 {
        const wchar_t* pText = null;
        Font* pCurrentFont = GetCurrentFont();
        SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*pCurrentFont));
-       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont);
+       SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
        if (textLength > _length)
        {
@@ -510,7 +441,7 @@ TextSimple::GetBlockRegion(int textIndex, int textLength, int& width, int& heigh
                int length = ConvertEnterToSpace(pModifiedText, pText, textLength);
                pModifiedText[textLength] = 0;
 
-               TextUtility::GetTextExtent(pFont, pModifiedText, length, _outline, width, height);
+               TextUtility::GetTextExtent(pFontImpl, pModifiedText, length, _outline, width, height);
 
                delete[] pModifiedText;
                pModifiedText = null;
@@ -520,34 +451,18 @@ TextSimple::GetBlockRegion(int textIndex, int textLength, int& width, int& heigh
        case TEXT_OBJECT_WRAP_TYPE_CHARACTER:
                // fall through
        case TEXT_OBJECT_WRAP_TYPE_WORD:
-               TextUtility::GetTextExtent(pFont, pText, textLength, _outline, width, height);
-
-               if (pText[textLength-1] == TEXT_LINE_FEED || pText[textLength-1] == TEXT_CARRIAGE_RETURN)
-               {
-                       width += LINE_FEED_WIDTH;
-               }
+               TextUtility::GetTextExtent(pFontImpl, pText, textLength, _outline, width, height);
                break;
        }
 
        if (height == 0 && (textLength > 0))
        {
-               pFont->GetLeading().ToInt();
+               height = pFontImpl->GetLeading();
        }
 
        return E_SUCCESS;
 }
 
-result
-TextSimple::GetBlockRegion(int textIndex, int textLength, float& width, float& height) const
-{
-       int iWidth = _CoordinateSystemUtils::ConvertToInteger(width);
-       int iHeight = _CoordinateSystemUtils::ConvertToInteger(height);
-       result r = GetBlockRegion(textIndex, textLength, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-       return r;
-}
-
 int
 TextSimple::GetHeight(void) const
 {
@@ -578,6 +493,15 @@ result
 TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextIndex, int textLength,
                const TextObjectAlignment align, const TextObjectActionType action)
 {
+       FloatRectangle displayRectF = _CoordinateSystemUtils::ConvertToFloat(displayRect);
+
+       return Draw(canvasImpl, displayRectF, startTextIndex, textLength, align, action);
+}
+
+result
+TextSimple::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
+               const TextObjectAlignment alignment, const TextObjectActionType action)
+{
        SysTryReturn(NID_GRP, textLength <= _length, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        if (textLength == 0)
@@ -586,14 +510,12 @@ TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
        }
 
        result r = E_SUCCESS;
-       _Canvas* pCanvas = _Canvas::GetInstance(canvasImpl);
-       SysTryReturn(NID_GRP, pCanvas, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native canvas instance.");
 
        if (__bitmapProperty.pBitmap)
        {
                if (__bitmapProperty.displayEnable)
                {
-                       r = pCanvas->DrawBitmap(Point(displayRect.x, displayRect.y), *_GetBitmapEx(*_BitmapImpl::GetInstance(*__bitmapProperty.pBitmap)));
+                       r = canvasImpl.DrawBitmap(FloatPoint(displayRect.x, displayRect.y), *_BitmapImpl::GetInstance(*__bitmapProperty.pBitmap));
                        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
                }
 
@@ -601,31 +523,31 @@ TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
        }
 
        Color foregroundColor = GetCurrentForegroundColor();
-       pCanvas->SetForegroundColor(foregroundColor);
+       canvasImpl.SetForegroundColor(foregroundColor);
 
        Color backgroundColor = GetCurrentBackgroundColor();
-       pCanvas->SetBackgroundColor(backgroundColor);
+       canvasImpl.SetBackgroundColor(backgroundColor);
 
        Color outlineColor = GetCurrentOutlineColor();
 
        Font* pCurrentFont = GetCurrentFont();
        SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*pCurrentFont));
-       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont);
+       SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
-       r = pCanvas->SetPriorityFont(*pFont);
+       r = canvasImpl.SetPriorityFont(*pCurrentFont);
        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        if (_userWrap != TEXT_OBJECT_WRAP_TYPE_NONE)
        {
                if (_outline)
                {
-                       return TextUtility::DrawOutlineText(*pCanvas, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength, outlineColor);
+                       return TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength, outlineColor);
                }
                else
                {
-                       return TextUtility::DrawText(*pCanvas, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength);
+                       return TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, &_pText[startTextIndex], textLength);
                }
        }
        else
@@ -638,11 +560,11 @@ TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
 
                if (_outline)
                {
-                       TextUtility::DrawOutlineText(*pCanvas, displayRect.x, displayRect.y, pModifiedText, length, outlineColor);
+                       TextUtility::DrawOutlineText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length, outlineColor);
                }
                else
                {
-                       TextUtility::DrawText(*pCanvas, displayRect.x, displayRect.y, pModifiedText, length);
+                       TextUtility::DrawText(canvasImpl, displayRect.x, displayRect.y, pModifiedText, length);
                }
 
                delete[] pModifiedText;
@@ -654,19 +576,6 @@ TextSimple::Draw(_CanvasImpl& canvasImpl, Rectangle& displayRect, int startTextI
        return E_SUCCESS;
 }
 
-result
-TextSimple::Draw(_CanvasImpl& canvasImpl, FloatRectangle& displayRect, int startTextIndex, int textLength,
-               const TextObjectAlignment alignment, const TextObjectActionType action)
-{
-       Rectangle iDisplayRect;
-       iDisplayRect.x = _CoordinateSystemUtils::ConvertToInteger(displayRect.x);
-       iDisplayRect.y = _CoordinateSystemUtils::ConvertToInteger(displayRect.y);
-       iDisplayRect.width = _CoordinateSystemUtils::ConvertToInteger(displayRect.width);
-       iDisplayRect.height = _CoordinateSystemUtils::ConvertToInteger(displayRect.height);
-
-       return Draw(canvasImpl, iDisplayRect, startTextIndex, textLength, alignment, action);
-}
-
 TextElement*
 TextSimple::CloneN(TextComponentInfoValueType type, unsigned int value)
 {
@@ -1482,13 +1391,19 @@ TextSimple::IsBitmapDisplayMode(void) const
 int
 TextSimple::GetBaseline(void) const
 {
+       return _CoordinateSystemUtils::ConvertToInteger(GetBaselineF());
+}
+
+float
+TextSimple::GetBaselineF(void) const
+{
        Font* pCurrentFont = GetCurrentFont();
        SysTryReturn(NID_GRP, pCurrentFont, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] This instance is not line wrapped yet.");
 
-       _Font* pFont = _Font::GetInstance(*_FontImpl::GetInstance(*pCurrentFont));
-       SysTryReturn(NID_GRP, pFont, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       _FontImpl* pFontImpl = _FontImpl::GetInstance(*pCurrentFont);
+       SysTryReturn(NID_GRP, pFontImpl, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
-       return (-1) * pFont->GetDescender().ToInt();
+       return (-1) * pFontImpl->GetDescenderF();
 }
 
 }}} // Tizen::Graphics::_Text
index c68afb6..f1239bb 100644 (file)
@@ -22,7 +22,8 @@
 
 #include <new>
 #include <FBaseSysLog.h>
-#include "../FGrp_Canvas.h"
+#include <FBaseColLinkedList.h>
+#include "FGrp_CanvasImpl.h"
 #include "FGrp_FontImpl.h"
 #include "FGrp_TextCommon.h"
 #include "FGrp_TextTextSimple.h"
 using namespace Tizen::Base::Utility;
 using namespace Tizen::Base;
 
-// [TODO] use before _Font::GetTextExtent is working properly.
-#define EXTENT_BIDI_LIST
+#define Release(x) \
+       if (x) \
+       { \
+               delete x; \
+               x = null; \
+       }
 
 namespace Tizen { namespace Graphics
 {
@@ -149,39 +154,35 @@ TextUtility::IsSameFontAttribute(const Font* pFontSrc, const Font* pFontTarget)
 int
 TextUtility::GetFontMaxHeight(Font* pFont)
 {
-       if (!pFont)
-       {
-               return 0;
-       }
-
-       _Font* pNativeFont = _Font::GetInstance(*_FontImpl::GetInstance(*pFont));
-       SysTryReturn(NID_GRP, pNativeFont, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
-
-       return pNativeFont->GetLeading().ToInt();
+       return _CoordinateSystemUtils::ConvertToInteger(GetFontMaxHeightF(pFont));
 }
 
 int
-TextUtility::GetFontMaxHeight(_Font* pFont)
+TextUtility::GetFontMaxHeight(_FontImpl* pFont)
+{
+       return _CoordinateSystemUtils::ConvertToInteger(GetFontMaxHeightF(pFont));
+}
+
+float
+TextUtility::GetFontMaxHeightF(Font* pFont)
 {
        if (!pFont)
        {
                return 0;
        }
 
-       return pFont->GetLeading().ToInt();
+       return pFont->GetMaxHeightF();  
 }
 
-
 float
-TextUtility::GetFontMaxHeightF(Font* pFont)
+TextUtility::GetFontMaxHeightF(_FontImpl* pFont)
 {
-       return _CoordinateSystemUtils::ConvertToFloat(GetFontMaxHeight(pFont));
-}
+       if (!pFont)
+       {
+               return 0;
+       }
 
-float
-TextUtility::GetFontMaxHeightF(_Font* pFont)
-{
-       return _CoordinateSystemUtils::ConvertToFloat(GetFontMaxHeight(pFont));
+       return pFont->GetLeadingF();
 }
 
 int
@@ -198,7 +199,7 @@ TextUtility::GetTextLength(const wchar_t* pText)
 }
 
 int
-TextUtility::GetCharCountInWidth(_Font* pFont, const wchar_t* pText, int textLength, int maxWidth, bool outline, int& width, int& height)
+TextUtility::GetCharCountInWidth(_FontImpl* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height)
 {
        if (!pFont)
        {
@@ -207,13 +208,14 @@ TextUtility::GetCharCountInWidth(_Font* pFont, const wchar_t* pText, int textLen
 
        result r = E_SUCCESS;
        int count = 0;
-       Dimension lineDimension;
+       FloatDimension lineDimension;
+
+       r = pFont->GetTextExtent(maxWidth, pText, 0, textLength, outline, L"", count, lineDimension);
 
-       r = pFont->GetTextExtent(maxWidth, _Util::String(pText, textLength), outline, L"", count, lineDimension);
        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        width = lineDimension.width;
-       height = pFont->GetLeading().ToInt();
+       height = pFont->GetLeadingF();
 
        SetLastResult(E_SUCCESS);
 
@@ -225,19 +227,6 @@ CATCH:
        return 0;
 }
 
-int
-TextUtility::GetCharCountInWidth(_Font* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height)
-{
-       int iMaxWidth = _CoordinateSystemUtils::ConvertToInteger(maxWidth);
-       int iWidth = 0;
-       int iHeight = 0;
-       int charCount = GetCharCountInWidth(pFont, pText, textLength, iMaxWidth, outline, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-
-       return charCount;
-}
-
 result
 TextUtility::CopyText(wchar_t* pDstText, const wchar_t* pSrcText, int textLength)
 {
@@ -302,10 +291,16 @@ TextUtility::CopyText(wchar_t* pDstText, const wchar_t* pSrcText)
 }
 
 result
-TextUtility::DrawText(_Canvas& canvas, int x, int y, const wchar_t* pText, int textLength)
+TextUtility::DrawText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength)
+{
+       return DrawText(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), pText, textLength);
+}
+
+result
+TextUtility::DrawText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength)
 {
        result r = E_SUCCESS;
-       Point point(x, y);
+       FloatPoint point(x, y);
 
        Tizen::Base::String text(pText);
 
@@ -314,23 +309,23 @@ TextUtility::DrawText(_Canvas& canvas, int x, int y, const wchar_t* pText, int t
                textLength--;
        }
 
-       r = canvas.DrawText(point, text, 0, textLength);
+       r = canvasImpl.DrawText(point, text, 0, textLength);
        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
-       return E_SUCCESS;
+       return E_SUCCESS;       
 }
 
 result
-TextUtility::DrawText(_Canvas& canvas, float x, float y, const wchar_t* pText, int textLength)
+TextUtility::DrawOutlineText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength, Color outlineColor)
 {
-       return DrawText(canvas, _CoordinateSystemUtils::ConvertToInteger(x), _CoordinateSystemUtils::ConvertToInteger(y), pText, textLength);
+       return DrawOutlineText(canvasImpl, _CoordinateSystemUtils::ConvertToFloat(x), _CoordinateSystemUtils::ConvertToFloat(y), pText, textLength, outlineColor);
 }
 
 result
-TextUtility::DrawOutlineText(_Canvas& canvas, int x, int y, const wchar_t* pText, int textLength, Color outlineColor)
+TextUtility::DrawOutlineText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength, Color outlineColor)
 {
        result r = E_SUCCESS;
-       Point point(x, y);
+       FloatPoint point(x, y);
 
        Tizen::Base::String text(pText);
 
@@ -339,70 +334,66 @@ TextUtility::DrawOutlineText(_Canvas& canvas, int x, int y, const wchar_t* pText
                textLength--;
        }
 
-       r = canvas.DrawText(point, text, 0, textLength, outlineColor);
+       r = canvasImpl.DrawText(point, text, 0, textLength, outlineColor);
        SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        return E_SUCCESS;
 }
 
 result
-TextUtility::DrawOutlineText(_Canvas& canvas, float x, float y, const wchar_t* pText, int textLength, Color outlineColor)
-{
-       return DrawOutlineText(canvas, _CoordinateSystemUtils::ConvertToInteger(x), _CoordinateSystemUtils::ConvertToInteger(y), pText, textLength, outlineColor);
-}
-
-result
-TextUtility::GetTextExtent(_Font* pFont, const wchar_t* pText, int textLength, bool outline, int& width, int& height)
+TextUtility::GetTextExtent(_FontImpl* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height)
 {
        SysTryReturn(NID_GRP, pFont && pText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        result r = E_SUCCESS;
-       Dimension lineDimension;
+       FloatDimension lineDimension;
+       _FloatPair currentGap;
+       Tizen::Base::Collection::ArrayListT<_FloatPair> gapList;
+       Tizen::Base::Collection::IEnumeratorT<_FloatPair >* pEnum = null;
 
-       // [TODO] use before _Font::GetTextExtent is working properly.
-#if defined (EXTENT_BIDI_LIST)
-       _Util::AccumList<_Util::Pair<int, int> > gaptList;
+       r = pFont->GetTextExtentList(pText, 0, textLength, gapList);
+       SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
-       r = pFont->GetTextExtentList(_Util::String(pText, textLength), gaptList);
-       for (_Util::AccumList<_Util::Pair<int, int> >::Iterator iterator = gaptList.Begin(); iterator != gaptList.End(); iterator++)
-       {
-               lineDimension.width = (lineDimension.width < iterator->second) ? iterator->second : lineDimension.width;
-       }
+       pEnum = gapList.GetEnumeratorN();
 
-#else
-       r = pFont->GetTextExtent(_Util::String(pText, textLength), lineDimension);
-#endif
+       while (pEnum->MoveNext() == E_SUCCESS)
+       {
+               pEnum->GetCurrent(currentGap);
 
-       SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+               lineDimension.width = (lineDimension.width < currentGap.second) ? currentGap.second : lineDimension.width;
+       }
 
        width = lineDimension.width;
-       height = pFont->GetLeading().ToInt();
+       height = pFont->GetLeadingF();
 
+       Release(pEnum);
        return E_SUCCESS;
 
 CATCH:
        width = 0;
        height = 0;
+
+       Release(pEnum);
        return r;
 }
 
 result
-TextUtility::GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, int& width, int& height)
+TextUtility::GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height)
 {
        SysTryReturn(NID_GRP, pFont && pText, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
        result r = E_SUCCESS;
        int count = 0;
-       Dimension lineDimension;
+       FloatDimension lineDimension;
 
-       _Font* pNativeFont = _Font::GetInstance(*_FontImpl::GetInstance(*pFont));
-       SysTryReturn(NID_GRP, pNativeFont, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
+       _FontImpl* pFontImpl = _FontImpl::GetInstance(*pFont);
+       SysTryReturn(NID_GRP, pFontImpl, -1, E_SYSTEM, "[E_SYSTEM] Fail to get native font instance.");
 
-       r = pNativeFont->GetTextExtent((Integer::VALUE_MAX >> 1) - 1, _Util::String(pText, textLength), outline, L"", count, lineDimension);
+       r = pFontImpl->GetTextExtent((Integer::VALUE_MAX / 2.0f) - 1, pText, textLength, outline, L"", count, lineDimension);
        SysTryCatch(NID_GRP, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
 
        width = lineDimension.width;
-       height = pNativeFont->GetLeading().ToInt();
+       height = pFontImpl->GetLeadingF();
 
        return E_SUCCESS;
 
@@ -412,31 +403,5 @@ CATCH:
        return r;
 }
 
-result
-TextUtility::GetTextExtent(_Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height)
-{
-       result r = E_SUCCESS;
-       int iWidth = 0;
-       int iHeight = 0;
-       r = GetTextExtent(pFont, pText, textLength, outline, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-
-       return r;
-}
-
-result
-TextUtility::GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height)
-{
-       result r = E_SUCCESS;
-       int iWidth = 0;
-       int iHeight = 0;
-       r = GetTextExtent(pFont, pText, textLength, outline, iWidth, iHeight);
-       width = _CoordinateSystemUtils::ConvertToFloat(iWidth);
-       height = _CoordinateSystemUtils::ConvertToFloat(iHeight);
-
-       return r;
-}
-
-}}} // Tizen::Graphics::_Text
+}}} // Tizen::Graphics::_Texts
 
index 7e8fb54..2ce4234 100644 (file)
@@ -23,7 +23,8 @@
 #ifndef _FGRP_INTERNAL_TEXT_UTILITY_H_
 #define _FGRP_INTERNAL_TEXT_UTILITY_H_
 
-#include "../FGrp_Font.h"
+#include "FGrp_CanvasImpl.h"
+#include "FGrp_FontImpl.h"
 #include "FGrp_TextCommon.h"
 
 namespace Tizen { namespace Graphics
@@ -46,23 +47,17 @@ public:
 
        static int GetFontMaxHeight(Font* pFont);
 
-       static int GetFontMaxHeight(_Font* pFont);
+       static int GetFontMaxHeight(_FontImpl* pFont);
 
        static float GetFontMaxHeightF(Font* pFont);
 
-       static float GetFontMaxHeightF(_Font* pFont);
+       static float GetFontMaxHeightF(_FontImpl* pFont);
 
        static int GetTextLength(const wchar_t* pText);
 
-       static int GetCharCountInWidth(_Font* pFont, const wchar_t* pText, int textLength, int maxWidth, bool outline, int& width, int& height);
+       static int GetCharCountInWidth(_FontImpl* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height);
 
-       static int GetCharCountInWidth(_Font* pFont, const wchar_t* pText, int textLength, float maxWidth, bool outline, float& width, float& height);
-
-       static result GetTextExtent(_Font* pFont, const wchar_t* pText, int textLength, bool outline, int& width, int& height);
-
-       static result GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, int& width, int& height);
-
-       static result GetTextExtent(_Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height);
+       static result GetTextExtent(_FontImpl* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height);
 
        static result GetTextExtent(Font* pFont, const wchar_t* pText, int textLength, bool outline, float& width, float& height);
 
@@ -70,13 +65,13 @@ public:
 
        static result CopyText(wchar_t* pDstText, const wchar_t* pSrcText);
 
-       static result DrawText(_Canvas& canvas, int x, int y, const wchar_t* pText, int textLength);
+       static result DrawText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength);
 
-       static result DrawText(_Canvas& canvas, float x, float y, const wchar_t* pText, int textLength);
+       static result DrawText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength);
 
-       static result DrawOutlineText(_Canvas& canvas, int x, int y, const wchar_t* pText, int textLength, Color outlineColor);
+       static result DrawOutlineText(_CanvasImpl& canvasImpl, int x, int y, const wchar_t* pText, int textLength, Color outlineColor);
 
-       static result DrawOutlineText(_Canvas& canvas, float x, float y, const wchar_t* pText, int textLength, Color outlineColor);
+       static result DrawOutlineText(_CanvasImpl& canvasImpl, float x, float y, const wchar_t* pText, int textLength, Color outlineColor);
 
 }; // TextUtility
 
index c97c335..3d3d1f8 100644 (file)
@@ -41,8 +41,8 @@ struct WordTextWidthInfo;
 struct TextLineComposeInfo
 {
        int length;
-       int width;
-       int height;
+       float width;
+       float height;
        int endType;
 };