X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=docs%2Fcontent%2Fshared-javascript-and-cpp-documentation%2Fvisuals.md;h=3ae2c3119caa37e94e94215cf95f3e2508c984b6;hp=95a40c36865abc8433167d6aaa7353017277f9c2;hb=902a2255a68fb98e584bce1425133a3312f10d0d;hpb=2c2f52b1e6f532312359afbf5910a44943bbb87b diff --git a/docs/content/shared-javascript-and-cpp-documentation/visuals.md b/docs/content/shared-javascript-and-cpp-documentation/visuals.md index 95a40c3..3ae2c31 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/visuals.md +++ b/docs/content/shared-javascript-and-cpp-documentation/visuals.md @@ -16,6 +16,7 @@ DALi provides the following visuals: + [Border](@ref border-visual) + [Mesh](@ref mesh-visual) + [Primitive](@ref primitive-visual) + + [Wireframe](@ref wireframe-visual) Controls can provide properties that allow users to specify the visual type ( visualType ). Setting visual properties are done via a property map. @@ -495,7 +496,7 @@ The shapes are generated with clockwise winding and back-face culling on by defa | Property | String | Type | Description | Default Value | Range | |---------------------------------------------------------------|-------------------|:------------------:|-----------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------:|:------------------------------:| | Dali::Toolkit::PrimitiveVisual::Property::SHAPE | shape | INTEGER or STRING | The specific shape to render. [More info](@ref shape-details) | Dali::Toolkit::PrimitiveVisual::Shape::SPHERE, "SPHERE" | [See list](@ref shape-details) | -| Dali::Toolkit::PrimitiveVisual::Property::COLOR | shapeColor | VECTOR4 | The color of the shape. | (0.5, 0.5, 0.5, 1.0) | 0.0 - 1.0 for each | +| Dali::Toolkit::PrimitiveVisual::Property::MIX_COLOR | mixColor | VECTOR4 | The color of the shape. | (0.5, 0.5, 0.5, 1.0) | 0.0 - 1.0 for each | | Dali::Toolkit::PrimitiveVisual::Property::SLICES | slices | INTEGER | The number of slices as you go around the shape. [More info](@ref slices-details) | 128 | 1 - 255 | | Dali::Toolkit::PrimitiveVisual::Property::STACKS | stacks | INTEGER | The number of stacks as you go down the shape. [More info](@ref stacks-details) | 128 | 1 - 255 | | Dali::Toolkit::PrimitiveVisual::Property::SCALE_TOP_RADIUS | scaleTopRadius | FLOAT | The scale of the radius of the top circle of a conical frustrum. | 1.0 | ≥ 0.0 | @@ -568,7 +569,7 @@ Dali::Property::Map map; map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE; map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE; -map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); +map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); control.SetProperty( Control::Property::BACKGROUND, map ); ~~~ @@ -583,7 +584,7 @@ Dali::Property::Map map; map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE; map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM; -map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); +map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); map[ PrimitiveVisual::Property::SCALE_TOP_RADIUS ] = 1.0f; map[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = 1.5f; map[ PrimitiveVisual::Property::SCALE_HEIGHT ] = 3.0f; @@ -601,11 +602,47 @@ Dali::Property::Map map; map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::PRIMITIVE; map[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::BEVELLED_CUBE; -map[ PrimitiveVisual::Property::COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); +map[ PrimitiveVisual::Property::MIX_COLOR ] = Vector4( 1.0, 0.5, 0.0, 1.0 ); map[ PrimitiveVisual::Property::BEVEL_PERCENTAGE ] = 0.4f; control.SetProperty( Control::Property::BACKGROUND, map ); ~~~ +___________________________________________________________________________________________________ + +## Wireframe Visual {#wireframe-visual} + +Renders a wireframe around a control's quad. +Is mainly used for debugging and is the visual that replaces all other visuals when [Visual Debug Rendering](@ref debugrendering) is turned on. + +![ ](../assets/img/visuals/wireframe-visual.png) +![ ](visuals/wireframe-visual.png) + +### Properties + +**VisualType:** Dali::Toolkit::Visual::WIREFRAME, "WIREFRAME" + +### Usage + +~~~{.cpp} +// C++ +Dali::Toolkit::Control control = Dali::Toolkit::Control::New(); + +Dali::Property::Map map; +map[ Visual::Property::TYPE ] = Dali::Toolkit::Visual::WIREFRAME; + +control.SetProperty( Control::Property::BACKGROUND, map ); +~~~ + +~~~{.js} +// JavaScript +var control = new dali.Control( "Control" ); + +control.background = +{ + visualType : "WIREFRAME" +}; +~~~ + @class _Guide_Control_Visuals