Commit 8a68f55cd1dc315fa0c9f75711b671a22840f5a5
[dali_1.4.1] Merge branch 'devel/master'
Change-Id: I60dcdca9484a40b0994d45165f542d566aec3794
Showing
8 changed files
with
71 additions
and
26 deletions
examples/item-view/item-view-example.cpp
examples/primitive-shapes/primitive-shapes-example.cpp
| @@ -95,7 +95,7 @@ public: | @@ -95,7 +95,7 @@ public: | ||
| 95 | layer.SetParentOrigin( ParentOrigin::CENTER ); | 95 | layer.SetParentOrigin( ParentOrigin::CENTER ); |
| 96 | layer.SetAnchorPoint( AnchorPoint::CENTER ); | 96 | layer.SetAnchorPoint( AnchorPoint::CENTER ); |
| 97 | layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); | 97 | layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); |
| 98 | - layer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation. | 98 | + layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation. |
| 99 | layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so. | 99 | layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so. |
| 100 | stage.Add( layer ); | 100 | stage.Add( layer ); |
| 101 | 101 |
examples/renderer-stencil/renderer-stencil-example.cpp
| @@ -158,7 +158,7 @@ private: | @@ -158,7 +158,7 @@ private: | ||
| 158 | layer.SetAnchorPoint( AnchorPoint::CENTER ); | 158 | layer.SetAnchorPoint( AnchorPoint::CENTER ); |
| 159 | // Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions). | 159 | // Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions). |
| 160 | layer.SetParentOrigin( Vector3( 0.5f, 0.58f, 0.5f ) ); | 160 | layer.SetParentOrigin( Vector3( 0.5f, 0.58f, 0.5f ) ); |
| 161 | - layer.SetBehavior( Layer::LAYER_2D ); | 161 | + layer.SetBehavior( Layer::LAYER_UI ); |
| 162 | layer.SetDepthTestDisabled( false ); | 162 | layer.SetDepthTestDisabled( false ); |
| 163 | stage.Add( layer ); | 163 | stage.Add( layer ); |
| 164 | 164 |
examples/text-fonts/text-fonts-example.cpp
| @@ -80,8 +80,10 @@ public: | @@ -80,8 +80,10 @@ public: | ||
| 80 | } | 80 | } |
| 81 | else | 81 | else |
| 82 | { | 82 | { |
| 83 | - textLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.3f, 0.3f ) ); | ||
| 84 | - textLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); | 83 | + Property::Map shadowMap; |
| 84 | + shadowMap.Insert( "color", Color::BLACK ); | ||
| 85 | + shadowMap.Insert( "offset", Vector2( 0.3f, 0.3f ) ); | ||
| 86 | + textLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 85 | textLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE ); | 87 | textLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE ); |
| 86 | } | 88 | } |
| 87 | textLabel.SetBackgroundColor( color ); | 89 | textLabel.SetBackgroundColor( color ); |
examples/text-label/text-label-example.cpp
| @@ -365,7 +365,7 @@ public: | @@ -365,7 +365,7 @@ public: | ||
| 365 | case SHADOW : | 365 | case SHADOW : |
| 366 | { | 366 | { |
| 367 | Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set | 367 | Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set |
| 368 | - Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR ); | 368 | + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); |
| 369 | Vector4 currentShadowColor; | 369 | Vector4 currentShadowColor; |
| 370 | value.Get( currentShadowColor ); | 370 | value.Get( currentShadowColor ); |
| 371 | 371 | ||
| @@ -697,13 +697,19 @@ public: | @@ -697,13 +697,19 @@ public: | ||
| 697 | } | 697 | } |
| 698 | case KEY_S: // Shadow color | 698 | case KEY_S: // Shadow color |
| 699 | { | 699 | { |
| 700 | - if( Color::BLACK == mLabel.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ) ) | 700 | + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); |
| 701 | + Vector4 shadowColor; | ||
| 702 | + value.Get( shadowColor ); | ||
| 703 | + Property::Map shadowMap; | ||
| 704 | + if( Color::BLACK == shadowColor ) | ||
| 701 | { | 705 | { |
| 702 | - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::RED ); | 706 | + shadowMap.Insert( "color", Color::RED ); |
| 707 | + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 703 | } | 708 | } |
| 704 | else | 709 | else |
| 705 | { | 710 | { |
| 706 | - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); | 711 | + shadowMap.Insert( "color", Color::BLACK ); |
| 712 | + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 707 | } | 713 | } |
| 708 | break; | 714 | break; |
| 709 | } | 715 | } |
| @@ -715,12 +721,26 @@ public: | @@ -715,12 +721,26 @@ public: | ||
| 715 | } | 721 | } |
| 716 | case KEY_PLUS: // Increase shadow offset | 722 | case KEY_PLUS: // Increase shadow offset |
| 717 | { | 723 | { |
| 718 | - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) ); | 724 | + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); |
| 725 | + Vector2 shadowOffset; | ||
| 726 | + value.Get( shadowOffset ); | ||
| 727 | + shadowOffset += Vector2( 1.0f, 1.0f ); | ||
| 728 | + | ||
| 729 | + Property::Map shadowMap; | ||
| 730 | + shadowMap.Insert( "offset", shadowOffset ); | ||
| 731 | + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 719 | break; | 732 | break; |
| 720 | } | 733 | } |
| 721 | case KEY_MINUS: // Decrease shadow offset | 734 | case KEY_MINUS: // Decrease shadow offset |
| 722 | { | 735 | { |
| 723 | - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) ); | 736 | + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); |
| 737 | + Vector2 shadowOffset; | ||
| 738 | + value.Get( shadowOffset ); | ||
| 739 | + shadowOffset -= Vector2( 1.0f, 1.0f ); | ||
| 740 | + | ||
| 741 | + Property::Map shadowMap; | ||
| 742 | + shadowMap.Insert( "offset", shadowOffset ); | ||
| 743 | + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 724 | break; | 744 | break; |
| 725 | } | 745 | } |
| 726 | 746 |
examples/text-memory-profiling/text-memory-profiling-example.cpp
| @@ -102,7 +102,9 @@ public: | @@ -102,7 +102,9 @@ public: | ||
| 102 | label.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | 102 | label.SetAnchorPoint( AnchorPoint::TOP_LEFT ); |
| 103 | label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); | 103 | label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); |
| 104 | label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); | 104 | label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f ); |
| 105 | - label.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::YELLOW ); | 105 | + Property::Map shadowMap; |
| 106 | + shadowMap.Insert( "color", Color::YELLOW ); | ||
| 107 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 106 | label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); | 108 | label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true ); |
| 107 | 109 | ||
| 108 | Vector2 stageSize = Stage::GetCurrent().GetSize(); | 110 | Vector2 stageSize = Stage::GetCurrent().GetSize(); |
| @@ -113,55 +115,73 @@ public: | @@ -113,55 +115,73 @@ public: | ||
| 113 | case SINGLE_COLOR_TEXT: | 115 | case SINGLE_COLOR_TEXT: |
| 114 | { | 116 | { |
| 115 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); | 117 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); |
| 116 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | 118 | + |
| 119 | + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); | ||
| 120 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 117 | break; | 121 | break; |
| 118 | } | 122 | } |
| 119 | case SINGLE_COLOR_TEXT_WITH_STYLE: | 123 | case SINGLE_COLOR_TEXT_WITH_STYLE: |
| 120 | { | 124 | { |
| 121 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); | 125 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); |
| 122 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); | 126 | + |
| 127 | + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) ); | ||
| 128 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 123 | break; | 129 | break; |
| 124 | } | 130 | } |
| 125 | case SINGLE_COLOR_TEXT_WITH_EMOJI: | 131 | case SINGLE_COLOR_TEXT_WITH_EMOJI: |
| 126 | { | 132 | { |
| 127 | label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" ); | 133 | label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" ); |
| 128 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | 134 | + |
| 135 | + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); | ||
| 136 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 129 | break; | 137 | break; |
| 130 | } | 138 | } |
| 131 | case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI: | 139 | case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI: |
| 132 | { | 140 | { |
| 133 | label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" ); | 141 | label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" ); |
| 134 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); | 142 | + |
| 143 | + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) ); | ||
| 144 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 135 | break; | 145 | break; |
| 136 | } | 146 | } |
| 137 | case MULTI_COLOR_TEXT: | 147 | case MULTI_COLOR_TEXT: |
| 138 | { | 148 | { |
| 139 | label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); | 149 | label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); |
| 140 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | 150 | + |
| 151 | + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); | ||
| 152 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 141 | break; | 153 | break; |
| 142 | } | 154 | } |
| 143 | case MULTI_COLOR_TEXT_WITH_STYLE: | 155 | case MULTI_COLOR_TEXT_WITH_STYLE: |
| 144 | { | 156 | { |
| 145 | label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); | 157 | label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); |
| 146 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); | 158 | + |
| 159 | + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) ); | ||
| 160 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 147 | break; | 161 | break; |
| 148 | } | 162 | } |
| 149 | case MULTI_COLOR_TEXT_WITH_EMOJI: | 163 | case MULTI_COLOR_TEXT_WITH_EMOJI: |
| 150 | { | 164 | { |
| 151 | label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); | 165 | label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); |
| 152 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | 166 | + |
| 167 | + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); | ||
| 168 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 153 | break; | 169 | break; |
| 154 | } | 170 | } |
| 155 | case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI: | 171 | case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI: |
| 156 | { | 172 | { |
| 157 | label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); | 173 | label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" ); |
| 158 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) ); | 174 | + |
| 175 | + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) ); | ||
| 176 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 159 | break; | 177 | break; |
| 160 | } | 178 | } |
| 161 | case SMALL_TEXT_IN_LARGE_TEXT_LABEL: | 179 | case SMALL_TEXT_IN_LARGE_TEXT_LABEL: |
| 162 | { | 180 | { |
| 163 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); | 181 | label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" ); |
| 164 | - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) ); | 182 | + |
| 183 | + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) ); | ||
| 184 | + label.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 165 | label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size | 185 | label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size |
| 166 | break; | 186 | break; |
| 167 | } | 187 | } |
examples/text-scrolling/text-scrolling-example.cpp
| @@ -174,15 +174,16 @@ public: | @@ -174,15 +174,16 @@ public: | ||
| 174 | scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge ); | 174 | scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge ); |
| 175 | CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton ); | 175 | CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton ); |
| 176 | 176 | ||
| 177 | - | ||
| 178 | CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE ); | 177 | CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE ); |
| 179 | boxC.SetPosition( 0.0f, -300.0f, 1.0f ); | 178 | boxC.SetPosition( 0.0f, -300.0f, 1.0f ); |
| 180 | Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New(); | 179 | Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New(); |
| 181 | scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall ); | 180 | scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall ); |
| 182 | CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton ); | 181 | CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton ); |
| 183 | mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); | 182 | mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK ); |
| 184 | - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) ); | ||
| 185 | - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::CYAN ); | 183 | + Property::Map shadowMap; |
| 184 | + shadowMap.Insert( "color", Color::CYAN ); | ||
| 185 | + shadowMap.Insert( "offset", Vector2( 1.0f, 1.0f ) ); | ||
| 186 | + mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 186 | 187 | ||
| 187 | CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE ); | 188 | CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE ); |
| 188 | boxD.SetPosition( 0.0f, -200.0f, 1.0f ); | 189 | boxD.SetPosition( 0.0f, -200.0f, 1.0f ); |
| @@ -320,7 +321,9 @@ public: | @@ -320,7 +321,9 @@ public: | ||
| 320 | mToggleColor = true; | 321 | mToggleColor = true; |
| 321 | } | 322 | } |
| 322 | 323 | ||
| 323 | - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); | 324 | + Property::Map shadowMap; |
| 325 | + shadowMap.Insert( "color", Color::BLACK ); | ||
| 326 | + mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); | ||
| 324 | mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); | 327 | mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); |
| 325 | mRtlLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); | 328 | mRtlLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); |
| 326 | mLargeLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); | 329 | mLargeLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color ); |
packaging/com.samsung.dali-demo.spec
| @@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | Name: com.samsung.dali-demo | 3 | Name: com.samsung.dali-demo |
| 4 | Summary: The OpenGLES Canvas Core Demo | 4 | Summary: The OpenGLES Canvas Core Demo |
| 5 | -Version: 1.4.0 | 5 | +Version: 1.4.1 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |