projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[dali_1.2.15] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
rendering
/
atlas
/
atlas-mesh-factory.cpp
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
(file)
--- 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) 201
5
Samsung Electronics Co., Ltd.
+ * Copyright (c) 201
6
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.
*
* 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 );
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 )
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() );
second.mIndices.Begin(),
second.mIndices.End() );
- for( Vector<unsigned
in
t>::Iterator it = first.mIndices.Begin() + indicesCount,
+ for( Vector<unsigned
shor
t>::Iterator it = first.mIndices.Begin() + indicesCount,
endIt = first.mIndices.End();
it != endIt;
++it )
endIt = first.mIndices.End();
it != endIt;
++it )