- Deprecated CONICAL_FRUSTRUM because it is misspelled.
- Added CONICAL_FRUSTUM.
Change-Id: I4b7667ed720319d0da68c017b5a8bacd04ee7967
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
END_TEST;
}
+//Test if primitive shape loads a conic section correctly.
+int UtcDaliVisualFactoryGetPrimitiveVisual18(void)
+{
+ //Set up test application first, so everything else can be handled.
+ ToolkitTestApplication application;
+
+ tet_infoline( "UtcDaliVisualFactoryGetPrimitiveVisual18: Request primitive visual to display a conic section" );
+
+ //Set up visual properties.
+ Property::Map propertyMap;
+ propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::PRIMITIVE );
+ propertyMap.Insert( PrimitiveVisual::Property::SHAPE, PrimitiveVisual::Shape::CONICAL_FRUSTUM );
+ propertyMap.Insert( PrimitiveVisual::Property::MIX_COLOR, Vector4( 0.5, 0.5, 0.5, 1.0 ) );
+ propertyMap.Insert( PrimitiveVisual::Property::SLICES, 10 );
+ propertyMap.Insert( PrimitiveVisual::Property::SCALE_TOP_RADIUS, 30.0f );
+ propertyMap.Insert( PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, 40.0f );
+ propertyMap.Insert( PrimitiveVisual::Property::SCALE_HEIGHT, 50.0f );
+
+ //Test to see if shape loads correctly.
+ TestPrimitiveVisualWithProperties( propertyMap, application );
+
+ END_TEST;
+}
+
//Test if primitive shape visual handles the case of not being passed a specific shape to use.
int UtcDaliVisualFactoryGetPrimitiveVisualN1(void)
{
ALIASES += SINCE_1_0="@since 1.0"
ALIASES += SINCE_1_1="@since 1.1"
ALIASES += SINCE_1_2="@since 1.2"
+ALIASES += SINCE_1_3="@since 1.3"
# Extra tags for Tizen 3.0
ALIASES += SINCE_1_2_2="@since 1.2.2"
ALIASES += SINCE_1_3_5="@since 1.3.5"
ALIASES += SINCE_1_3_9="@since 1.3.9"
ALIASES += SINCE_1_3_15="@since 1.3.15"
+
ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 1.2.8"
ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 1.2.10"
ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 1.2"
+ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 1.3"
ALIASES += PLATFORM=""
ALIASES += PRIVLEVEL_PLATFORM=""
#ALIASES += SINCE_1_0="\par Since:\n 2.4, DALi version 1.0"
#ALIASES += SINCE_1_1="\par Since:\n 3.0, DALi version 1.1"
#ALIASES += SINCE_1_2="\par Since:\n 4.0, DALi version 1.2"
+#ALIASES += SINCE_1_3="\par Since:\n 5.0, DALi version 1.3"
## Extra tags for Tizen 3.0
#ALIASES += SINCE_1_2_2="\par Since:\n 3.0, DALi version 1.2.2"
#ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 3.0, DALi version 1.2.8"
#ALIASES += DEPRECATED_1_2_10="@deprecated Deprecated since 3.0, DALi version 1.2.10"
#ALIASES += DEPRECATED_1_2="@deprecated Deprecated since 4.0, DALi version 1.2"
+#ALIASES += DEPRECATED_1_3="@deprecated Deprecated since 5.0, DALi version 1.3"
#ALIASES += PLATFORM="@platform"
#ALIASES += PRIVLEVEL_PLATFORM="\par Privilege Level:\n platform"
// shapes
DALI_ENUM_TO_STRING_TABLE_BEGIN( SHAPE_TYPE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, SPHERE )
-DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTRUM )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTRUM ) // deprecated
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CYLINDER )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CUBE )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, OCTAHEDRON )
DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, BEVELLED_CUBE )
+DALI_ENUM_TO_STRING_WITH_SCOPE( Toolkit::PrimitiveVisual::Shape, CONICAL_FRUSTUM )
DALI_ENUM_TO_STRING_TABLE_END( SHAPE_TYPE )
//Property names
//Specific shape labels.
const char * const SPHERE_LABEL( "SPHERE" );
const char * const CONE_LABEL( "CONE" );
-const char * const CONICAL_FRUSTRUM_LABEL( "CONICAL_FRUSTRUM" );
+const char * const CONICAL_FRUSTRUM_LABEL( "CONICAL_FRUSTRUM" ); // deprecated
const char * const CYLINDER_LABEL( "CYLINDER" );
const char * const CUBE_LABEL( "CUBE" );
const char * const OCTAHEDRON_LABEL( "OCTAHEDRON" );
const char * const BEVELLED_CUBE_LABEL( "BEVELLED_CUBE" );
+const char * const CONICAL_FRUSTUM_LABEL( "CONICAL_FRUSTUM" );
//Shader properties
const char * const OBJECT_MATRIX_UNIFORM_NAME( "uObjectMatrix" );
CreateConic( vertices, indices, 0, mScaleBottomRadius, mScaleHeight, mSlices );
break;
}
- case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTRUM:
+ case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTRUM: // deprecated
{
CreateConic( vertices, indices, mScaleTopRadius, mScaleBottomRadius, mScaleHeight, mSlices );
break;
CreateBevelledCube( vertices, indices, mScaleDimensions, mBevelPercentage, mBevelSmoothness );
break;
}
+ case Toolkit::PrimitiveVisual::Shape::CONICAL_FRUSTUM:
+ {
+ CreateConic( vertices, indices, mScaleTopRadius, mScaleBottomRadius, mScaleHeight, mSlices );
+ break;
+ }
}
mGeometry = Geometry::New();
* @note Optional. If not specified, the default is 128.
* @note Applies to:
* - Shape::SPHERE
- * - Shape::CONICAL_FRUSTRUM
+ * - Shape::CONICAL_FRUSTUM
* - Shape::CONE
* - Shape::CYLINDER
* @note The range is from 1 to 255.
* @SINCE_1_1.45
* @note Optional. If not specified, the default is 1.0f.
* @note Applies to:
- * - Shape::CONICAL_FRUSTRUM
+ * - Shape::CONICAL_FRUSTUM
* @note Only values greater than or equal to 0.0f are accepted.
*/
SCALE_TOP_RADIUS,
* @SINCE_1_1.45
* @note Optional. If not specified, the default is 1.5f.
* @note Applies to:
- * - Shape::CONICAL_FRUSTRUM
+ * - Shape::CONICAL_FRUSTUM
* - Shape::CONE
* @note Only values greater than or equal to 0.0f are accepted.
*/
* @SINCE_1_1.45
* @note Optional. If not specified, the default is 3.0f.
* @note Applies to:
- * - Shape::CONICAL_FRUSTRUM
+ * - Shape::CONICAL_FRUSTUM
* - Shape::CONE
* - Shape::CYLINDER
* @note Only values greater than or equal to 0.0f are accepted.
enum Type
{
SPHERE, ///< A perfectly round geometrical object in three-dimensional space. @SINCE_1_1.45
- CONICAL_FRUSTRUM, ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
+ CONICAL_FRUSTRUM, ///< @DEPRECATED_1_3.15, use CONICAL_FRUSTUM instead. The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_1.45
CONE, ///< Equivalent to a conical frustum with top radius of zero. @SINCE_1_1.45
CYLINDER, ///< Equivalent to a conical frustum with equal radii for the top and bottom circles. @SINCE_1_1.45
CUBE, ///< Equivalent to a bevelled cube with a bevel percentage of zero. @SINCE_1_1.45
OCTAHEDRON, ///< Equivalent to a bevelled cube with a bevel percentage of one. @SINCE_1_1.45
BEVELLED_CUBE, ///< A cube/cuboid with all edges flattened to some degree. @SINCE_1_1.45
+ CONICAL_FRUSTUM ///< The area bound between two circles, i.e. a cone with the tip removed. @SINCE_1_3.15
};
}