Merge remote-tracking branch 'origin/tizen' into new_text
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / background.h
1 /*! \page background Background
2  *
3 @section background-color Background Color
4
5 It is possible to set a background color for a DALi control.  If the application writer wishes to
6 set a control with a red background:
7
8 @code
9 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
10 control.SetBackgroundColor( Dali::Color::RED );
11 @endcode
12
13 <table border=0 cellpadding=10><tr>
14 <td>
15 \image html BackgroundControlColor.png
16 </td>
17 </table>
18
19 This can be used for ALL existing controls like TextLabel as well:
20 @code
21 Dali::Toolkit::TextLabel label = Dali::Toolkit::TextLabel::New( "Hello World" );
22 label.SetBackgroundColor( Dali::Color::RED );
23 @endcode
24
25 <table border=0 cellpadding=10><tr>
26 <td>
27 \image html BackgroundTextLabel.png
28 </td>
29 </table>
30
31 @section background-image Background Image
32
33 If required, the user can also set a background image as a DALi control:
34
35 @code
36 Dali::Toolkit::Control control = Dali::Toolkit::Control::New();
37 Dali::Image image = Dali::Image::New( "image.png" );
38 control.SetBackgroundImage( image );
39 @endcode
40
41 <table border=0 cellpadding=10><tr>
42 <td>
43 \image html BackgroundImage.png
44 </td>
45 </table>
46
47 The background image is blended with the background color. If a red background color is set on the
48 control:
49 @code
50 control.SetBackgroundColor( Dali::Color::RED );
51 @endcode
52 then the above image will look like:
53
54 <table border=0 cellpadding=10><tr>
55 <td>
56 \image html BackgroundImageColor.png
57 </td>
58 </table>
59
60 *
61 */