Commit d2223117baea75e170556014107fbc6455c02cbc
[dali_1.1.32] Merge branch 'devel/master'
Change-Id: Icaee249b52034a0f44859520609cc2acec7c9eda
Showing
18 changed files
with
156 additions
and
213 deletions
demo/dali-table-view.cpp
| @@ -299,8 +299,6 @@ void DaliTableView::Initialize( Application& application ) | @@ -299,8 +299,6 @@ void DaliTableView::Initialize( Application& application ) | ||
| 299 | unsigned int degrees = 0; | 299 | unsigned int degrees = 0; |
| 300 | Rotate( degrees ); | 300 | Rotate( degrees ); |
| 301 | 301 | ||
| 302 | - //orientation.ChangedSignal().Connect( this, &DaliTableView::OrientationChanged ); | ||
| 303 | - | ||
| 304 | winHandle.ShowIndicator( Dali::Window::INVISIBLE ); | 302 | winHandle.ShowIndicator( Dali::Window::INVISIBLE ); |
| 305 | 303 | ||
| 306 | // Background animation | 304 | // Background animation |
| @@ -415,11 +413,6 @@ void DaliTableView::Populate() | @@ -415,11 +413,6 @@ void DaliTableView::Populate() | ||
| 415 | mScrollView.SetRulerY( mScrollRulerY ); | 413 | mScrollView.SetRulerY( mScrollRulerY ); |
| 416 | } | 414 | } |
| 417 | 415 | ||
| 418 | -void DaliTableView::OrientationChanged( Orientation orientation ) | ||
| 419 | -{ | ||
| 420 | - // TODO: Implement if orientation change required | ||
| 421 | -} | ||
| 422 | - | ||
| 423 | void DaliTableView::Rotate( unsigned int degrees ) | 416 | void DaliTableView::Rotate( unsigned int degrees ) |
| 424 | { | 417 | { |
| 425 | // Resize the root actor | 418 | // Resize the root actor |
examples/image-scaling-and-filtering/image-scaling-and-filtering-example.cpp
| @@ -178,11 +178,11 @@ public: | @@ -178,11 +178,11 @@ public: | ||
| 178 | // Background image: | 178 | // Background image: |
| 179 | Dali::Property::Map backgroundImage; | 179 | Dali::Property::Map backgroundImage; |
| 180 | backgroundImage.Insert( "rendererType", "image" ); | 180 | backgroundImage.Insert( "rendererType", "image" ); |
| 181 | - backgroundImage.Insert( "imageUrl", BACKGROUND_IMAGE ); | ||
| 182 | - backgroundImage.Insert( "imageDesiredWidth", stage.GetSize().width ); | ||
| 183 | - backgroundImage.Insert( "imageDesiredHeight", stage.GetSize().height ); | ||
| 184 | - backgroundImage.Insert( "imageFittingMode", "scaleToFill" ); | ||
| 185 | - backgroundImage.Insert( "imageSamplingMode", "boxThenNearest" ); | 181 | + backgroundImage.Insert( "url", BACKGROUND_IMAGE ); |
| 182 | + backgroundImage.Insert( "desiredWidth", stage.GetSize().width ); | ||
| 183 | + backgroundImage.Insert( "desiredHeight", stage.GetSize().height ); | ||
| 184 | + backgroundImage.Insert( "fittingMode", "SCALE_TO_FILL" ); | ||
| 185 | + backgroundImage.Insert( "samplingMode", "BOX_THEN_NEAREST" ); | ||
| 186 | 186 | ||
| 187 | Toolkit::ImageView background = Toolkit::ImageView::New(); | 187 | Toolkit::ImageView background = Toolkit::ImageView::New(); |
| 188 | background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage ); | 188 | background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage ); |
examples/item-view/item-view-example.cpp
| @@ -209,8 +209,6 @@ public: | @@ -209,8 +209,6 @@ public: | ||
| 209 | TOOLBAR_IMAGE, | 209 | TOOLBAR_IMAGE, |
| 210 | "" ); | 210 | "" ); |
| 211 | 211 | ||
| 212 | - //app.GetWindow().GetOrientation().ChangedSignal().Connect( this, &ItemViewExample::OnOrientationChanged ); | ||
| 213 | - | ||
| 214 | // Create an edit mode button. (left of toolbar) | 212 | // Create an edit mode button. (left of toolbar) |
| 215 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); | 213 | Toolkit::PushButton editButton = Toolkit::PushButton::New(); |
| 216 | editButton.SetUnselectedImage( EDIT_IMAGE ); | 214 | editButton.SetUnselectedImage( EDIT_IMAGE ); |
| @@ -380,24 +378,6 @@ public: | @@ -380,24 +378,6 @@ public: | ||
| 380 | mItemView.ActivateLayout( layoutId, Vector3(stageSize.x, stageSize.y, stageSize.x), 0.0f ); | 378 | mItemView.ActivateLayout( layoutId, Vector3(stageSize.x, stageSize.y, stageSize.x), 0.0f ); |
| 381 | } | 379 | } |
| 382 | 380 | ||
| 383 | - /** | ||
| 384 | - * Orientation changed signal callback | ||
| 385 | - * @param orientation | ||
| 386 | - */ | ||
| 387 | - void OnOrientationChanged( Orientation orientation ) | ||
| 388 | - { | ||
| 389 | - const unsigned int angle = orientation.GetDegrees(); | ||
| 390 | - | ||
| 391 | - // If orientation really changed | ||
| 392 | - if( mOrientation != angle ) | ||
| 393 | - { | ||
| 394 | - // Remember orientation | ||
| 395 | - mOrientation = angle; | ||
| 396 | - | ||
| 397 | - SetLayout( mCurrentLayout ); | ||
| 398 | - } | ||
| 399 | - } | ||
| 400 | - | ||
| 401 | bool OnLayoutButtonClicked( Toolkit::Button button ) | 381 | bool OnLayoutButtonClicked( Toolkit::Button button ) |
| 402 | { | 382 | { |
| 403 | // Switch to the next layout | 383 | // Switch to the next layout |
examples/line-mesh/line-mesh-example.cpp
| @@ -22,6 +22,8 @@ | @@ -22,6 +22,8 @@ | ||
| 22 | // INTERNAL INCLUDES | 22 | // INTERNAL INCLUDES |
| 23 | #include "shared/view.h" | 23 | #include "shared/view.h" |
| 24 | 24 | ||
| 25 | +#include <sstream> | ||
| 26 | + | ||
| 25 | using namespace Dali; | 27 | using namespace Dali; |
| 26 | 28 | ||
| 27 | namespace | 29 | namespace |
| @@ -62,43 +64,11 @@ void main() | @@ -62,43 +64,11 @@ void main() | ||
| 62 | } | 64 | } |
| 63 | ); | 65 | ); |
| 64 | 66 | ||
| 65 | -PropertyBuffer CreateIndexBuffer( Geometry::GeometryType geometryType ) | ||
| 66 | -{ | ||
| 67 | - // Create indices | ||
| 68 | - const unsigned int indexDataLines[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 }; | ||
| 69 | - const unsigned int indexDataLoops[] = { 0, 1, 2, 3, 4 }; | ||
| 70 | - const unsigned int indexDataStrips[] = { 0, 1, 2, 3, 4, 0 }; | ||
| 71 | - | ||
| 72 | - // Create index buffer if doesn't exist | ||
| 73 | - Property::Map indexFormat; | ||
| 74 | - indexFormat["indices"] = Property::INTEGER; | ||
| 75 | - PropertyBuffer indices = PropertyBuffer::New( indexFormat ); | ||
| 76 | - | ||
| 77 | - // Update buffer | ||
| 78 | - switch( geometryType ) | ||
| 79 | - { | ||
| 80 | - case Geometry::LINES: | ||
| 81 | - { | ||
| 82 | - indices.SetData( indexDataLines, sizeof(indexDataLines)/sizeof(indexDataLines[0]) ); | ||
| 83 | - break; | ||
| 84 | - } | ||
| 85 | - case Geometry::LINE_LOOP: | ||
| 86 | - { | ||
| 87 | - indices.SetData( indexDataLoops, sizeof(indexDataLoops)/sizeof(indexDataLoops[0]) ); | ||
| 88 | - break; | ||
| 89 | - } | ||
| 90 | - case Geometry::LINE_STRIP: | ||
| 91 | - { | ||
| 92 | - indices.SetData( indexDataStrips, sizeof(indexDataStrips)/sizeof(indexDataStrips[0]) ); | ||
| 93 | - break; | ||
| 94 | - } | ||
| 95 | - default: // this will never happen, but compilers yells | ||
| 96 | - { | ||
| 97 | - } | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - return indices; | ||
| 101 | -} | 67 | +const unsigned short INDEX_LINES[] = { 0, 1, 1, 2, 2, 3, 3, 4, 4, 0 }; |
| 68 | +const unsigned short INDEX_LOOP[] = { 0, 1, 2, 3, 4 }; | ||
| 69 | +const unsigned short INDEX_STRIP[] = { 0, 1, 2, 3, 4, 0 }; | ||
| 70 | +const unsigned short* INDICES[3] = { &INDEX_LINES[0], &INDEX_LOOP[0], &INDEX_STRIP[0] }; | ||
| 71 | +const unsigned int INDICES_SIZE[3] = { sizeof(INDEX_LINES)/sizeof(INDEX_LINES[0]), sizeof(INDEX_LOOP)/sizeof(INDEX_LOOP[0]), sizeof(INDEX_STRIP)/sizeof(INDEX_STRIP[0])}; | ||
| 102 | 72 | ||
| 103 | Geometry CreateGeometry() | 73 | Geometry CreateGeometry() |
| 104 | { | 74 | { |
| @@ -127,13 +97,11 @@ Geometry CreateGeometry() | @@ -127,13 +97,11 @@ Geometry CreateGeometry() | ||
| 127 | PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat ); | 97 | PropertyBuffer pentagonVertices = PropertyBuffer::New( pentagonVertexFormat ); |
| 128 | pentagonVertices.SetData(pentagonVertexData, 5); | 98 | pentagonVertices.SetData(pentagonVertexData, 5); |
| 129 | 99 | ||
| 130 | - // Create indices | ||
| 131 | - PropertyBuffer indices = CreateIndexBuffer( Geometry::LINES ); | ||
| 132 | 100 | ||
| 133 | // Create the geometry object | 101 | // Create the geometry object |
| 134 | Geometry pentagonGeometry = Geometry::New(); | 102 | Geometry pentagonGeometry = Geometry::New(); |
| 135 | pentagonGeometry.AddVertexBuffer( pentagonVertices ); | 103 | pentagonGeometry.AddVertexBuffer( pentagonVertices ); |
| 136 | - pentagonGeometry.SetIndexBuffer( indices ); | 104 | + pentagonGeometry.SetIndexBuffer( INDICES[0], INDICES_SIZE[0] ); |
| 137 | pentagonGeometry.SetGeometryType( Geometry::LINES ); | 105 | pentagonGeometry.SetGeometryType( Geometry::LINES ); |
| 138 | return pentagonGeometry; | 106 | return pentagonGeometry; |
| 139 | } | 107 | } |
| @@ -173,14 +141,18 @@ public: | @@ -173,14 +141,18 @@ public: | ||
| 173 | { | 141 | { |
| 174 | Stage stage = Stage::GetCurrent(); | 142 | Stage stage = Stage::GetCurrent(); |
| 175 | 143 | ||
| 144 | + // initial settings | ||
| 145 | + mPrimitiveType = Geometry::LINES; | ||
| 146 | + mCurrentIndexCount = 10; | ||
| 147 | + mMaxIndexCount = 10; | ||
| 148 | + | ||
| 176 | CreateRadioButtons(); | 149 | CreateRadioButtons(); |
| 177 | 150 | ||
| 178 | stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); | 151 | stage.KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent); |
| 179 | 152 | ||
| 180 | mStageSize = stage.GetSize(); | 153 | mStageSize = stage.GetSize(); |
| 181 | 154 | ||
| 182 | - // The Init signal is received once (only) during the Application lifetime | ||
| 183 | - ReInitialise( Geometry::LINES ); | 155 | + Initialise(); |
| 184 | 156 | ||
| 185 | // Hide the indicator bar | 157 | // Hide the indicator bar |
| 186 | application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); | 158 | application.GetWindow().ShowIndicator( Dali::Window::INVISIBLE ); |
| @@ -190,9 +162,8 @@ public: | @@ -190,9 +162,8 @@ public: | ||
| 190 | 162 | ||
| 191 | /** | 163 | /** |
| 192 | * Invoked whenever application changes the type of geometry drawn | 164 | * Invoked whenever application changes the type of geometry drawn |
| 193 | - * @param[in] type of geometry | ||
| 194 | */ | 165 | */ |
| 195 | - void ReInitialise( Geometry::GeometryType geometryType ) | 166 | + void Initialise() |
| 196 | { | 167 | { |
| 197 | Stage stage = Stage::GetCurrent(); | 168 | Stage stage = Stage::GetCurrent(); |
| 198 | 169 | ||
| @@ -207,6 +178,9 @@ public: | @@ -207,6 +178,9 @@ public: | ||
| 207 | mGeometry = CreateGeometry(); | 178 | mGeometry = CreateGeometry(); |
| 208 | mRenderer = Renderer::New( mGeometry, mShader ); | 179 | mRenderer = Renderer::New( mGeometry, mShader ); |
| 209 | 180 | ||
| 181 | + mRenderer.SetIndexRange( 0, 10 ); // lines | ||
| 182 | + mPrimitiveType = Geometry::LINES; | ||
| 183 | + | ||
| 210 | mMeshActor = Actor::New(); | 184 | mMeshActor = Actor::New(); |
| 211 | mMeshActor.AddRenderer( mRenderer ); | 185 | mMeshActor.AddRenderer( mRenderer ); |
| 212 | mMeshActor.SetSize(200, 200); | 186 | mMeshActor.SetSize(200, 200); |
| @@ -236,14 +210,14 @@ public: | @@ -236,14 +210,14 @@ public: | ||
| 236 | { | 210 | { |
| 237 | Stage stage = Stage::GetCurrent(); | 211 | Stage stage = Stage::GetCurrent(); |
| 238 | 212 | ||
| 239 | - Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 3, 1 ); | 213 | + Toolkit::TableView modeSelectTableView = Toolkit::TableView::New( 4, 1 ); |
| 240 | modeSelectTableView.SetParentOrigin( ParentOrigin::TOP_LEFT ); | 214 | modeSelectTableView.SetParentOrigin( ParentOrigin::TOP_LEFT ); |
| 241 | modeSelectTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | 215 | modeSelectTableView.SetAnchorPoint( AnchorPoint::TOP_LEFT ); |
| 242 | modeSelectTableView.SetFitHeight( 0 ); | 216 | modeSelectTableView.SetFitHeight( 0 ); |
| 243 | modeSelectTableView.SetFitHeight( 1 ); | 217 | modeSelectTableView.SetFitHeight( 1 ); |
| 244 | modeSelectTableView.SetFitHeight( 2 ); | 218 | modeSelectTableView.SetFitHeight( 2 ); |
| 245 | modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) ); | 219 | modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) ); |
| 246 | - modeSelectTableView.SetScale( Vector3( 0.5f, 0.5f, 0.5f )); | 220 | + modeSelectTableView.SetScale( Vector3( 0.8f, 0.8f, 0.8f )); |
| 247 | 221 | ||
| 248 | const char* labels[] = | 222 | const char* labels[] = |
| 249 | { | 223 | { |
| @@ -268,7 +242,46 @@ public: | @@ -268,7 +242,46 @@ public: | ||
| 268 | mButtons[i] = radio; | 242 | mButtons[i] = radio; |
| 269 | modeSelectTableView.AddChild( radio, Toolkit::TableView::CellPosition( i, 0 ) ); | 243 | modeSelectTableView.AddChild( radio, Toolkit::TableView::CellPosition( i, 0 ) ); |
| 270 | } | 244 | } |
| 245 | + | ||
| 246 | + Toolkit::TableView elementCountTableView = Toolkit::TableView::New( 1, 3 ); | ||
| 247 | + elementCountTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) ); | ||
| 248 | + elementCountTableView.SetParentOrigin( ParentOrigin::BOTTOM_LEFT ); | ||
| 249 | + elementCountTableView.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT ); | ||
| 250 | + elementCountTableView.SetFitHeight( 0 ); | ||
| 251 | + elementCountTableView.SetFitWidth( 0 ); | ||
| 252 | + elementCountTableView.SetFitWidth( 1 ); | ||
| 253 | + elementCountTableView.SetFitWidth( 2 ); | ||
| 254 | + mMinusButton = Toolkit::PushButton::New(); | ||
| 255 | + mMinusButton.SetLabelText( "<<" ); | ||
| 256 | + mMinusButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); | ||
| 257 | + mMinusButton.SetAnchorPoint( AnchorPoint::CENTER_LEFT ); | ||
| 258 | + | ||
| 259 | + Toolkit::PushButton mPlusButton = Toolkit::PushButton::New(); | ||
| 260 | + mPlusButton.SetLabelText( ">>" ); | ||
| 261 | + mPlusButton.SetParentOrigin( ParentOrigin::TOP_LEFT ); | ||
| 262 | + mPlusButton.SetAnchorPoint( AnchorPoint::CENTER_RIGHT ); | ||
| 263 | + | ||
| 264 | + mMinusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked ); | ||
| 265 | + mPlusButton.ClickedSignal().Connect( this, &ExampleController::OnButtonClicked ); | ||
| 266 | + | ||
| 267 | + mIndicesCountLabel = Toolkit::TextLabel::New(); | ||
| 268 | + mIndicesCountLabel.SetParentOrigin( ParentOrigin::CENTER ); | ||
| 269 | + mIndicesCountLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT ); | ||
| 270 | + | ||
| 271 | + std::stringstream str; | ||
| 272 | + str << mCurrentIndexCount; | ||
| 273 | + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() ); | ||
| 274 | + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0, 1.0, 1.0, 1.0 ) ); | ||
| 275 | + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "BOTTOM"); | ||
| 276 | + mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::WIDTH ); | ||
| 277 | + mIndicesCountLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); | ||
| 278 | + | ||
| 279 | + elementCountTableView.AddChild( mMinusButton, Toolkit::TableView::CellPosition( 0, 0 ) ); | ||
| 280 | + elementCountTableView.AddChild( mIndicesCountLabel, Toolkit::TableView::CellPosition( 0, 1 ) ); | ||
| 281 | + elementCountTableView.AddChild( mPlusButton, Toolkit::TableView::CellPosition( 0, 2 ) ); | ||
| 282 | + | ||
| 271 | stage.Add(modeSelectTableView); | 283 | stage.Add(modeSelectTableView); |
| 284 | + stage.Add(elementCountTableView); | ||
| 272 | } | 285 | } |
| 273 | 286 | ||
| 274 | /** | 287 | /** |
| @@ -295,35 +308,57 @@ public: | @@ -295,35 +308,57 @@ public: | ||
| 295 | 308 | ||
| 296 | bool OnButtonPressed( Toolkit::Button button ) | 309 | bool OnButtonPressed( Toolkit::Button button ) |
| 297 | { | 310 | { |
| 298 | - const Geometry::GeometryType geomTypes[] = | ||
| 299 | - { | ||
| 300 | - Geometry::LINES, | ||
| 301 | - Geometry::LINE_LOOP, | ||
| 302 | - Geometry::LINE_STRIP | ||
| 303 | - }; | ||
| 304 | - | ||
| 305 | - size_t index; | 311 | + int indicesArray; |
| 306 | if( button == mButtons[0] ) | 312 | if( button == mButtons[0] ) |
| 307 | { | 313 | { |
| 308 | - index = 0; | 314 | + mCurrentIndexCount = 10; |
| 315 | + mMaxIndexCount = 10; | ||
| 316 | + mPrimitiveType = Geometry::LINES; | ||
| 317 | + indicesArray = 0; | ||
| 309 | } | 318 | } |
| 310 | else if( button == mButtons[1] ) | 319 | else if( button == mButtons[1] ) |
| 311 | { | 320 | { |
| 312 | - index = 1; | 321 | + mCurrentIndexCount = 5; |
| 322 | + mMaxIndexCount = 5; | ||
| 323 | + mPrimitiveType = Geometry::LINE_LOOP; | ||
| 324 | + indicesArray = 1; | ||
| 313 | } | 325 | } |
| 314 | else | 326 | else |
| 315 | { | 327 | { |
| 316 | - index = 2; | 328 | + mCurrentIndexCount = 6; |
| 329 | + mMaxIndexCount = 6; | ||
| 330 | + mPrimitiveType = Geometry::LINE_STRIP; | ||
| 331 | + indicesArray = 2; | ||
| 317 | } | 332 | } |
| 318 | 333 | ||
| 319 | - PropertyBuffer indices = CreateIndexBuffer( geomTypes[ index ] ); | ||
| 320 | - mGeometry.SetIndexBuffer( indices ); | ||
| 321 | - mGeometry.SetGeometryType( geomTypes[ index ] ); | ||
| 322 | - | 334 | + std::stringstream str; |
| 335 | + str << mCurrentIndexCount; | ||
| 336 | + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() ); | ||
| 337 | + mGeometry.SetGeometryType( mPrimitiveType ); | ||
| 338 | + mGeometry.SetIndexBuffer( INDICES[ indicesArray ], INDICES_SIZE[ indicesArray ] ); | ||
| 339 | + mRenderer.SetIndexRange( 0, mCurrentIndexCount ); | ||
| 323 | return true; | 340 | return true; |
| 324 | } | 341 | } |
| 325 | 342 | ||
| 343 | + bool OnButtonClicked( Toolkit::Button button ) | ||
| 344 | + { | ||
| 345 | + if( button == mMinusButton ) | ||
| 346 | + { | ||
| 347 | + if (--mCurrentIndexCount < 2 ) | ||
| 348 | + mCurrentIndexCount = 2; | ||
| 349 | + } | ||
| 350 | + else | ||
| 351 | + { | ||
| 352 | + if (++mCurrentIndexCount > mMaxIndexCount ) | ||
| 353 | + mCurrentIndexCount = mMaxIndexCount; | ||
| 354 | + } | ||
| 326 | 355 | ||
| 356 | + std::stringstream str; | ||
| 357 | + str << mCurrentIndexCount; | ||
| 358 | + mIndicesCountLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, str.str() ); | ||
| 359 | + mRenderer.SetIndexRange( 0, mCurrentIndexCount ); | ||
| 360 | + return true; | ||
| 361 | + } | ||
| 327 | 362 | ||
| 328 | private: | 363 | private: |
| 329 | 364 | ||
| @@ -334,7 +369,13 @@ private: | @@ -334,7 +369,13 @@ private: | ||
| 334 | Geometry mGeometry; | 369 | Geometry mGeometry; |
| 335 | Renderer mRenderer; | 370 | Renderer mRenderer; |
| 336 | Actor mMeshActor; | 371 | Actor mMeshActor; |
| 337 | - Toolkit::RadioButton mButtons[3]; | 372 | + Toolkit::RadioButton mButtons[3]; |
| 373 | + Toolkit::PushButton mMinusButton; | ||
| 374 | + Toolkit::PushButton mPlusButton; | ||
| 375 | + Toolkit::TextLabel mIndicesCountLabel; | ||
| 376 | + Geometry::GeometryType mPrimitiveType; | ||
| 377 | + int mCurrentIndexCount; | ||
| 378 | + int mMaxIndexCount; | ||
| 338 | }; | 379 | }; |
| 339 | 380 | ||
| 340 | void RunTest( Application& application ) | 381 | void RunTest( Application& application ) |
examples/mesh-sorting/mesh-sorting-example.cpp
| @@ -102,16 +102,12 @@ Geometry CreateGeometry() | @@ -102,16 +102,12 @@ Geometry CreateGeometry() | ||
| 102 | texturedQuadVertices.SetData( texturedQuadVertexData, 4 ); | 102 | texturedQuadVertices.SetData( texturedQuadVertexData, 4 ); |
| 103 | 103 | ||
| 104 | // Create indices | 104 | // Create indices |
| 105 | - unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; | ||
| 106 | - Property::Map indexFormat; | ||
| 107 | - indexFormat["indices"] = Property::INTEGER; | ||
| 108 | - PropertyBuffer indices = PropertyBuffer::New( indexFormat ); | ||
| 109 | - indices.SetData( indexData, 6 ); | 105 | + unsigned short indexData[6] = { 0, 3, 1, 0, 2, 3 }; |
| 110 | 106 | ||
| 111 | // Create the geometry object | 107 | // Create the geometry object |
| 112 | Geometry texturedQuadGeometry = Geometry::New(); | 108 | Geometry texturedQuadGeometry = Geometry::New(); |
| 113 | texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices ); | 109 | texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices ); |
| 114 | - texturedQuadGeometry.SetIndexBuffer( indices ); | 110 | + texturedQuadGeometry.SetIndexBuffer( &indexData[0], sizeof(indexData)/sizeof(unsigned short) ); |
| 115 | 111 | ||
| 116 | return texturedQuadGeometry; | 112 | return texturedQuadGeometry; |
| 117 | } | 113 | } |
examples/metaball-explosion/metaball-explosion-example.cpp
| @@ -373,8 +373,6 @@ Geometry MetaballExplosionController::CreateGeometry() | @@ -373,8 +373,6 @@ Geometry MetaballExplosionController::CreateGeometry() | ||
| 373 | { Vector2(1.0f, 1.0f * aspect) } | 373 | { Vector2(1.0f, 1.0f * aspect) } |
| 374 | }; | 374 | }; |
| 375 | 375 | ||
| 376 | - int indices[] = { 0, 3, 1, 0, 2, 3 }; | ||
| 377 | - | ||
| 378 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); | 376 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); |
| 379 | 377 | ||
| 380 | //Vertices | 378 | //Vertices |
| @@ -390,17 +388,14 @@ Geometry MetaballExplosionController::CreateGeometry() | @@ -390,17 +388,14 @@ Geometry MetaballExplosionController::CreateGeometry() | ||
| 390 | textureVertices.SetData( textures, numberOfVertices ); | 388 | textureVertices.SetData( textures, numberOfVertices ); |
| 391 | 389 | ||
| 392 | //Indices | 390 | //Indices |
| 393 | - Property::Map indicesVertexFormat; | ||
| 394 | - indicesVertexFormat["aIndices"] = Property::INTEGER; | ||
| 395 | - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat ); | ||
| 396 | - indicesToVertices.SetData( indices, 6 ); | 391 | + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 }; |
| 397 | 392 | ||
| 398 | // Create the geometry object | 393 | // Create the geometry object |
| 399 | Geometry texturedQuadGeometry = Geometry::New(); | 394 | Geometry texturedQuadGeometry = Geometry::New(); |
| 400 | texturedQuadGeometry.AddVertexBuffer( positionVertices ); | 395 | texturedQuadGeometry.AddVertexBuffer( positionVertices ); |
| 401 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); | 396 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); |
| 402 | 397 | ||
| 403 | - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices ); | 398 | + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) ); |
| 404 | 399 | ||
| 405 | return texturedQuadGeometry; | 400 | return texturedQuadGeometry; |
| 406 | } | 401 | } |
| @@ -431,8 +426,6 @@ Geometry MetaballExplosionController::CreateGeometryComposition() | @@ -431,8 +426,6 @@ Geometry MetaballExplosionController::CreateGeometryComposition() | ||
| 431 | { Vector2(1.0f, 1.0f) } | 426 | { Vector2(1.0f, 1.0f) } |
| 432 | }; | 427 | }; |
| 433 | 428 | ||
| 434 | - int indices[] = { 0, 3, 1, 0, 2, 3 }; | ||
| 435 | - | ||
| 436 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); | 429 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); |
| 437 | 430 | ||
| 438 | //Vertices | 431 | //Vertices |
| @@ -448,17 +441,14 @@ Geometry MetaballExplosionController::CreateGeometryComposition() | @@ -448,17 +441,14 @@ Geometry MetaballExplosionController::CreateGeometryComposition() | ||
| 448 | textureVertices.SetData( textures, numberOfVertices ); | 441 | textureVertices.SetData( textures, numberOfVertices ); |
| 449 | 442 | ||
| 450 | //Indices | 443 | //Indices |
| 451 | - Property::Map indicesVertexFormat; | ||
| 452 | - indicesVertexFormat["aIndices"] = Property::INTEGER; | ||
| 453 | - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat ); | ||
| 454 | - indicesToVertices.SetData( indices, 6 ); | 444 | + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 }; |
| 455 | 445 | ||
| 456 | // Create the geometry object | 446 | // Create the geometry object |
| 457 | Geometry texturedQuadGeometry = Geometry::New(); | 447 | Geometry texturedQuadGeometry = Geometry::New(); |
| 458 | texturedQuadGeometry.AddVertexBuffer( positionVertices ); | 448 | texturedQuadGeometry.AddVertexBuffer( positionVertices ); |
| 459 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); | 449 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); |
| 460 | 450 | ||
| 461 | - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices ); | 451 | + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) ); |
| 462 | 452 | ||
| 463 | return texturedQuadGeometry; | 453 | return texturedQuadGeometry; |
| 464 | } | 454 | } |
examples/metaball-refrac/metaball-refrac-example.cpp
| @@ -322,8 +322,6 @@ Geometry MetaballRefracController::CreateGeometry() | @@ -322,8 +322,6 @@ Geometry MetaballRefracController::CreateGeometry() | ||
| 322 | { Vector3(0.0f, 0.0f, 1.0f) } | 322 | { Vector3(0.0f, 0.0f, 1.0f) } |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | - int indices[] = { 0, 3, 1, 0, 2, 3 }; | ||
| 326 | - | ||
| 327 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); | 325 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); |
| 328 | 326 | ||
| 329 | //Vertices | 327 | //Vertices |
| @@ -345,11 +343,7 @@ Geometry MetaballRefracController::CreateGeometry() | @@ -345,11 +343,7 @@ Geometry MetaballRefracController::CreateGeometry() | ||
| 345 | normalVertices.SetData( normals, numberOfVertices ); | 343 | normalVertices.SetData( normals, numberOfVertices ); |
| 346 | 344 | ||
| 347 | //Indices | 345 | //Indices |
| 348 | - Property::Map indicesVertexFormat; | ||
| 349 | - indicesVertexFormat["aIndices"] = Property::INTEGER; | ||
| 350 | - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat ); | ||
| 351 | - indicesToVertices.SetData( indices, 6 ); | ||
| 352 | - | 346 | + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 }; |
| 353 | 347 | ||
| 354 | // Create the geometry object | 348 | // Create the geometry object |
| 355 | Geometry texturedQuadGeometry = Geometry::New(); | 349 | Geometry texturedQuadGeometry = Geometry::New(); |
| @@ -357,7 +351,7 @@ Geometry MetaballRefracController::CreateGeometry() | @@ -357,7 +351,7 @@ Geometry MetaballRefracController::CreateGeometry() | ||
| 357 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); | 351 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); |
| 358 | texturedQuadGeometry.AddVertexBuffer( normalVertices ); | 352 | texturedQuadGeometry.AddVertexBuffer( normalVertices ); |
| 359 | 353 | ||
| 360 | - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices ); | 354 | + texturedQuadGeometry.SetIndexBuffer ( &indices[0], 6 ); |
| 361 | 355 | ||
| 362 | return texturedQuadGeometry; | 356 | return texturedQuadGeometry; |
| 363 | } | 357 | } |
| @@ -398,8 +392,6 @@ Geometry MetaballRefracController::CreateGeometryComposition() | @@ -398,8 +392,6 @@ Geometry MetaballRefracController::CreateGeometryComposition() | ||
| 398 | { Vector3(0.0f, 0.0f, 1.0f) } | 392 | { Vector3(0.0f, 0.0f, 1.0f) } |
| 399 | }; | 393 | }; |
| 400 | 394 | ||
| 401 | - int indices[] = { 0, 3, 1, 0, 2, 3 }; | ||
| 402 | - | ||
| 403 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); | 395 | unsigned int numberOfVertices = sizeof(vertices)/sizeof(VertexPosition); |
| 404 | 396 | ||
| 405 | //Vertices | 397 | //Vertices |
| @@ -421,10 +413,7 @@ Geometry MetaballRefracController::CreateGeometryComposition() | @@ -421,10 +413,7 @@ Geometry MetaballRefracController::CreateGeometryComposition() | ||
| 421 | normalVertices.SetData( normals, numberOfVertices ); | 413 | normalVertices.SetData( normals, numberOfVertices ); |
| 422 | 414 | ||
| 423 | //Indices | 415 | //Indices |
| 424 | - Property::Map indicesVertexFormat; | ||
| 425 | - indicesVertexFormat["aIndices"] = Property::INTEGER; | ||
| 426 | - PropertyBuffer indicesToVertices = PropertyBuffer::New( indicesVertexFormat ); | ||
| 427 | - indicesToVertices.SetData( indices, 6 ); | 416 | + unsigned short indices[] = { 0, 3, 1, 0, 2, 3 }; |
| 428 | 417 | ||
| 429 | // Create the geometry object | 418 | // Create the geometry object |
| 430 | Geometry texturedQuadGeometry = Geometry::New(); | 419 | Geometry texturedQuadGeometry = Geometry::New(); |
| @@ -432,7 +421,7 @@ Geometry MetaballRefracController::CreateGeometryComposition() | @@ -432,7 +421,7 @@ Geometry MetaballRefracController::CreateGeometryComposition() | ||
| 432 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); | 421 | texturedQuadGeometry.AddVertexBuffer( textureVertices ); |
| 433 | texturedQuadGeometry.AddVertexBuffer( normalVertices ); | 422 | texturedQuadGeometry.AddVertexBuffer( normalVertices ); |
| 434 | 423 | ||
| 435 | - texturedQuadGeometry.SetIndexBuffer ( indicesToVertices ); | 424 | + texturedQuadGeometry.SetIndexBuffer ( &indices[0], sizeof( indices )/ sizeof( indices[0] ) ); |
| 436 | 425 | ||
| 437 | return texturedQuadGeometry; | 426 | return texturedQuadGeometry; |
| 438 | } | 427 | } |
examples/motion-blur/motion-blur-example.cpp
| @@ -193,7 +193,6 @@ public: | @@ -193,7 +193,6 @@ public: | ||
| 193 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); | 193 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); |
| 194 | 194 | ||
| 195 | // set initial orientation | 195 | // set initial orientation |
| 196 | - // winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionBlurExampleApp::OnOrientationChanged ); | ||
| 197 | unsigned int degrees = 0; | 196 | unsigned int degrees = 0; |
| 198 | Rotate( static_cast< DeviceOrientation >( degrees ) ); | 197 | Rotate( static_cast< DeviceOrientation >( degrees ) ); |
| 199 | 198 | ||
| @@ -289,18 +288,6 @@ public: | @@ -289,18 +288,6 @@ public: | ||
| 289 | #endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS | 288 | #endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS |
| 290 | } | 289 | } |
| 291 | 290 | ||
| 292 | - ////////////////////////////////////////////////////////////// | ||
| 293 | - // | ||
| 294 | - // Device Orientation Support | ||
| 295 | - // | ||
| 296 | - // | ||
| 297 | - | ||
| 298 | - void OnOrientationChanged( Orientation orientation ) | ||
| 299 | - { | ||
| 300 | - unsigned int degrees = orientation.GetDegrees(); | ||
| 301 | - Rotate( static_cast< DeviceOrientation >( degrees ) ); | ||
| 302 | - } | ||
| 303 | - | ||
| 304 | void Rotate( DeviceOrientation orientation ) | 291 | void Rotate( DeviceOrientation orientation ) |
| 305 | { | 292 | { |
| 306 | // Resize the root actor | 293 | // Resize the root actor |
examples/motion-stretch/motion-stretch-example.cpp
| @@ -167,7 +167,6 @@ public: | @@ -167,7 +167,6 @@ public: | ||
| 167 | winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); | 167 | winHandle.AddAvailableOrientation( Dali::Window::PORTRAIT_INVERSE ); |
| 168 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); | 168 | winHandle.AddAvailableOrientation( Dali::Window::LANDSCAPE_INVERSE ); |
| 169 | 169 | ||
| 170 | - // winHandle.GetOrientation().ChangedSignal().Connect( this, &MotionStretchExampleApp::OnOrientationChanged ); | ||
| 171 | unsigned int degrees = 0; | 170 | unsigned int degrees = 0; |
| 172 | Rotate( static_cast< DeviceOrientation >( degrees ) ); | 171 | Rotate( static_cast< DeviceOrientation >( degrees ) ); |
| 173 | 172 | ||
| @@ -196,12 +195,6 @@ public: | @@ -196,12 +195,6 @@ public: | ||
| 196 | // | 195 | // |
| 197 | // | 196 | // |
| 198 | 197 | ||
| 199 | - void OnOrientationChanged( Orientation orientation ) | ||
| 200 | - { | ||
| 201 | - unsigned int degrees = orientation.GetDegrees(); | ||
| 202 | - Rotate( static_cast< DeviceOrientation >( degrees ) ); | ||
| 203 | - } | ||
| 204 | - | ||
| 205 | void Rotate( DeviceOrientation orientation ) | 198 | void Rotate( DeviceOrientation orientation ) |
| 206 | { | 199 | { |
| 207 | // Resize the root actor | 200 | // Resize the root actor |
examples/new-window/new-window-example.cpp
| @@ -450,16 +450,12 @@ Geometry NewWindowController::CreateMeshGeometry() | @@ -450,16 +450,12 @@ Geometry NewWindowController::CreateMeshGeometry() | ||
| 450 | vertices.SetData( vertexData, 5 ); | 450 | vertices.SetData( vertexData, 5 ); |
| 451 | 451 | ||
| 452 | // Specify all the faces | 452 | // Specify all the faces |
| 453 | - unsigned int indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 }; | ||
| 454 | - Property::Map indexFormat; | ||
| 455 | - indexFormat["indices"] = Property::INTEGER; | ||
| 456 | - PropertyBuffer indices = PropertyBuffer::New( indexFormat ); | ||
| 457 | - indices.SetData( indexData, 12 ); | 453 | + unsigned short indexData[12] = { 0,1,3,0,2,4,0,3,4,0,2,1 }; |
| 458 | 454 | ||
| 459 | // Create the geometry object | 455 | // Create the geometry object |
| 460 | Geometry geometry = Geometry::New(); | 456 | Geometry geometry = Geometry::New(); |
| 461 | geometry.AddVertexBuffer( vertices ); | 457 | geometry.AddVertexBuffer( vertices ); |
| 462 | - geometry.SetIndexBuffer( indices ); | 458 | + geometry.SetIndexBuffer( &indexData[0], 12 ); |
| 463 | 459 | ||
| 464 | return geometry; | 460 | return geometry; |
| 465 | } | 461 | } |
examples/radial-menu/radial-sweep-view-impl.cpp
| @@ -330,15 +330,11 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) | @@ -330,15 +330,11 @@ void RadialSweepViewImpl::CreateStencil( Radian initialSector ) | ||
| 330 | PropertyBuffer vertices = PropertyBuffer::New( vertexFormat ); | 330 | PropertyBuffer vertices = PropertyBuffer::New( vertexFormat ); |
| 331 | vertices.SetData( vertexData, 7u ); | 331 | vertices.SetData( vertexData, 7u ); |
| 332 | 332 | ||
| 333 | - unsigned int indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 }; | ||
| 334 | - Property::Map indexFormat; | ||
| 335 | - indexFormat["indices"] = Property::INTEGER; | ||
| 336 | - PropertyBuffer indices = PropertyBuffer::New( indexFormat ); | ||
| 337 | - indices.SetData( indexData, 15u ); | 333 | + unsigned short indexData[15] = { 0,1,2,0,2,3,0,3,4,0,4,5,0,5,6 }; |
| 338 | 334 | ||
| 339 | Geometry meshGeometry = Geometry::New(); | 335 | Geometry meshGeometry = Geometry::New(); |
| 340 | meshGeometry.AddVertexBuffer( vertices ); | 336 | meshGeometry.AddVertexBuffer( vertices ); |
| 341 | - meshGeometry.SetIndexBuffer( indices ); | 337 | + meshGeometry.SetIndexBuffer( &indexData[0], sizeof( indexData )/sizeof(indexData[0]) ); |
| 342 | 338 | ||
| 343 | // Create shader | 339 | // Create shader |
| 344 | std::ostringstream vertexShaderStringStream; | 340 | std::ostringstream vertexShaderStringStream; |
examples/textured-mesh/textured-mesh-example.cpp
| @@ -79,16 +79,12 @@ Geometry CreateGeometry() | @@ -79,16 +79,12 @@ Geometry CreateGeometry() | ||
| 79 | texturedQuadVertices.SetData( texturedQuadVertexData, 4 ); | 79 | texturedQuadVertices.SetData( texturedQuadVertexData, 4 ); |
| 80 | 80 | ||
| 81 | // Create indices | 81 | // Create indices |
| 82 | - unsigned int indexData[6] = { 0, 3, 1, 0, 2, 3 }; | ||
| 83 | - Property::Map indexFormat; | ||
| 84 | - indexFormat["indices"] = Property::INTEGER; | ||
| 85 | - PropertyBuffer indices = PropertyBuffer::New( indexFormat ); | ||
| 86 | - indices.SetData( indexData, sizeof(indexData)/sizeof(indexData[0]) ); | 82 | + unsigned short indexData[6] = { 0, 3, 1, 0, 2, 3 }; |
| 87 | 83 | ||
| 88 | // Create the geometry object | 84 | // Create the geometry object |
| 89 | Geometry texturedQuadGeometry = Geometry::New(); | 85 | Geometry texturedQuadGeometry = Geometry::New(); |
| 90 | texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices ); | 86 | texturedQuadGeometry.AddVertexBuffer( texturedQuadVertices ); |
| 91 | - texturedQuadGeometry.SetIndexBuffer( indices ); | 87 | + texturedQuadGeometry.SetIndexBuffer( &indexData[0], sizeof(indexData)/sizeof(indexData[0]) ); |
| 92 | 88 | ||
| 93 | return texturedQuadGeometry; | 89 | return texturedQuadGeometry; |
| 94 | } | 90 | } |
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.1.31 | 5 | +Version: 1.1.32 |
| 6 | Release: 1 | 6 | Release: 1 |
| 7 | Group: System/Libraries | 7 | Group: System/Libraries |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |
resources/scripts/animation.json
| @@ -118,9 +118,9 @@ | @@ -118,9 +118,9 @@ | ||
| 118 | "text": "or the image.." | 118 | "text": "or the image.." |
| 119 | }, { | 119 | }, { |
| 120 | "name": "image", | 120 | "name": "image", |
| 121 | - "type": "ImageActor", | 121 | + "type": "ImageView", |
| 122 | "image": { | 122 | "image": { |
| 123 | - "filename": "{DEMO_IMAGE_DIR}gallery-large-21.jpg" | 123 | + "url": "{DEMO_IMAGE_DIR}gallery-large-21.jpg" |
| 124 | }, | 124 | }, |
| 125 | "relayoutEnabled": false, | 125 | "relayoutEnabled": false, |
| 126 | "position": [0, 200, 0], | 126 | "position": [0, 200, 0], |
resources/scripts/background.json
| @@ -45,8 +45,8 @@ | @@ -45,8 +45,8 @@ | ||
| 45 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", | 45 | "heightResizePolicy":"SIZE_RELATIVE_TO_PARENT", |
| 46 | "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], | 46 | "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 47 | "background": { | 47 | "background": { |
| 48 | - "rendererType": "svg", | ||
| 49 | - "imageUrl": "{DEMO_IMAGE_DIR}Kid1.svg" | 48 | + "rendererType": "image", |
| 49 | + "url": "{DEMO_IMAGE_DIR}Kid1.svg" | ||
| 50 | } | 50 | } |
| 51 | }, | 51 | }, |
| 52 | 52 | ||
| @@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
| 77 | "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], | 77 | "sizeModeFactor": [ 0.5, 0.333333333333, 1 ], |
| 78 | "background": { | 78 | "background": { |
| 79 | "rendererType": "image", | 79 | "rendererType": "image", |
| 80 | - "imageUrl": "{DEMO_IMAGE_DIR}gallery-large-9.jpg" | 80 | + "url": "{DEMO_IMAGE_DIR}gallery-large-9.jpg" |
| 81 | } | 81 | } |
| 82 | }, | 82 | }, |
| 83 | 83 |
resources/scripts/shader-effect-ripple.json
| 1 | { | 1 | { |
| 2 | "stage": [ | 2 | "stage": [ |
| 3 | { | 3 | { |
| 4 | - "type": "ImageActor", | 4 | + "type": "ImageView", |
| 5 | "name": "Image1", | 5 | "name": "Image1", |
| 6 | "position": [ | 6 | "position": [ |
| 7 | 0.40461349487305, | 7 | 0.40461349487305, |
| @@ -11,13 +11,17 @@ | @@ -11,13 +11,17 @@ | ||
| 11 | "parentOrigin": [0.5, 0.5, 0.5], | 11 | "parentOrigin": [0.5, 0.5, 0.5], |
| 12 | "widthResizePolicy":"FILL_TO_PARENT", | 12 | "widthResizePolicy":"FILL_TO_PARENT", |
| 13 | "heightResizePolicy":"DIMENSION_DEPENDENCY", | 13 | "heightResizePolicy":"DIMENSION_DEPENDENCY", |
| 14 | - "effect": "Ripple2D", | ||
| 15 | "image": { | 14 | "image": { |
| 16 | - "filename": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg", | ||
| 17 | - "width": 400, | ||
| 18 | - "height": 400, | ||
| 19 | - "loadPolicy": "IMMEDIATE", | ||
| 20 | - "releasePolicy": "NEVER" | 15 | + "url": "{DEMO_IMAGE_DIR}gallery-medium-25.jpg", |
| 16 | + "desiredWidth": 400, | ||
| 17 | + "desiredHeight": 400, | ||
| 18 | + "shader": { | ||
| 19 | + "fragmentShader": "precision mediump float;\nuniform sampler2D sTexture;\nuniform vec4 uColor;\nuniform float uAmplitude;\nuniform float uTime;\nvarying vec2 vTexCoord;\nvoid main()\n{\n highp vec2 pos = -1.0 + 2.0 * vTexCoord;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude;\n gl_FragColor = texture2D(sTexture, texCoord) * uColor;}\n\n" | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + "animatableProperties": { | ||
| 23 | + "uAmplitude": 0.02, | ||
| 24 | + "uTime": 0.0 | ||
| 21 | }, | 25 | }, |
| 22 | "signals": [ | 26 | "signals": [ |
| 23 | { | 27 | { |
| @@ -28,7 +32,6 @@ | @@ -28,7 +32,6 @@ | ||
| 28 | ] | 32 | ] |
| 29 | } | 33 | } |
| 30 | ], | 34 | ], |
| 31 | - "paths": {}, | ||
| 32 | "animations": { | 35 | "animations": { |
| 33 | "Animation_1": { | 36 | "Animation_1": { |
| 34 | "loop":true, | 37 | "loop":true, |
| @@ -46,21 +49,5 @@ | @@ -46,21 +49,5 @@ | ||
| 46 | } | 49 | } |
| 47 | ] | 50 | ] |
| 48 | } | 51 | } |
| 49 | - }, | ||
| 50 | - "shaderEffects": { | ||
| 51 | - "Ripple2D": { | ||
| 52 | - "program": { | ||
| 53 | - "vertexPrefix": "", | ||
| 54 | - "vertex": "void main(void)\n{\n gl_Position = uMvpMatrix * vec4(aPosition, 1.0);\n vTexCoord = mix( sTextureRect.xy, sTextureRect.zw, aTexCoord );\n}\n\n", | ||
| 55 | - "fragmentPrefix": "", | ||
| 56 | - "fragment": "precision mediump float;\nuniform float uAmplitude; // 0.02; (< 1)\nuniform float uTime;\nvoid main()\n{\n highp vec2 textureSize = sTextureRect.zw - sTextureRect.xy;\n highp vec2 pos = -1.0 + 2.0 * vTexCoord.st/textureSize;\n highp float len = length(pos);\n highp vec2 texCoord = vTexCoord.st/textureSize + pos/len * sin( len * 12.0 - uTime * 4.0 ) * uAmplitude; \n gl_FragColor = texture2D(sTexture, texCoord) * uColor;\n}\n\n\n", | ||
| 57 | - "geometryType": "GEOMETRY_TYPE_IMAGE" | ||
| 58 | - }, | ||
| 59 | - "geometryHints": "HINT_NONE", | ||
| 60 | - "gridDensity": 0, | ||
| 61 | - "loop": true, | ||
| 62 | - "uAmplitude": 0.02, | ||
| 63 | - "uTime": 0.0 | ||
| 64 | - } | ||
| 65 | } | 52 | } |
| 66 | } | 53 | } |
resources/scripts/table-view.json
| @@ -63,34 +63,34 @@ | @@ -63,34 +63,34 @@ | ||
| 63 | }, | 63 | }, |
| 64 | "actors": [{ | 64 | "actors": [{ |
| 65 | "name":"gallery1", | 65 | "name":"gallery1", |
| 66 | - "type":"ImageActor", | 66 | + "type":"ImageView", |
| 67 | "heightResizePolicy":"FILL_TO_PARENT", | 67 | "heightResizePolicy":"FILL_TO_PARENT", |
| 68 | "image": { | 68 | "image": { |
| 69 | - "filename": "{DEMO_IMAGE_DIR}gallery-small-1.jpg" | 69 | + "url": "{DEMO_IMAGE_DIR}gallery-small-1.jpg" |
| 70 | }, | 70 | }, |
| 71 | - "customProperties": { // properties registered dynamically | 71 | + "properties": { // properties registered dynamically |
| 72 | "cellIndex": [0,0], // property to specify the top-left cell this child occupies | 72 | "cellIndex": [0,0], // property to specify the top-left cell this child occupies |
| 73 | "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1 | 73 | "rowSpan":4, // property to specify how many rows this child occupies, if not set, default value is 1 |
| 74 | "columnSpan":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1 | 74 | "columnSpan":1 // property to specify how many columns this child occupies, if nor set, defualt cvalue is 1 |
| 75 | } | 75 | } |
| 76 | },{ | 76 | },{ |
| 77 | "name":"gallery2", | 77 | "name":"gallery2", |
| 78 | - "type":"ImageActor", | 78 | + "type":"ImageView", |
| 79 | "heightResizePolicy":"FILL_TO_PARENT", | 79 | "heightResizePolicy":"FILL_TO_PARENT", |
| 80 | "image": { | 80 | "image": { |
| 81 | - "filename": "{DEMO_IMAGE_DIR}gallery-small-2.jpg" | 81 | + "url": "{DEMO_IMAGE_DIR}gallery-small-2.jpg" |
| 82 | }, | 82 | }, |
| 83 | - "customProperties": { // properties registered dynamically | 83 | + "properties": { // properties registered dynamically |
| 84 | "cellIndex": [0,1], | 84 | "cellIndex": [0,1], |
| 85 | "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left' | 85 | "cellHorizontalAlignment": "right" // property to specify how to align horizontally inside the cells, if not set, default value is 'left' |
| 86 | } | 86 | } |
| 87 | },{ | 87 | },{ |
| 88 | "name":"gallery3", | 88 | "name":"gallery3", |
| 89 | - "type":"ImageActor", | 89 | + "type":"ImageView", |
| 90 | "image": { | 90 | "image": { |
| 91 | - "filename": "{DEMO_IMAGE_DIR}gallery-small-3.jpg" | 91 | + "url": "{DEMO_IMAGE_DIR}gallery-small-3.jpg" |
| 92 | }, | 92 | }, |
| 93 | - "customProperties": { | 93 | + "properties": { |
| 94 | "cellIndex":[1,1], | 94 | "cellIndex":[1,1], |
| 95 | "rowSpan":3, | 95 | "rowSpan":3, |
| 96 | "cellHorizontalAlignment": "left",// property to specify how to align horizontally inside the cells, if not set, default value is 'left' | 96 | "cellHorizontalAlignment": "left",// property to specify how to align horizontally inside the cells, if not set, default value is 'left' |
| @@ -98,23 +98,23 @@ | @@ -98,23 +98,23 @@ | ||
| 98 | } | 98 | } |
| 99 | }, { | 99 | }, { |
| 100 | "name":"gallery4", | 100 | "name":"gallery4", |
| 101 | - "type":"ImageActor", | 101 | + "type":"ImageView", |
| 102 | "widthResizePolicy":"FILL_TO_PARENT", | 102 | "widthResizePolicy":"FILL_TO_PARENT", |
| 103 | "image": { | 103 | "image": { |
| 104 | - "filename": "{DEMO_IMAGE_DIR}gallery-small-4.jpg" | 104 | + "url": "{DEMO_IMAGE_DIR}gallery-small-4.jpg" |
| 105 | }, | 105 | }, |
| 106 | - "customProperties": { | 106 | + "properties": { |
| 107 | "cellIndex":[2,2] | 107 | "cellIndex":[2,2] |
| 108 | } | 108 | } |
| 109 | }, { | 109 | }, { |
| 110 | "name":"gallery5", | 110 | "name":"gallery5", |
| 111 | - "type":"ImageActor", | 111 | + "type":"ImageView", |
| 112 | "widthResizePolicy":"FILL_TO_PARENT", | 112 | "widthResizePolicy":"FILL_TO_PARENT", |
| 113 | "heightResizePolicy":"FILL_TO_PARENT", | 113 | "heightResizePolicy":"FILL_TO_PARENT", |
| 114 | "image": { | 114 | "image": { |
| 115 | - "filename": "{DEMO_IMAGE_DIR}gallery-small-5.jpg" | 115 | + "url": "{DEMO_IMAGE_DIR}gallery-small-5.jpg" |
| 116 | }, | 116 | }, |
| 117 | - "customProperties": { | 117 | + "properties": { |
| 118 | "cellIndex":[3,2], | 118 | "cellIndex":[3,2], |
| 119 | "columnSpan": 2 | 119 | "columnSpan": 2 |
| 120 | } | 120 | } |
shared/view.h
| @@ -20,7 +20,6 @@ | @@ -20,7 +20,6 @@ | ||
| 20 | 20 | ||
| 21 | #include <dali-toolkit/dali-toolkit.h> | 21 | #include <dali-toolkit/dali-toolkit.h> |
| 22 | #include <dali-toolkit/devel-api/controls/tool-bar/tool-bar.h> | 22 | #include <dali-toolkit/devel-api/controls/tool-bar/tool-bar.h> |
| 23 | -#include <dali-toolkit/devel-api/styling/style-manager.h> | ||
| 24 | 23 | ||
| 25 | 24 | ||
| 26 | namespace DemoHelper | 25 | namespace DemoHelper |