Added missing newline chars to logging commands
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / image-actor-impl.cpp
index 9ebf015..92016de 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 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.
@@ -24,6 +24,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/animation/constraints.h> // for EqualToConstraint
 #include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/rendering/renderer.h>
 #include <dali/devel-api/scripting/scripting.h>
 #include <dali/internal/event/animation/constraint-impl.h>
 #include <dali/internal/event/common/property-helper.h>
@@ -127,7 +128,7 @@ GeometryPtr CreateGeometry( unsigned int gridWidth, unsigned int gridHeight, con
   {
     geometry->SetIndexBuffer( &indices[0], indices.Size() );
   }
-  geometry->SetGeometryType( Dali::Geometry::TRIANGLE_STRIP );
+  geometry->SetType( Dali::Geometry::TRIANGLE_STRIP );
 
   return geometry;
 }
@@ -177,7 +178,7 @@ ImageActorPtr ImageActor::New()
   GeometryPtr quad  = CreateGeometry( 1u, 1u, Vector2::ONE );
   actor->mRenderer->SetGeometry( *quad );
 
-  ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::HINT_NONE );
+  ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::Hint::NONE );
   actor->mRenderer->SetShader( *shader );
   TextureSetPtr textureSet = TextureSet::New();
   actor->mRenderer->SetTextures( *textureSet );
@@ -270,25 +271,25 @@ void ImageActor::ClearPixelArea()
 
 void ImageActor::SetStyle( Dali::ImageActor::Style style )
 {
-  DALI_LOG_WARNING( "SetStyle Deprecated. Only STYLE_QUAD supported." );
+  DALI_LOG_WARNING( "SetStyle Deprecated. Only STYLE_QUAD supported.\n" );
   mStyle = style;
 }
 
 Dali::ImageActor::Style ImageActor::GetStyle() const
 {
-  DALI_LOG_WARNING( "GetStyle Deprecated. Only STYLE_QUAD supported." );
+  DALI_LOG_WARNING( "GetStyle Deprecated. Only STYLE_QUAD supported.\n" );
   return mStyle;
 }
 
 void ImageActor::SetNinePatchBorder( const Vector4& border )
 {
-  DALI_LOG_WARNING( "SetNinePatchBorder Deprecated. Only STYLE_QUAD supported." );
+  DALI_LOG_WARNING( "SetNinePatchBorder Deprecated. Only STYLE_QUAD supported.\n" );
   mNinePatchBorder = border;
 }
 
 Vector4 ImageActor::GetNinePatchBorder() const
 {
-  DALI_LOG_WARNING( "GetNinePatchBorder Deprecated. Only STYLE_QUAD supported." );
+  DALI_LOG_WARNING( "GetNinePatchBorder Deprecated. Only STYLE_QUAD supported.\n" );
   return mNinePatchBorder;
 }
 
@@ -606,44 +607,44 @@ float ImageActor::GetSortModifier() const
 
 void ImageActor::SetBlendMode( BlendingMode::Type mode )
 {
-  mRenderer->SetBlendMode( mode );
+  mRenderer->SetBlendMode( static_cast<BlendMode::Type>( mode ) );
 }
 
 BlendingMode::Type ImageActor::GetBlendMode() const
 {
-  return mRenderer->GetBlendMode();
+  return static_cast<BlendingMode::Type>( mRenderer->GetBlendMode() );
 }
 
 void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba,   BlendingFactor::Type destFactorRgba )
 {
-  mRenderer->SetBlendFunc( srcFactorRgba, destFactorRgba, srcFactorRgba, destFactorRgba );
+  mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba), static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba) );
 }
 
 void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb,   BlendingFactor::Type destFactorRgb,
                                BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
 {
-  mRenderer->SetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgb), static_cast<BlendFactor::Type>(destFactorRgb), static_cast<BlendFactor::Type>(srcFactorAlpha), static_cast<BlendFactor::Type>(destFactorAlpha) );
 }
 
 void ImageActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb,   BlendingFactor::Type& destFactorRgb,
                                BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
 {
-  mRenderer->GetBlendFunc( srcFactorRgb, destFactorRgb, srcFactorAlpha, destFactorAlpha );
+  mRenderer->GetBlendFunc( reinterpret_cast<BlendFactor::Type&>(srcFactorRgb), reinterpret_cast<BlendFactor::Type&>(destFactorRgb), reinterpret_cast<BlendFactor::Type&>(srcFactorAlpha), reinterpret_cast<BlendFactor::Type&>(destFactorAlpha) );
 }
 
 void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgba )
 {
-  mRenderer->SetBlendEquation( equationRgba, equationRgba );
+  mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgba), static_cast<BlendEquation::Type>(equationRgba) );
 }
 
 void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
 {
-  mRenderer->SetBlendEquation( equationRgb, equationAlpha );
+  mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgb), static_cast<BlendEquation::Type>(equationAlpha) );
 }
 
 void ImageActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
 {
-  mRenderer->GetBlendEquation( equationRgb, equationAlpha );
+  mRenderer->GetBlendEquation( reinterpret_cast<BlendEquation::Type&>(equationRgb), reinterpret_cast<BlendEquation::Type&>(equationAlpha) );
 }
 
 void ImageActor::SetBlendColor( const Vector4& color )
@@ -702,7 +703,7 @@ void ImageActor::RemoveShaderEffect()
   {
     mShaderEffect->Disconnect( this );
     // change to the standard shader and quad geometry
-    ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::HINT_NONE );
+    ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::Hint::NONE );
     mRenderer->SetShader( *shader );
     mShaderEffect.Reset();