labelPosition.y = labelVisualPadding.height;
}
+ Vector2 preSize = Vector2( static_cast< int >( remainingSpaceForText.x ), static_cast< int >( remainingSpaceForText.y ));
+
DALI_LOG_INFO( gLogButtonFilter, Debug::General, "OnRelayout text Size(%f,%f) text Position(%f,%f) \n", remainingSpaceForText.width, remainingSpaceForText.height, labelPosition.x, labelPosition.y);
+ DALI_LOG_INFO( gLogButtonFilter, Debug::General, "OnRelayout text Size -- (%f,%f) text Position(%f,%f) \n", preSize.width, preSize.height, labelPosition.x, labelPosition.y);
+
+
Property::Map textVisualTransform;
- textVisualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, remainingSpaceForText)
+ textVisualTransform.Add( Toolkit::DevelVisual::Transform::Property::SIZE, preSize )
.Add( Toolkit::DevelVisual::Transform::Property::OFFSET, labelPosition )
.Add( Toolkit::DevelVisual::Transform::Property::OFFSET_SIZE_MODE, Vector4( 1.0f, 1.0f, 1.0f,1.0f ) ) // Use absolute size
.Add( Toolkit::DevelVisual::Transform::Property::ORIGIN, Toolkit::Align::TOP_BEGIN )
uniform mediump mat4 uMvpMatrix;\n
uniform mediump vec3 uSize;\n
uniform mediump vec4 pixelArea;
+
+ uniform mediump mat4 uModelMatrix;\n
+ uniform mediump mat4 uViewMatrix;\n
+ uniform mediump mat4 uProjection;\n
+
varying mediump vec2 vTexCoord;\n
\n
-
//Visual size and offset
uniform mediump vec2 offset;\n
uniform mediump vec2 size;\n
void main()\n
{\n
- mediump vec4 vertexPosition = uMvpMatrix *ComputeVertexPosition();\n
+ mediump vec4 nonAlignedVertex = uViewMatrix*uModelMatrix*ComputeVertexPosition();\n
+ mediump vec4 pixelAlignedVertex = vec4 ( floor(nonAlignedVertex.xyz), 1.0 );\n
+ mediump vec4 vertexPosition = uProjection*pixelAlignedVertex;\n
+
vTexCoord = pixelArea.xy+pixelArea.zw*(aPosition + vec2(0.5) );\n
gl_Position = vertexPosition;\n
}\n
mFactoryCache.SaveGeometry( VisualFactoryCache::QUAD_GEOMETRY , geometry );
}
- Shader shader = mFactoryCache.GetShader( VisualFactoryCache::IMAGE_SHADER_ATLAS_DEFAULT_WRAP );
- if( !shader )
- {
- shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER_ATLAS_CLAMP );
- mFactoryCache.SaveShader( VisualFactoryCache::IMAGE_SHADER_ATLAS_DEFAULT_WRAP, shader );
- }
+ Shader shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER_ATLAS_CLAMP );
+ mFactoryCache.SaveShader( VisualFactoryCache::IMAGE_SHADER_ATLAS_DEFAULT_WRAP, shader );
+
shader.RegisterProperty( PIXEL_AREA_UNIFORM_NAME, FULL_TEXTURE_RECT );
mImpl->mRenderer = Renderer::New( geometry, shader );