/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
RenderTask defaultTask = taskList.GetTask(0);
defaultTask.SetSourceActor( stage.GetRootLayer() );
- defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
+ defaultTask.SetFrameBuffer( FrameBuffer() );
}
}
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
RenderTask defaultTask = taskList.GetTask(0);
defaultTask.SetSourceActor( stage.GetRootLayer() );
- defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
+ defaultTask.SetFrameBuffer( FrameBuffer() );
}
unsigned int numChildren = layer.GetChildCount();
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
background.SetProperty( Actor::Property::SIZE, stage.GetSize() );
stage.Add( background );
- BufferImage heightBackground = BufferImage::WHITE();
- PixelBuffer* const heightPixel = heightBackground.GetBuffer();
- heightPixel[0] = 0x8f;
- heightPixel[1] = 0x8f;
- heightPixel[2] = 0x8f;
-
- BufferImage widthBackground = BufferImage::WHITE();
- PixelBuffer* const widthPixel = widthBackground.GetBuffer();
- widthPixel[0] = 0x4f;
- widthPixel[1] = 0x4f;
- widthPixel[2] = 0x4f;
-
- mHeightBox = Toolkit::ImageView::New( heightBackground );
- mHeightBox.SetProperty( DevelActor::Property::OPACITY, 0.2f );
- background.Add( mHeightBox );
-
- mWidthBox = Toolkit::ImageView::New( widthBackground );
- mWidthBox.SetProperty( DevelActor::Property::OPACITY, 0.2f );
- background.Add( mWidthBox );
-
mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE );
background.Add( mDesiredBox );
mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
- mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-
- mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
- mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
-
// Initialize the actor
mImageView = Toolkit::ImageView::New( IMAGE_PATHS[ 0 ] );
// Border size needs to be modified to take into account the width of the frame.
Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() );
mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale );
-
- mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
- mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
}
private:
Application& mApplication;
Toolkit::ImageView mDesiredBox; //< Background rectangle to show requested image size.
- Toolkit::ImageView mHeightBox; //< Background horizontal stripe to show requested image height.
- Toolkit::ImageView mWidthBox; //< Background vertical stripe to show requested image width.
Toolkit::PushButton mFittingModeButton;
Toolkit::PushButton mSamplingModeButton;
Toolkit::Popup mPopup;
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
{
Stage stage = Stage::GetCurrent();
- // Render tasks may have been setup last load so remove them
- RenderTaskList taskList = stage.GetRenderTaskList();
- if( taskList.GetTaskCount() > 1 )
- {
- typedef std::vector<RenderTask> Collection;
- typedef Collection::iterator ColIter;
- Collection tasks;
-
- for( unsigned int i = 1; i < taskList.GetTaskCount(); ++i )
- {
- tasks.push_back( taskList.GetTask(i) );
- }
-
- for( ColIter iter = tasks.begin(); iter != tasks.end(); ++iter )
- {
- taskList.RemoveTask(*iter);
- }
-
- RenderTask defaultTask = taskList.GetTask( 0 );
- defaultTask.SetSourceActor( stage.GetRootLayer() );
- defaultTask.SetTargetFrameBuffer( FrameBufferImage() );
- }
-
// Delete any existing text labels
unsigned int numChildren = mLayer.GetChildCount();