Fixed to get text position info properly
authorYunji Park <yunji19.park@samsung.com>
Wed, 10 Apr 2013 11:23:46 +0000 (20:23 +0900)
committerYunji Park <yunji19.park@samsung.com>
Wed, 10 Apr 2013 11:23:46 +0000 (20:23 +0900)
Change-Id: Ie623fc46efe71e551f18a8cbe09223028c9b11e7

src/graphics/text/FGrp_TextTextLine.cpp

index d7e9fec..7a55ec4 100644 (file)
@@ -493,6 +493,11 @@ TextLine::GetTextExtent(int textIndexFromLineOffset, int textLength) const
 FloatRectangle
 TextLine::GetTextExtentF(int textIndexFromLineOffset, int textLength) const
 {
+       if (textIndexFromLineOffset == 0 && __textLength == 0)
+       {
+               return FloatRectangle(0, 0, 0, 0);
+       }
+
        SysTryReturn(NID_GRP, 0 <= textIndexFromLineOffset && textLength <= __textLength
                , FloatRectangle(-1, -1, -1, -1), E_INVALID_ARG, "[E_INVALID_ARG] The argument is invalid.");
 
@@ -715,3 +720,4 @@ TextLine::GetBlockTextExtentF(int textIndexFromLineOffset, int textLength) const
 }
 
 }}} // Tizen::Graphics::_Text
+