-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
// CLASS HEADER
#include "shadow-view-impl.h"
// EXTERNAL INCLUDES
#include <sstream>
#include <iomanip>
+#include <dali/public-api/animation/active-constraint.h>
+#include <dali/public-api/animation/constraint.h>
+#include <dali/public-api/common/stage.h>
+#include <dali/public-api/object/type-registry.h>
+#include <dali/public-api/render-tasks/render-task-list.h>
+#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/controls/shadow-view/shadow-view-impl.h>
#include <dali-toolkit/internal/filters/blur-two-pass-filter.h>
-#include <dali/integration-api/debug.h>
// TODO:
// pixel format / size - set from JSON
} // namespace
ShadowView::ShadowView( float downsampleWidthScale, float downsampleHeightScale )
-: ControlImpl( false ), // doesn't require touch events
+: Control( CONTROL_BEHAVIOUR_NONE ),
mChildrenRoot(Actor::New()),
mCachedShadowColor(DEFAULT_SHADOW_COLOR),
mCachedBackgroundColor(DEFAULT_SHADOW_COLOR.r, DEFAULT_SHADOW_COLOR.g, DEFAULT_SHADOW_COLOR.b, 0.0f),
ConstrainCamera();
- mShadowPlane.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, Source( mShadowPlaneBg, Actor::SIZE ), EqualToConstraint() ) );
+ mShadowPlane.SetSizeMode( SIZE_EQUAL_TO_PARENT );
- mBlurRootActor.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, Source( mShadowPlane, Actor::SIZE ), EqualToConstraint() ) );
+ mBlurRootActor.SetSizeMode( SIZE_EQUAL_TO_PARENT );
}
void ShadowView::SetPointLight(Actor pointLight)
{
// root actor to parent all user added actors. Used as source actor for shadow render task.
mChildrenRoot.SetPositionInheritanceMode( Dali::USE_PARENT_POSITION );
- mChildrenRoot.ApplyConstraint(Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ));
+ mChildrenRoot.SetSizeMode( SIZE_EQUAL_TO_PARENT );
Vector2 stageSize = Stage::GetCurrent().GetSize();
mCameraActor = CameraActor::New(stageSize);