Commit 8e1d322d2e00dc0dfac611507fb1bd7cb72c96be
[dali_1.2.50] Merge branch 'devel/master'
Change-Id: Ia9f540043283fb4efae53d95f7e645d3bc622924
Showing
2 changed files
with
16 additions
and
3 deletions
examples/alpha-blending-cpu/alpha-blending-cpu-example.cpp
| @@ -28,8 +28,8 @@ const char* const IMAGE_PATH_1 ( DEMO_IMAGE_DIR "people-small-7b.jpg" ); // 100x | @@ -28,8 +28,8 @@ const char* const IMAGE_PATH_1 ( DEMO_IMAGE_DIR "people-small-7b.jpg" ); // 100x | ||
| 28 | const char* const IMAGE_PATH_2 ( DEMO_IMAGE_DIR "people-medium-7.jpg" ); | 28 | const char* const IMAGE_PATH_2 ( DEMO_IMAGE_DIR "people-medium-7.jpg" ); |
| 29 | const char* const IMAGE_PATH_3 ( DEMO_IMAGE_DIR "people-medium-7-rgb565.png" ); // is compressed | 29 | const char* const IMAGE_PATH_3 ( DEMO_IMAGE_DIR "people-medium-7-rgb565.png" ); // is compressed |
| 30 | const char* const IMAGE_PATH_4 ( DEMO_IMAGE_DIR "people-medium-7-masked.png" ); // has alpha channel | 30 | const char* const IMAGE_PATH_4 ( DEMO_IMAGE_DIR "people-medium-7-masked.png" ); // has alpha channel |
| 31 | -const char* const MASK_IMAGE_PATH_1 ( DEMO_IMAGE_DIR "store_mask_profile_f.png" ); | ||
| 32 | -const char* const MASK_IMAGE_PATH_2 ( DEMO_IMAGE_DIR "store_mask_profile_n.png" ); // 300x300 | 31 | +const char* const MASK_IMAGE_PATH_1 ( DEMO_IMAGE_DIR "store_mask_profile_n.png" ); // 300x300 |
| 32 | +const char* const MASK_IMAGE_PATH_2 ( DEMO_IMAGE_DIR "store_mask_profile_f.png" ); | ||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | class ImageViewAlphaBlendApp : public ConnectionTracker | 35 | class ImageViewAlphaBlendApp : public ConnectionTracker |
| @@ -108,10 +108,23 @@ private: | @@ -108,10 +108,23 @@ private: | ||
| 108 | 108 | ||
| 109 | const char* mask = masks[mImageCombinationIndex%2 ]; // Cycle through masks | 109 | const char* mask = masks[mImageCombinationIndex%2 ]; // Cycle through masks |
| 110 | const char* image = images[(mImageCombinationIndex/2)%4]; // then images | 110 | const char* image = images[(mImageCombinationIndex/2)%4]; // then images |
| 111 | + | ||
| 111 | Property::Map map; | 112 | Property::Map map; |
| 112 | map.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::Type::IMAGE ); | 113 | map.Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::Type::IMAGE ); |
| 113 | map.Add( Toolkit::ImageVisual::Property::URL, image ); | 114 | map.Add( Toolkit::ImageVisual::Property::URL, image ); |
| 114 | map.Add( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, mask ); | 115 | map.Add( Toolkit::DevelImageVisual::Property::ALPHA_MASK_URL, mask ); |
| 116 | + | ||
| 117 | + if( mImageCombinationIndex%2 == 0 ) | ||
| 118 | + { | ||
| 119 | + map.Add( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.f ); | ||
| 120 | + map.Add( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, false ); | ||
| 121 | + } | ||
| 122 | + else | ||
| 123 | + { | ||
| 124 | + map.Add( Toolkit::DevelImageVisual::Property::MASK_CONTENT_SCALE, 1.6f ); | ||
| 125 | + map.Add( Toolkit::DevelImageVisual::Property::CROP_TO_MASK, true ); | ||
| 126 | + } | ||
| 127 | + | ||
| 115 | mImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); | 128 | mImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map ); |
| 116 | 129 | ||
| 117 | mImageLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, strrchr(image, '/') ); | 130 | mImageLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, strrchr(image, '/') ); |
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.2.49 | 5 | +Version: 1.2.50 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |