X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fvisual-factory%2Fvisual-base.h;h=49e8cf09d896a86ae9b79a8d721085133dd0bcf4;hp=b590484e1505c7007bc2e784414e90a2b4a6a875;hb=refs%2Fchanges%2F12%2F94412%2F5;hpb=84c98859f482a168f4cc5f4d84b3a08c39b8902c diff --git a/dali-toolkit/devel-api/visual-factory/visual-base.h b/dali-toolkit/devel-api/visual-factory/visual-base.h index b590484..49e8cf0 100644 --- a/dali-toolkit/devel-api/visual-factory/visual-base.h +++ b/dali-toolkit/devel-api/visual-factory/visual-base.h @@ -38,11 +38,47 @@ class Base; namespace Visual { /** - * @brief Visual provides a renderer for rendering the controls. A control may have multiple visuals. + * @brief A Visual provides a renderer for drawing a control component. A control may have multiple visuals. * - * Visuals reuses geometry, shader etc. across controls and manages the renderer and texture sets to exist only when control is on-stage. - * It also responds to actor size and color change, and provides the clipping at the renderer level. + * Visuals reuse geometry, shader etc. across controls. They ensure that the renderer and texture sets exist only when control is on-stage. + * Each visual also responds to actor size and color change, and provides clipping at the renderer level. * Note: The visual responds to the the Actor::COLOR by blending it with the 'Multiply' operator. + * + * The following properties are optional, but can be supplied in the property map to Dali::Toolkit::VisualFactory::CreateVisual(). + * + * | %Property Name | Type | + * |-------------------------|------------------| + * | customShader | MAP | + * | transform | MAP | + * + * where \b customShader is a map with at least one of the following properties: + * | %Property Name | Type | Required | Default | Description | + * |-------------------------|------------------|----------|---------|-------------| + * | vertexShader | STRING | No | "" | Vertex shader code| + * | fragmentShader | STRING | No | "" | Fragment shader code| + * | subdivideGridX | INTEGER | No | 1 | How to subdivide the grid along X | + * | subdivideGridY | INTEGER | No | 1 | How to subdivide the grid along Y | + * | shaderHints | INTEGER or ARRAY of STRING | No | NONE | Bitmask of hints @sa Dali::Shader::Hint | + * + * and \b transform is a map with the following properties: + * | %Property Name | Type | Required | Default |Description | + * |-------------------------|------------------|----------|---------|------------| + * | offset | VECTOR2 | No | (0,0) | Offset of visual from origin | + * | size | VECTOR2 | No | (1,1) | size of visual | + * | origin | INTEGER or STRING | No | CENTER | origin of the visual @sa Dali::Toolkit::Align | + * | anchorPoint | INTEGER or STRING | No | CENTER | anchor point of the visual @sa Dali::Toolkit::Align | + * | offsetSizeMode | VECTOR4 | No | (0,0,0,0) | See below | + * + * + * offsetSizeMode describes whether the offset and the size are + * relative or absolute by using 0 or 1 respectively in the corresponding + * components (offsetSizeMode.xy for offset.xy; offsetSizeMode.zw for size.xy). + * + * Relative means that the component describes a factor of the parent control size; + * size.x = 1 means full width; size.y = 0.5 means half height. + * + * Absolute means that the component describes world units (equivalent to pixels) + * */ class DALI_IMPORT_API Base : public BaseHandle {