Change filter mode in TextLabel to improve quality while scaling 22/144922/1
authorRichard Huang <r.huang@samsung.com>
Fri, 18 Aug 2017 10:28:36 +0000 (11:28 +0100)
committerRichard Huang <r.huang@samsung.com>
Fri, 18 Aug 2017 10:28:36 +0000 (11:28 +0100)
Change-Id: Ifc2c5a1a592d24851db2b2703d469b8797595a0b

dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/visuals/text/text-visual.cpp

index 3778d1b75b909a839dce1a3289714ccaf7135ffb..5ca841fdee0dab77f1aa205fb7d94508a056bcd4 100644 (file)
@@ -958,9 +958,9 @@ void TextLabel::SetUpAutoScrolling()
   TextureSet textureSet = TextureSet::New();
   textureSet.SetTexture( 0u, texture );
 
-  // Filter mode needs to be set to nearest to avoid blurry text.
+  // Filter mode needs to be set to linear to produce better quality while scaling.
   Sampler sampler = Sampler::New();
-  sampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
+  sampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
   textureSet.SetSampler( 0u, sampler );
 
   // Set parameters for scrolling
index 8870fc0227e697bc2f8e761770540153b46b3c30..46cb2a1c2d415885d77d456c0cd60e34e6ffce99 100644 (file)
@@ -587,9 +587,9 @@ void TextVisual::UpdateRenderer()
 
       textureSet.SetTexture( 2u, maskTexture );
 
-      // Filter mode needs to be set to nearest to avoid blurry text.
+      // Filter mode needs to be set to linear to produce better quality while scaling.
       Sampler sampler = Sampler::New();
-      sampler.SetFilterMode( FilterMode::NEAREST, FilterMode::NEAREST );
+      sampler.SetFilterMode( FilterMode::LINEAR, FilterMode::LINEAR );
       textureSet.SetSampler( 0u, sampler );
       textureSet.SetSampler( 1u, sampler );
       textureSet.SetSampler( 2u, sampler );