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
Outline effect has been fixed to be not front cropped.
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
layouts
/
layout-engine.cpp
diff --git
a/dali-toolkit/internal/text/layouts/layout-engine.cpp
b/dali-toolkit/internal/text/layouts/layout-engine.cpp
index
3e633ba
..
ccd42ae
100644
(file)
--- a/
dali-toolkit/internal/text/layouts/layout-engine.cpp
+++ b/
dali-toolkit/internal/text/layouts/layout-engine.cpp
@@
-470,6
+470,7
@@
struct Engine::Impl
void SetGlyphPositions( const GlyphInfo* const glyphsBuffer,
Length numberOfGlyphs,
void SetGlyphPositions( const GlyphInfo* const glyphsBuffer,
Length numberOfGlyphs,
+ float outlineWidth,
Vector2* glyphPositionsBuffer )
{
// Traverse the glyphs and set the positions.
Vector2* glyphPositionsBuffer )
{
// Traverse the glyphs and set the positions.
@@
-479,7
+480,8
@@
struct Engine::Impl
// so the penX position needs to be moved to the right.
const GlyphInfo& glyph = *glyphsBuffer;
// so the penX position needs to be moved to the right.
const GlyphInfo& glyph = *glyphsBuffer;
- float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing : 0.f;
+ float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing + outlineWidth : outlineWidth;
+
for( GlyphIndex i = 0u; i < numberOfGlyphs; ++i )
{
for( GlyphIndex i = 0u; i < numberOfGlyphs; ++i )
{
@@
-604,6
+606,7
@@
struct Engine::Impl
SetGlyphPositions( layoutParameters.glyphsBuffer + lineRun->glyphRun.glyphIndex,
ellipsisLayout.numberOfGlyphs,
SetGlyphPositions( layoutParameters.glyphsBuffer + lineRun->glyphRun.glyphIndex,
ellipsisLayout.numberOfGlyphs,
+ layoutParameters.outlineWidth,
glyphPositionsBuffer + lineRun->glyphRun.glyphIndex - layoutParameters.startGlyphIndex );
}
glyphPositionsBuffer + lineRun->glyphRun.glyphIndex - layoutParameters.startGlyphIndex );
}
@@
-963,6
+966,7
@@
struct Engine::Impl
// Sets the positions of the glyphs.
SetGlyphPositions( layoutParameters.glyphsBuffer + index,
layout.numberOfGlyphs,
// Sets the positions of the glyphs.
SetGlyphPositions( layoutParameters.glyphsBuffer + index,
layout.numberOfGlyphs,
+ layoutParameters.outlineWidth,
glyphPositionsBuffer + index - layoutParameters.startGlyphIndex );
// Updates the vertical pen's position.
glyphPositionsBuffer + index - layoutParameters.startGlyphIndex );
// Updates the vertical pen's position.
@@
-1043,7
+1047,7
@@
struct Engine::Impl
const CharacterIndex characterVisualIndex = bidiLine.characterRun.characterIndex + *bidiLine.visualToLogicalMap;
const GlyphInfo& glyph = *( layoutParameters.glyphsBuffer + *( layoutParameters.charactersToGlyphsBuffer + characterVisualIndex ) );
const CharacterIndex characterVisualIndex = bidiLine.characterRun.characterIndex + *bidiLine.visualToLogicalMap;
const GlyphInfo& glyph = *( layoutParameters.glyphsBuffer + *( layoutParameters.charactersToGlyphsBuffer + characterVisualIndex ) );
- float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing
: 0.f
;
+ float penX = ( 0.f > glyph.xBearing ) ? -glyph.xBearing
- layoutParameters.outlineWidth : -layoutParameters.outlineWidth
;
Vector2* glyphPositionsBuffer = glyphPositions.Begin();
Vector2* glyphPositionsBuffer = glyphPositions.Begin();