X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fatlas%2Fatlas-mesh-factory.cpp;h=4017f791e0b370b5c59f7689f9df5a2aa11c63c4;hb=528aa3699cd51dab5115bca1aaebb65d4bc67c15;hp=3a64c96816f143e851b700482e93b21f2db27364;hpb=225ea9dd33c2d8669d8dac1f2b116eeb2ea00c0d;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.cpp b/dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.cpp index 3a64c96..4017f79 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-mesh-factory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2016 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,6 +83,9 @@ void CreateQuad( SizeType imageWidth, Vector2 topLeft = Vector2( position.x - 0.5f, position.y - 0.5f ); float fBlockX = texelBlockWidth * static_cast< float >( block % atlasWidthInBlocks ); + + // In the next expression, we have purposely made ( block / atlasWidthInBlocks ) yield an integer value and then convert to float as + // we do not want the remainder in that expression to affect the value of fBlockY float fBlockY = texelBlockHeight * static_cast< float >( block / atlasWidthInBlocks ); // Add on texture filtering compensation ( half a texel plus compensation for filled pixel in top left corner ) @@ -148,7 +151,7 @@ void AppendMesh( Toolkit::AtlasManager::Mesh2D& first, second.mIndices.Begin(), second.mIndices.End() ); - for( Vector::Iterator it = first.mIndices.Begin() + indicesCount, + for( Vector::Iterator it = first.mIndices.Begin() + indicesCount, endIt = first.mIndices.End(); it != endIt; ++it )