[NUI] Add Obsolete attributes for EditorBrowsable apis
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / VisualMaps.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 using System.Text;
18 using System.Collections.Generic;
19 using Tizen.NUI.BaseComponents;
20 using System.ComponentModel;
21
22 namespace Tizen.NUI
23 {
24     /// <summary>
25     /// A class encapsulating the transform map of the visual.
26     /// </summary>
27     /// <since_tizen> 3 </since_tizen>
28     public class VisualMap
29     {
30         private Vector2 _visualSize = null;
31         private Vector2 _visualOffset = null;
32         private Vector2 _visualOffsetPolicy = null;
33         private Vector2 _visualSizePolicy = null;
34         private Visual.AlignType? _visualOrigin = null;
35         private Visual.AlignType? _visualAnchorPoint = null;
36
37         private PropertyMap _visualTransformMap = null;
38
39         private int? _depthIndex = null;
40
41         /// <summary>
42         /// outputVisualMap.
43         /// </summary>
44         /// <since_tizen> 3 </since_tizen>
45         protected PropertyMap _outputVisualMap = null;
46
47         internal string Name
48         {
49             set;
50             get;
51         }
52
53         internal int VisualIndex
54         {
55             set;
56             get;
57         }
58
59         internal VisualView Parent
60         {
61             set;
62             get;
63         }
64
65         /// <summary>
66         /// Constructor.
67         /// </summary>
68         /// <since_tizen> 3 </since_tizen>
69         public VisualMap()
70         {
71         }
72
73         /// <summary>
74         /// Gets or sets the size of the visual.<br />
75         /// It can be either relative (percentage of the parent)
76         /// or absolute (in world units).<br />
77         /// Optional.
78         /// </summary>
79         /// <since_tizen> 3 </since_tizen>
80         public Size2D Size
81         {
82             get
83             {
84                 return _visualSize ?? (new Size2D(1, 1));
85             }
86             set
87             {
88                 _visualSize = value;
89                 if (_visualSizePolicy == null)
90                 {
91                     _visualSizePolicy = new Vector2(1.0f, 1.0f);
92                 }
93                 UpdateVisual();
94             }
95         }
96
97         /// <summary>
98         /// Gets or sets the offset of the visual.<br />
99         /// It can be either relative (percentage of the parent)
100         /// or absolute (in world units).<br />
101         /// Optional.
102         /// </summary>
103         /// <since_tizen> 3 </since_tizen>
104         public Vector2 Position
105         {
106             get
107             {
108                 return _visualOffset ?? (new Vector2(0.0f, 0.0f));
109             }
110             set
111             {
112                 _visualOffset = value;
113                 if (_visualOffsetPolicy == null)
114                 {
115                     _visualOffsetPolicy = new Vector2(1.0f, 1.0f);
116                 }
117                 UpdateVisual();
118             }
119         }
120
121         /// <summary>
122         /// Gets or sets the relative size of the visual<br />
123         /// (percentage [0.0f to 1.0f] of the control).<br />
124         /// Optional.
125         /// </summary>
126         /// <since_tizen> 3 </since_tizen>
127         public RelativeVector2 RelativeSize
128         {
129             get
130             {
131                 return _visualSize ?? (new RelativeVector2(1.0f, 1.0f));
132             }
133             set
134             {
135                 _visualSize = value;
136                 _visualSizePolicy = new Vector2(0.0f, 0.0f);
137                 UpdateVisual();
138             }
139         }
140
141         /// <summary>
142         /// Gets or sets the relative offset of the visual<br />
143         /// (percentage [0.0f to 1.0f] of the control).<br />
144         /// Optional.
145         /// </summary>
146         /// <since_tizen> 3 </since_tizen>
147         public RelativeVector2 RelativePosition
148         {
149             get
150             {
151                 return _visualOffset ?? (new RelativeVector2(0.0f, 0.0f));
152             }
153             set
154             {
155                 _visualOffset = value;
156                 _visualOffsetPolicy = new Vector2(0.0f, 0.0f);
157                 UpdateVisual();
158             }
159         }
160
161         /// <summary>
162         /// Gets or sets whether the x and y offset values are relative<br />
163         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
164         /// By default, both the x and the y offset are relative.<br />
165         /// Optional.
166         /// </summary>
167         /// <since_tizen> 3 </since_tizen>
168         public VisualTransformPolicyType PositionPolicy
169         {
170             get
171             {
172                 if (_visualOffsetPolicy != null && _visualOffsetPolicy.X == 1.0f
173                     && _visualOffsetPolicy.Y == 1.0f)
174                 {
175                     return VisualTransformPolicyType.Absolute;
176                 }
177                 return VisualTransformPolicyType.Relative;
178             }
179             set
180             {
181                 switch (value)
182                 {
183                     case VisualTransformPolicyType.Relative:
184                         _visualOffsetPolicy = new Vector2(0.0f, 0.0f);
185                         break;
186                     case VisualTransformPolicyType.Absolute:
187                         _visualOffsetPolicy = new Vector2(1.0f, 1.0f);
188                         break;
189                     default:
190                         _visualOffsetPolicy = new Vector2(0.0f, 0.0f);
191                         break;
192                 }
193                 UpdateVisual();
194             }
195         }
196
197         /// <summary>
198         /// Gets or sets whether the x offset values are relative<br />
199         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
200         /// By default, the x offset is relative.<br />
201         /// Optional.
202         /// </summary>
203         /// <since_tizen> 3 </since_tizen>
204         public VisualTransformPolicyType PositionPolicyX
205         {
206             get
207             {
208                 if (_visualOffsetPolicy != null && _visualOffsetPolicy.X == 1.0f)
209                 {
210                     return VisualTransformPolicyType.Absolute;
211                 }
212                 return VisualTransformPolicyType.Relative;
213             }
214             set
215             {
216                 if (_visualOffsetPolicy == null)
217                 {
218                     _visualOffsetPolicy = new Vector2(0.0f, 0.0f);
219                 }
220
221                 switch (value)
222                 {
223                     case VisualTransformPolicyType.Relative:
224                         _visualOffsetPolicy.X = 0.0f;
225                         break;
226                     case VisualTransformPolicyType.Absolute:
227                         _visualOffsetPolicy.X = 1.0f;
228                         break;
229                     default:
230                         _visualOffsetPolicy.X = 0.0f;
231                         break;
232                 }
233
234                 UpdateVisual();
235             }
236         }
237
238         /// <summary>
239         /// Gets or sets whether the y offset values are relative<br />
240         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
241         /// By default, the y offset is relative.<br />
242         /// Optional.
243         /// </summary>
244         /// <since_tizen> 3 </since_tizen>
245         public VisualTransformPolicyType PositionPolicyY
246         {
247             get
248             {
249                 if (_visualOffsetPolicy != null && _visualOffsetPolicy.Y == 1.0f)
250                 {
251                     return VisualTransformPolicyType.Absolute;
252                 }
253                 return VisualTransformPolicyType.Relative;
254             }
255             set
256             {
257                 if (_visualOffsetPolicy == null)
258                 {
259                     _visualOffsetPolicy = new Vector2(0.0f, 0.0f);
260                 }
261
262                 switch (value)
263                 {
264                     case VisualTransformPolicyType.Relative:
265                         _visualOffsetPolicy.Y = 0.0f;
266                         break;
267                     case VisualTransformPolicyType.Absolute:
268                         _visualOffsetPolicy.Y = 1.0f;
269                         break;
270                     default:
271                         _visualOffsetPolicy.Y = 0.0f;
272                         break;
273                 }
274                 UpdateVisual();
275             }
276         }
277
278         /// <summary>
279         /// Gets or sets whether the size values of the width or the height are relative<br />
280         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
281         /// By default, offsets of both the width and the height are relative to the control's size.<br />
282         /// Optional.
283         /// </summary>
284         /// <since_tizen> 3 </since_tizen>
285         public VisualTransformPolicyType SizePolicy
286         {
287             get
288             {
289                 if (_visualSizePolicy != null && _visualSizePolicy.X == 1.0f
290                     && _visualSizePolicy.Y == 1.0f)
291                 {
292                     return VisualTransformPolicyType.Absolute;
293                 }
294                 return VisualTransformPolicyType.Relative;
295             }
296             set
297             {
298                 switch (value)
299                 {
300                     case VisualTransformPolicyType.Relative:
301                         _visualSizePolicy = new Vector2(0.0f, 0.0f);
302                         break;
303                     case VisualTransformPolicyType.Absolute:
304                         _visualSizePolicy = new Vector2(1.0f, 1.0f);
305                         break;
306                     default:
307                         _visualSizePolicy = new Vector2(0.0f, 0.0f);
308                         break;
309                 }
310                 UpdateVisual();
311             }
312         }
313
314         /// <summary>
315         /// Gets or sets whether size values of the width are relative.<br />
316         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
317         /// By default, the value of the width is relative to the control's width.<br />
318         /// Optional.
319         /// </summary>
320         /// <since_tizen> 3 </since_tizen>
321         public VisualTransformPolicyType SizePolicyWidth
322         {
323             get
324             {
325                 if (_visualSizePolicy != null && _visualSizePolicy.Width == 1.0f)
326                 {
327                     return VisualTransformPolicyType.Absolute;
328                 }
329                 return VisualTransformPolicyType.Relative;
330             }
331             set
332             {
333                 if (_visualSizePolicy == null)
334                 {
335                     _visualSizePolicy = new Vector2(0.0f, 0.0f);
336                 }
337
338                 switch (value)
339                 {
340                     case VisualTransformPolicyType.Relative:
341                         _visualSizePolicy.Width = 0.0f;
342                         break;
343                     case VisualTransformPolicyType.Absolute:
344                         _visualSizePolicy.Width = 1.0f;
345                         break;
346                     default:
347                         _visualSizePolicy.Width = 0.0f;
348                         break;
349                 }
350                 UpdateVisual();
351             }
352         }
353
354         /// <summary>
355         /// Gets or sets whether size values of the height are relative<br />
356         /// (percentage [0.0f to 1.0f] of the control) or absolute (in world units).<br />
357         /// By default, the height value is relative to the control's height.<br />
358         /// Optional.
359         /// </summary>
360         /// <since_tizen> 3 </since_tizen>
361         public VisualTransformPolicyType SizePolicyHeight
362         {
363             get
364             {
365                 if (_visualSizePolicy != null && _visualSizePolicy.Height == 1.0f)
366                 {
367                     return VisualTransformPolicyType.Absolute;
368                 }
369                 return VisualTransformPolicyType.Relative;
370             }
371             set
372             {
373                 if (_visualSizePolicy == null)
374                 {
375                     _visualSizePolicy = new Vector2(0.0f, 0.0f);
376                 }
377
378                 switch (value)
379                 {
380                     case VisualTransformPolicyType.Relative:
381                         _visualSizePolicy.Height = 0.0f;
382                         break;
383                     case VisualTransformPolicyType.Absolute:
384                         _visualSizePolicy.Height = 1.0f;
385                         break;
386                     default:
387                         _visualSizePolicy.Height = 0.0f;
388                         break;
389                 }
390                 UpdateVisual();
391             }
392         }
393
394         /// <summary>
395         /// Gets or sets the origin of the visual within its control area.<br />
396         /// By default, the origin is center.<br />
397         /// Optional.
398         /// </summary>
399         /// <since_tizen> 3 </since_tizen>
400         public Visual.AlignType Origin
401         {
402             get
403             {
404                 return _visualOrigin ?? (Visual.AlignType.Center);
405             }
406             set
407             {
408                 _visualOrigin = value;
409                 UpdateVisual();
410             }
411         }
412
413         /// <summary>
414         /// Gets or sets the anchor point of the visual.<br />
415         /// By default, the anchor point is center.<br />
416         /// Optional.
417         /// </summary>
418         /// <since_tizen> 3 </since_tizen>
419         public Visual.AlignType AnchorPoint
420         {
421             get
422             {
423                 return _visualAnchorPoint ?? (Visual.AlignType.Center);
424             }
425             set
426             {
427                 _visualAnchorPoint = value;
428                 UpdateVisual();
429             }
430         }
431
432         /// <summary>
433         /// Gets or sets the depth index of the visual.<br />
434         /// By default, the depth index is 0.<br />
435         /// Optional.
436         /// </summary>
437         /// <since_tizen> 3 </since_tizen>
438         public int DepthIndex
439         {
440             get
441             {
442                 return _depthIndex ?? (0);
443             }
444             set
445             {
446                 _depthIndex = value;
447             }
448         }
449
450         private void ComposingTransformMap()
451         {
452             _visualTransformMap = new PropertyMap();
453             if (_visualSize != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.Size, new PropertyValue(_visualSize)); }
454             if (_visualOffset != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.Offset, new PropertyValue(_visualOffset)); }
455             if (_visualOffsetPolicy != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.OffsetPolicy, new PropertyValue(_visualOffsetPolicy)); }
456             if (_visualSizePolicy != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.SizePolicy, new PropertyValue(_visualSizePolicy)); }
457             if (_visualOrigin != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.Origin, new PropertyValue((int)_visualOrigin)); }
458             if (_visualAnchorPoint != null) { _visualTransformMap.Add((int)VisualTransformPropertyType.AnchorPoint, new PropertyValue((int)_visualAnchorPoint)); }
459         }
460
461         /// <summary>
462         /// Gets the transform map used by the visual.
463         /// </summary>
464         /// <since_tizen> 3 </since_tizen>
465         public PropertyMap OutputTransformMap
466         {
467             get
468             {
469                 ComposingTransformMap();
470                 return _visualTransformMap;
471             }
472         }
473
474         /// <summary>
475         /// Compose the out visual map.
476         /// </summary>
477         /// <since_tizen> 3 </since_tizen>
478         protected virtual void ComposingPropertyMap()
479         {
480             _outputVisualMap = new PropertyMap();
481         }
482
483         /// <summary>
484         /// Gets the property map to create the visual.
485         /// </summary>
486         /// <since_tizen> 3 </since_tizen>
487         public PropertyMap OutputVisualMap
488         {
489             get
490             {
491                 ComposingPropertyMap();
492                 return _outputVisualMap;
493             }
494         }
495
496         internal void UpdateVisual()
497         {
498             if (VisualIndex > 0)
499             {
500                 NUILog.Debug("UpdateVisual()! VisualIndex=" + VisualIndex);
501                 Parent.UpdateVisual(VisualIndex, Name, this);
502             }
503             else
504             {
505                 NUILog.Debug("VisualIndex was not set");
506             }
507         }
508
509         /// <summary>
510         /// The shader of the visual.
511         /// </summary>
512         /// <since_tizen> 3 </since_tizen>
513         protected PropertyMap _shader = null;
514         //private PropertyMap _transform = null;
515
516         /// <summary>
517         /// The premultipliedAlpha of the visual.
518         /// </summary>
519         /// <since_tizen> 3 </since_tizen>
520         protected bool? _premultipliedAlpha = null;
521
522         /// <summary>
523         /// The mixColor of the Visual.
524         /// </summary>
525         /// <since_tizen> 3 </since_tizen>
526         protected Color _mixColor = null;
527
528         /// <summary>
529         /// The opacity of the visual.
530         /// </summary>
531         /// <since_tizen> 3 </since_tizen>
532         protected float? _opacity = null;
533
534         /// <summary>
535         /// The map for visual.
536         /// </summary>
537         /// <since_tizen> 3 </since_tizen>
538         protected PropertyMap _commonlyUsedMap = null;
539
540         /// <summary>
541         /// The shader to use in the visual.
542         /// </summary>
543         /// <since_tizen> 3 </since_tizen>
544         public PropertyMap Shader
545         {
546             get
547             {
548                 return _shader;
549             }
550             set
551             {
552                 _shader = value;
553                 UpdateVisual();
554             }
555         }
556
557         /// <summary>
558         /// Enables or disables the premultiplied alpha. <br />
559         /// The premultiplied alpha is false by default unless this behavior is modified by the derived visual type.
560         /// </summary>
561         /// <since_tizen> 3 </since_tizen>
562         public bool PremultipliedAlpha
563         {
564             get
565             {
566                 return _premultipliedAlpha ?? (false);
567             }
568             set
569             {
570                 _premultipliedAlpha = value;
571                 UpdateVisual();
572             }
573         }
574
575         /// <summary>
576         /// Mix color is a blend color for any visual.
577         /// </summary>
578         /// <since_tizen> 3 </since_tizen>
579         public Color MixColor
580         {
581             get
582             {
583                 return _mixColor;
584             }
585             set
586             {
587                 _mixColor = value;
588                 UpdateVisual();
589             }
590         }
591
592         /// <summary>
593         /// Opacity is the alpha component of the mix color discussed above.
594         /// </summary>
595         /// <since_tizen> 3 </since_tizen>
596         public float Opacity
597         {
598             get
599             {
600                 return _opacity ?? (1.0f);
601             }
602             set
603             {
604                 _opacity = value;
605                 UpdateVisual();
606             }
607         }
608
609     }
610
611     /// <summary>
612     /// A class encapsulating the property map of the image visual.
613     /// </summary>
614     /// <since_tizen> 3 </since_tizen>
615     public class ImageVisual : VisualMap
616     {
617         /// <summary>
618         /// Constructor.
619         /// </summary>
620         /// <since_tizen> 3 </since_tizen>
621         public ImageVisual() : base()
622         {
623         }
624
625         private string _url = null;
626         private string _alphaMaskUrl = null;
627         private FittingModeType? _fittingMode = null;
628         private SamplingModeType? _samplingMode = null;
629         private int? _desiredWidth = null;
630         private int? _desiredHeight = null;
631         private bool? _synchronousLoading = false;
632         private bool? _borderOnly = null;
633         private Vector4 _pixelArea = null;
634         private WrapModeType? _wrapModeU = null;
635         private WrapModeType? _wrapModeV = null;
636         private float? _maskContentScale = null;
637         private bool? _cropToMask = null;
638         private ReleasePolicyType? _releasePolicy = null;
639         private LoadPolicyType? _loadPolicy = null;
640         private bool? _orientationCorrection = true;
641
642         /// <summary>
643         /// Gets or sets the URL of the image.<br />
644         /// Mandatory.
645         /// </summary>
646         /// <since_tizen> 3 </since_tizen>
647         public string URL
648         {
649             get
650             {
651                 return _url;
652             }
653             set
654             {
655                 _url = value;
656                 UpdateVisual();
657             }
658         }
659
660
661         /// <summary>
662         /// Gets or sets the URL of the alpha mask.<br />
663         /// Optional.
664         /// </summary>
665         /// <since_tizen> 3 </since_tizen>
666         public string AlphaMaskURL
667         {
668             get
669             {
670                 return _alphaMaskUrl;
671             }
672             set
673             {
674                 _alphaMaskUrl = value;
675                 UpdateVisual();
676             }
677         }
678
679         /// <summary>
680         /// Gets or sets fitting options used when resizing images to fit the desired dimensions.<br />
681         /// If not supplied, the default is FittingModeType.ShrinkToFit.<br />
682         /// For normal quad images only.<br />
683         /// Optional.
684         /// </summary>
685         /// <since_tizen> 3 </since_tizen>
686         public FittingModeType FittingMode
687         {
688             get
689             {
690                 return _fittingMode ?? (FittingModeType.ShrinkToFit);
691             }
692             set
693             {
694                 _fittingMode = value;
695                 UpdateVisual();
696             }
697         }
698
699         /// <summary>
700         /// Gets or sets filtering options used when resizing images to the sample original pixels.<br />
701         /// If not supplied, the default is SamplingModeType.Box.<br />
702         /// For normal quad images only.<br />
703         /// Optional.
704         /// </summary>
705         /// <since_tizen> 3 </since_tizen>
706         public SamplingModeType SamplingMode
707         {
708             get
709             {
710                 return _samplingMode ?? (SamplingModeType.Box);
711             }
712             set
713             {
714                 _samplingMode = value;
715                 UpdateVisual();
716             }
717         }
718
719         /// <summary>
720         /// Gets or sets the desired image width.<br />
721         /// If not specified, the actual image width is used.<br />
722         /// For normal quad images only.<br />
723         /// Optional.
724         /// </summary>
725         /// <since_tizen> 3 </since_tizen>
726         public int DesiredWidth
727         {
728             get
729             {
730                 return _desiredWidth ?? (-1);
731             }
732             set
733             {
734                 _desiredWidth = value;
735                 UpdateVisual();
736             }
737         }
738
739         /// <summary>
740         /// Gets or sets the desired image height.<br />
741         /// If not specified, the actual image height is used.<br />
742         /// For normal quad images only.<br />
743         /// Optional.
744         /// </summary>
745         /// <since_tizen> 3 </since_tizen>
746         public int DesiredHeight
747         {
748             get
749             {
750                 return _desiredHeight ?? (-1);
751             }
752             set
753             {
754                 _desiredHeight = value;
755                 UpdateVisual();
756             }
757         }
758
759         /// <summary>
760         /// Gets or sets whether to load the image synchronously.<br />
761         /// If not specified, the default is false, i.e., the image is loaded asynchronously.<br />
762         /// For normal quad images only.<br />
763         /// Optional.
764         /// </summary>
765         /// <since_tizen> 3 </since_tizen>
766         public bool SynchronousLoading
767         {
768             get
769             {
770                 return _synchronousLoading ?? (false);
771             }
772             set
773             {
774                 _synchronousLoading = value;
775                 UpdateVisual();
776             }
777         }
778
779         /// <summary>
780         /// Gets or sets whether to draw the borders only (If true).<br />
781         /// If not specified, the default is false.<br />
782         /// For n-patch images only.<br />
783         /// Optional.
784         /// </summary>
785         /// <since_tizen> 3 </since_tizen>
786         public bool BorderOnly
787         {
788             get
789             {
790                 return _borderOnly ?? (false);
791             }
792             set
793             {
794                 _borderOnly = value;
795                 UpdateVisual();
796             }
797         }
798
799         /// <summary>
800         /// Gets or sets the image area to be displayed.<br />
801         /// It is a rectangular area.<br />
802         /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.<br />
803         /// If not specified, the default value is Vector4 (0.0, 0.0, 1.0, 1.0), i.e., the entire area of the image.<br />
804         /// For normal quad images only.<br />
805         /// Optional.
806         /// </summary>
807         /// <since_tizen> 3 </since_tizen>
808         public Vector4 PixelArea
809         {
810             get
811             {
812                 return _pixelArea ?? (new Vector4(0.0f, 0.0f, 1.0f, 1.0f));
813             }
814             set
815             {
816                 _pixelArea = value;
817                 UpdateVisual();
818             }
819         }
820
821         /// <summary>
822         /// Gets or sets the wrap mode for the u coordinate.<br />
823         /// It decides how the texture should be sampled when the u coordinate exceeds the range of 0.0 to 1.0.<br />
824         /// If not specified, the default is WrapModeType.Default(CLAMP).<br />
825         /// For normal quad images only.<br />
826         /// Optional.
827         /// </summary>
828         /// <since_tizen> 3 </since_tizen>
829         public WrapModeType WrapModeU
830         {
831             get
832             {
833                 return _wrapModeU ?? (WrapModeType.Default);
834             }
835             set
836             {
837                 _wrapModeU = value;
838                 UpdateVisual();
839             }
840         }
841
842         /// <summary>
843         /// Gets or sets the wrap mode for the v coordinate.<br />
844         /// It decides how the texture should be sampled when the v coordinate exceeds the range of 0.0 to 1.0.<br />
845         /// The first two elements indicate the top-left position of the area, and the last two elements are the areas of the width and the height respectively.<br />
846         /// If not specified, the default is WrapModeType.Default(CLAMP).<br />
847         /// For normal quad images only.
848         /// Optional.
849         /// </summary>
850         /// <since_tizen> 3 </since_tizen>
851         public WrapModeType WrapModeV
852         {
853             get
854             {
855                 return _wrapModeV ?? (WrapModeType.Default);
856             }
857             set
858             {
859                 _wrapModeV = value;
860                 UpdateVisual();
861             }
862         }
863
864         /// <summary>
865         /// Gets or sets scale factor to apply to the content image before masking.
866         /// </summary>
867         /// <since_tizen> 4 </since_tizen>
868         public float MaskContentScale
869         {
870             get
871             {
872                 return _maskContentScale ?? 1.0f;
873             }
874             set
875             {
876                 _maskContentScale = value;
877                 UpdateVisual();
878             }
879         }
880
881         /// <summary>
882         ///  Whether to crop image to mask or scale mask to fit image.
883         /// </summary>
884         /// <since_tizen> 4 </since_tizen>
885         public bool CropToMask
886         {
887             get
888             {
889                 return _cropToMask ?? false;
890             }
891             set
892             {
893                 _cropToMask = value;
894                 UpdateVisual();
895             }
896         }
897
898
899         /// <summary>
900         /// Get or set the Image Visual release policy<br />
901         /// It decides if a texture should be released from the cache or kept to reduce loading time <br />
902         /// </summary>
903         /// <since_tizen> 5 </since_tizen>
904         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
905         [EditorBrowsable(EditorBrowsableState.Never)]
906         public ReleasePolicyType ReleasePolicy
907         {
908             get
909             {
910                 return _releasePolicy ?? (ReleasePolicyType.Destroyed );
911             }
912             set
913             {
914                 _releasePolicy = value;
915                 UpdateVisual();
916             }
917         }
918
919
920         /// <summary>
921         /// Get or set the Image Visual image loading policy<br />
922         /// It decides if a texture should be loaded immediately after source set or only after visual is added to window <br />
923         /// </summary>
924         /// <since_tizen> 5 </since_tizen>
925         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
926         [EditorBrowsable(EditorBrowsableState.Never)]
927         public LoadPolicyType LoadPolicy
928         {
929             get
930             {
931                 return _loadPolicy ?? (LoadPolicyType.Attached);
932             }
933             set
934             {
935                 _loadPolicy = value;
936                 UpdateVisual();
937             }
938         }
939
940         /// <summary>
941         /// Get or set whether to automatically correct the orientation based on exif data.<br />
942         /// If not specified, the default is true.<br />
943         /// For JPEG images only.<br />
944         /// Optional.
945         /// </summary>
946         /// <since_tizen> 5 </since_tizen>
947         /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
948         [EditorBrowsable(EditorBrowsableState.Never)]
949         public bool OrientationCorrection
950         {
951             get
952             {
953                 return _orientationCorrection ?? (true);
954             }
955             set
956             {
957                 _orientationCorrection = value;
958                 UpdateVisual();
959             }
960         }
961
962
963         /// <summary>
964         /// Compose the out visual map.
965         /// </summary>
966         /// <since_tizen> 3 </since_tizen>
967         protected override void ComposingPropertyMap()
968         {
969             if (_url != null)
970             {
971                 _outputVisualMap = new PropertyMap();
972                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
973                 _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
974                 if (_alphaMaskUrl != null ) { _outputVisualMap.Add(ImageVisualProperty.AlphaMaskURL, new PropertyValue(_alphaMaskUrl)); }
975                 if (_fittingMode != null) { _outputVisualMap.Add(ImageVisualProperty.FittingMode, new PropertyValue((int)_fittingMode)); }
976                 if (_samplingMode != null) { _outputVisualMap.Add(ImageVisualProperty.SamplingMode, new PropertyValue((int)_samplingMode)); }
977                 if (_desiredWidth != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredWidth, new PropertyValue((int)_desiredWidth)); }
978                 if (_desiredHeight != null) { _outputVisualMap.Add(ImageVisualProperty.DesiredHeight, new PropertyValue((int)_desiredHeight)); }
979                 if (_synchronousLoading != null) { _outputVisualMap.Add(ImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); }
980                 if (_borderOnly != null) { _outputVisualMap.Add(ImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
981                 if (_pixelArea != null) { _outputVisualMap.Add(ImageVisualProperty.PixelArea, new PropertyValue(_pixelArea)); }
982                 if (_wrapModeU != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeU, new PropertyValue((int)_wrapModeU)); }
983                 if (_wrapModeV != null) { _outputVisualMap.Add(ImageVisualProperty.WrapModeV, new PropertyValue((int)_wrapModeV)); }
984                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
985                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
986                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
987                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
988                 if (_maskContentScale != null) { _outputVisualMap.Add((int)ImageVisualProperty.MaskContentScale, new PropertyValue((float)_maskContentScale)); }
989                 if (_cropToMask != null) { _outputVisualMap.Add((int)ImageVisualProperty.CropToMask, new PropertyValue((bool)_cropToMask)); }
990                 if (_releasePolicy != null) { _outputVisualMap.Add( ImageVisualProperty.ReleasePolicy , new PropertyValue((int)_releasePolicy)); }
991                 if (_loadPolicy != null) { _outputVisualMap.Add( ImageVisualProperty.LoadPolicy, new PropertyValue((int)_loadPolicy)); }
992                 if (_orientationCorrection != null) { _outputVisualMap.Add( ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)_orientationCorrection)); }
993             }
994         }
995     }
996
997     /// <summary>
998     /// A class encapsulating the property map of the text visual.
999     /// </summary>
1000     /// <since_tizen> 3 </since_tizen>
1001     public class TextVisual : VisualMap
1002     {
1003         /// <summary>
1004         /// Constructor.
1005         /// </summary>
1006         /// <since_tizen> 3 </since_tizen>
1007         public TextVisual() : base()
1008         {
1009         }
1010
1011         private string _text = null;
1012         private string _fontFamily = null;
1013         private PropertyMap _fontStyle = null;
1014         private float? _pointSize = null;
1015         private bool? _multiLine = null;
1016         private string _horizontalAlignment = null;
1017         private string _verticalAlignment = null;
1018         private Color _textColor = null;
1019         private bool? _enableMarkup = null;
1020
1021         /// <summary>
1022         /// Gets or sets the text to display in the UTF-8 format.<br />
1023         /// Mandatory.
1024         /// </summary>
1025         /// <since_tizen> 3 </since_tizen>
1026         public string Text
1027         {
1028             get
1029             {
1030                 return _text;
1031             }
1032             set
1033             {
1034                 _text = value;
1035                 UpdateVisual();
1036             }
1037         }
1038
1039         /// <summary>
1040         /// Gets or sets the requested font family to use.<br />
1041         /// Optional.
1042         /// </summary>
1043         /// <since_tizen> 3 </since_tizen>
1044         public string FontFamily
1045         {
1046             get
1047             {
1048                 return _fontFamily;
1049             }
1050             set
1051             {
1052                 _fontFamily = value;
1053                 UpdateVisual();
1054             }
1055         }
1056
1057         /// <summary>
1058         /// Gets or sets the requested font style to use.<br />
1059         /// Optional.
1060         /// </summary>
1061         /// <since_tizen> 3 </since_tizen>
1062         public PropertyMap FontStyle
1063         {
1064             get
1065             {
1066                 return _fontStyle;
1067             }
1068             set
1069             {
1070                 _fontStyle = value;
1071                 UpdateVisual();
1072             }
1073         }
1074
1075         /// <summary>
1076         /// Gets or sets the size of font in points.<br />
1077         /// Mandatory.
1078         /// </summary>
1079         /// <since_tizen> 3 </since_tizen>
1080         public float PointSize
1081         {
1082             get
1083             {
1084                 return _pointSize ?? (0.0f);
1085             }
1086             set
1087             {
1088                 _pointSize = value;
1089                 UpdateVisual();
1090             }
1091         }
1092
1093         /// <summary>
1094         /// Gets or sets the single-line or multi-line layout option.<br />
1095         /// If not specified, the default is false.<br />
1096         /// Optional.
1097         /// </summary>
1098         /// <since_tizen> 3 </since_tizen>
1099         public bool MultiLine
1100         {
1101             get
1102             {
1103                 return _multiLine ?? (false);
1104             }
1105             set
1106             {
1107                 _multiLine = value;
1108                 UpdateVisual();
1109             }
1110         }
1111
1112         /// <summary>
1113         /// Gets or sets the line horizontal alignment.<br />
1114         /// If not specified, the default is begin.<br />
1115         /// Optional.
1116         /// </summary>
1117         /// <since_tizen> 3 </since_tizen>
1118         public HorizontalAlignment HorizontalAlignment
1119         {
1120             get
1121             {
1122                 switch (_horizontalAlignment)
1123                 {
1124                     case "BEGIN":
1125                         return HorizontalAlignment.Begin;
1126                     case "CENTER":
1127                         return HorizontalAlignment.Center;
1128                     case "END":
1129                         return HorizontalAlignment.End;
1130                     default:
1131                         return HorizontalAlignment.Begin;
1132                 }
1133             }
1134             set
1135             {
1136                 switch (value)
1137                 {
1138                     case HorizontalAlignment.Begin:
1139                     {
1140                         _horizontalAlignment = "BEGIN";
1141                         break;
1142                     }
1143                     case HorizontalAlignment.Center:
1144                     {
1145                         _horizontalAlignment = "CENTER";
1146                         break;
1147                     }
1148                     case HorizontalAlignment.End:
1149                     {
1150                         _horizontalAlignment = "END";
1151                         break;
1152                     }
1153                     default:
1154                     {
1155                         _horizontalAlignment = "BEGIN";
1156                         break;
1157                     }
1158                 }
1159                 UpdateVisual();
1160             }
1161         }
1162
1163         /// <summary>
1164         /// Gets or sets the line vertical alignment.<br />
1165         /// If not specified, the default is top.<br />
1166         /// Optional.
1167         /// </summary>
1168         /// <since_tizen> 3 </since_tizen>
1169         public VerticalAlignment VerticalAlignment
1170         {
1171             get
1172             {
1173                 switch (_verticalAlignment)
1174                 {
1175                     case "TOP":
1176                         return VerticalAlignment.Top;
1177                     case "CENTER":
1178                         return VerticalAlignment.Center;
1179                     case "BOTTOM":
1180                         return VerticalAlignment.Bottom;
1181                     default:
1182                         return VerticalAlignment.Top;
1183                 }
1184             }
1185             set
1186             {
1187                 switch (value)
1188                 {
1189                     case VerticalAlignment.Top:
1190                     {
1191                         _verticalAlignment = "TOP";
1192                         break;
1193                     }
1194                     case VerticalAlignment.Center:
1195                     {
1196                         _verticalAlignment = "CENTER";
1197                         break;
1198                     }
1199                     case VerticalAlignment.Bottom:
1200                     {
1201                         _verticalAlignment = "BOTTOM";
1202                         break;
1203                     }
1204                     default:
1205                     {
1206                         _verticalAlignment = "TOP";
1207                         break;
1208                     }
1209                 }
1210                 UpdateVisual();
1211             }
1212         }
1213
1214         /// <summary>
1215         /// Gets or sets the color of the text.<br />
1216         /// Optional.
1217         /// </summary>
1218         /// <since_tizen> 3 </since_tizen>
1219         public Color TextColor
1220         {
1221             get
1222             {
1223                 return _textColor;
1224             }
1225             set
1226             {
1227                 _textColor = value;
1228                 UpdateVisual();
1229             }
1230         }
1231
1232         /// <summary>
1233         /// Gets or sets whether the mark-up processing is enabled.<br />
1234         /// Optional.
1235         /// </summary>
1236         /// <since_tizen> 3 </since_tizen>
1237         public bool EnableMarkup
1238         {
1239             get
1240             {
1241                 return _enableMarkup ?? (false);
1242             }
1243             set
1244             {
1245                 _enableMarkup = value;
1246                 UpdateVisual();
1247             }
1248         }
1249
1250         /// <summary>
1251         /// Compose the out visual map.
1252         /// </summary>
1253         /// <since_tizen> 3 </since_tizen>
1254         protected override void ComposingPropertyMap()
1255         {
1256             if (_text != null && _pointSize != null)
1257             {
1258                 _outputVisualMap = new PropertyMap();
1259                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Text));
1260                 _outputVisualMap.Add(TextVisualProperty.Text, new PropertyValue(_text));
1261                 _outputVisualMap.Add(TextVisualProperty.PointSize, new PropertyValue((float)_pointSize));
1262                 if (_fontFamily != null) { _outputVisualMap.Add(TextVisualProperty.FontFamily, new PropertyValue(_fontFamily)); }
1263                 if (_fontStyle != null) { _outputVisualMap.Add(TextVisualProperty.FontStyle, new PropertyValue(_fontStyle)); }
1264                 if (_multiLine != null) { _outputVisualMap.Add(TextVisualProperty.MultiLine, new PropertyValue((bool)_multiLine)); }
1265                 if (_horizontalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.HorizontalAlignment, new PropertyValue(_horizontalAlignment)); }
1266                 if (_verticalAlignment != null) { _outputVisualMap.Add(TextVisualProperty.VerticalAlignment, new PropertyValue(_verticalAlignment)); }
1267                 if (_textColor != null) { _outputVisualMap.Add(TextVisualProperty.TextColor, new PropertyValue(_textColor)); }
1268                 if (_enableMarkup != null) { _outputVisualMap.Add(TextVisualProperty.EnableMarkup, new PropertyValue((bool)_enableMarkup)); }
1269                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
1270                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
1271                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
1272                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
1273             }
1274         }
1275     }
1276
1277     /// <summary>
1278     /// A class encapsulating the property map of the border visual.
1279     /// </summary>
1280     /// <since_tizen> 3 </since_tizen>
1281     public class BorderVisual : VisualMap
1282     {
1283         /// <summary>
1284         /// Constructor.
1285         /// </summary>
1286         /// <since_tizen> 3 </since_tizen>
1287         public BorderVisual() : base()
1288         {
1289         }
1290
1291         private Color _color = null;
1292         private float? _size = null;
1293         private bool? _antiAliasing = null;
1294
1295         /// <summary>
1296         /// Gets or sets the color of the border.<br />
1297         /// Mandatory.
1298         /// </summary>
1299         /// <since_tizen> 3 </since_tizen>
1300         public Color Color
1301         {
1302             get
1303             {
1304                 return _color;
1305             }
1306             set
1307             {
1308                 _color = value;
1309                 UpdateVisual();
1310             }
1311         }
1312
1313         /// <summary>
1314         /// Gets or sets the width of the border (in pixels).<br />
1315         /// Mandatory.
1316         /// </summary>
1317         /// <since_tizen> 3 </since_tizen>
1318         public float BorderSize
1319         {
1320             get
1321             {
1322                 return _size ?? (-1.0f);
1323             }
1324             set
1325             {
1326                 _size = value;
1327                 UpdateVisual();
1328             }
1329         }
1330
1331         /// <summary>
1332         /// Gets or sets whether the anti-aliasing of the border is required.<br />
1333         /// If not supplied, the default is false.<br />
1334         /// Optional.
1335         /// </summary>
1336         /// <since_tizen> 3 </since_tizen>
1337         public bool AntiAliasing
1338         {
1339             get
1340             {
1341                 return _antiAliasing ?? (false);
1342             }
1343             set
1344             {
1345                 _antiAliasing = value;
1346                 UpdateVisual();
1347             }
1348         }
1349
1350         /// <summary>
1351         /// Compose the out visual map.
1352         /// </summary>
1353         /// <since_tizen> 3 </since_tizen>
1354         protected override void ComposingPropertyMap()
1355         {
1356             if (_color != null && _size != null)
1357             {
1358                 _outputVisualMap = new PropertyMap();
1359                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Border));
1360                 _outputVisualMap.Add(BorderVisualProperty.Size, new PropertyValue((float)_size));
1361                 _outputVisualMap.Add(BorderVisualProperty.Color, new PropertyValue(_color));
1362                 if (_antiAliasing != null) { _outputVisualMap.Add(BorderVisualProperty.AntiAliasing, new PropertyValue((bool)_antiAliasing)); }
1363                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
1364                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
1365                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
1366                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
1367             }
1368         }
1369     }
1370
1371     /// <summary>
1372     /// A class encapsulating the property map of the color visual.
1373     /// </summary>
1374     /// <since_tizen> 3 </since_tizen>
1375     public class ColorVisual : VisualMap
1376     {
1377         /// <summary>
1378         /// Constructor.
1379         /// </summary>
1380         /// <since_tizen> 3 </since_tizen>
1381         public ColorVisual() : base()
1382         {
1383         }
1384
1385         private Color _mixColorForColorVisual = null;
1386
1387         /// <summary>
1388         /// Gets or sets the solid color required.<br />
1389         /// Mandatory.
1390         /// </summary>
1391         /// <since_tizen> 3 </since_tizen>
1392         public Color Color
1393         {
1394             get
1395             {
1396                 return _mixColorForColorVisual;
1397             }
1398             set
1399             {
1400                 _mixColorForColorVisual = value;
1401                 UpdateVisual();
1402             }
1403         }
1404
1405         /// <summary>
1406         /// Compose the out visual map.
1407         /// </summary>
1408         /// <since_tizen> 3 </since_tizen>
1409         protected override void ComposingPropertyMap()
1410         {
1411             if (_mixColorForColorVisual != null)
1412             {
1413                 _outputVisualMap = new PropertyMap();
1414                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color));
1415                 _outputVisualMap.Add(ColorVisualProperty.MixColor, new PropertyValue(_mixColorForColorVisual));
1416                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
1417                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
1418                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
1419             }
1420         }
1421     }
1422
1423     /// <summary>
1424     /// A class encapsulating the property map of the gradient visual.
1425     /// </summary>
1426     /// <since_tizen> 3 </since_tizen>
1427     public class GradientVisual : VisualMap
1428     {
1429         /// <summary>
1430         /// Constructor.
1431         /// </summary>
1432         /// <since_tizen> 3 </since_tizen>
1433         public GradientVisual() : base()
1434         {
1435         }
1436
1437         private Vector2 _startPosition = null;
1438         private Vector2 _endPosition = null;
1439         private Vector2 _center = null;
1440         private float? _radius = null;
1441         private PropertyArray _stopOffset = null;
1442         private PropertyArray _stopColor = null;
1443         private GradientVisualUnitsType? _units = null;
1444         private GradientVisualSpreadMethodType? _spreadMethod = null;
1445
1446         /// <summary>
1447         /// Gets or sets the start position of a linear gradient.<br />
1448         /// Mandatory for linear.<br />
1449         /// </summary>
1450         /// <since_tizen> 3 </since_tizen>
1451         public Vector2 StartPosition
1452         {
1453             get
1454             {
1455                 return _startPosition;
1456             }
1457             set
1458             {
1459                 _startPosition = value;
1460                 UpdateVisual();
1461             }
1462         }
1463
1464         /// <summary>
1465         /// Gets or sets the end position of a linear gradient.<br />
1466         /// Mandatory for linear.<br />
1467         /// </summary>
1468         /// <since_tizen> 3 </since_tizen>
1469         public Vector2 EndPosition
1470         {
1471             get
1472             {
1473                 return _endPosition;
1474             }
1475             set
1476             {
1477                 _endPosition = value;
1478                 UpdateVisual();
1479             }
1480         }
1481
1482         /// <summary>
1483         /// Gets or sets the center point of a radial gradient.<br />
1484         /// Mandatory for radial.<br />
1485         /// </summary>
1486         /// <since_tizen> 3 </since_tizen>
1487         public Vector2 Center
1488         {
1489             get
1490             {
1491                 return _center;
1492             }
1493             set
1494             {
1495                 _center = value;
1496                 UpdateVisual();
1497             }
1498         }
1499
1500         /// <summary>
1501         /// Gets or sets the size of the radius of a radial gradient.<br />
1502         /// Mandatory for radial.<br />
1503         /// </summary>
1504         /// <since_tizen> 3 </since_tizen>
1505         public float Radius
1506         {
1507             get
1508             {
1509                 return _radius ?? (-1.0f);
1510             }
1511             set
1512             {
1513                 _radius = value;
1514                 UpdateVisual();
1515             }
1516         }
1517
1518         /// <summary>
1519         /// Gets or sets all the stop offsets.<br />
1520         /// A PropertyArray of float.<br />
1521         /// If not supplied, the default is 0.0f and 1.0f.<br />
1522         /// Optional.
1523         /// </summary>
1524         /// <since_tizen> 3 </since_tizen>
1525         public PropertyArray StopOffset
1526         {
1527             get
1528             {
1529                 return _stopOffset;
1530             }
1531             set
1532             {
1533                 _stopOffset = value;
1534                 UpdateVisual();
1535             }
1536         }
1537
1538         /// <summary>
1539         /// Gets or sets the color at the stop offsets.<br />
1540         /// A PropertyArray of color.<br />
1541         /// At least 2 values are required to show a gradient.<br />
1542         /// Mandatory.
1543         /// </summary>
1544         /// <since_tizen> 3 </since_tizen>
1545         public PropertyArray StopColor
1546         {
1547             get
1548             {
1549                 return _stopColor;
1550             }
1551             set
1552             {
1553                 _stopColor = value;
1554                 UpdateVisual();
1555             }
1556         }
1557
1558         /// <summary>
1559         /// Gets or sets descriptions of the coordinate system for certain attributes of the points in a gradient.<br />
1560         /// If not supplied, the default is GradientVisualUnitsType.ObjectBoundingBox.<br />
1561         /// Optional.
1562         /// </summary>
1563         /// <since_tizen> 3 </since_tizen>
1564         public GradientVisualUnitsType Units
1565         {
1566             get
1567             {
1568                 return _units ?? (GradientVisualUnitsType.ObjectBoundingBox);
1569             }
1570             set
1571             {
1572                 _units = value;
1573                 UpdateVisual();
1574             }
1575         }
1576
1577         /// <summary>
1578         /// Gets or sets indications of what happens if the gradient starts or ends inside the bounds of the target rectangle.<br />
1579         /// If not supplied, the default is GradientVisualSpreadMethodType.Pad.<br />
1580         /// Optional.
1581         /// </summary>
1582         /// <since_tizen> 3 </since_tizen>
1583         public GradientVisualSpreadMethodType SpreadMethod
1584         {
1585             get
1586             {
1587                 return _spreadMethod ?? (GradientVisualSpreadMethodType.Pad);
1588             }
1589             set
1590             {
1591                 _spreadMethod = value;
1592                 UpdateVisual();
1593             }
1594         }
1595
1596         /// <summary>
1597         /// Compose the out visual map.
1598         /// </summary>
1599         /// <since_tizen> 3 </since_tizen>
1600         protected override void ComposingPropertyMap()
1601         {
1602             if (((_startPosition != null && _endPosition != null) || (_center != null && _radius != null)) && _stopColor != null)
1603             {
1604                 _outputVisualMap = new PropertyMap();
1605                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Gradient));
1606                 _outputVisualMap.Add(GradientVisualProperty.StopColor, new PropertyValue(_stopColor));
1607                 if (_startPosition != null) { _outputVisualMap.Add(GradientVisualProperty.StartPosition, new PropertyValue(_startPosition)); }
1608                 if (_endPosition != null) { _outputVisualMap.Add(GradientVisualProperty.EndPosition, new PropertyValue(_endPosition)); }
1609                 if (_center != null) { _outputVisualMap.Add(GradientVisualProperty.Center, new PropertyValue(_center)); }
1610                 if (_radius != null) { _outputVisualMap.Add(GradientVisualProperty.Radius, new PropertyValue((float)_radius)); }
1611                 if (_stopOffset != null) { _outputVisualMap.Add(GradientVisualProperty.StopOffset, new PropertyValue(_stopOffset)); }
1612                 if (_units != null) { _outputVisualMap.Add(GradientVisualProperty.Units, new PropertyValue((int)_units)); }
1613                 if (_spreadMethod != null) { _outputVisualMap.Add(GradientVisualProperty.SpreadMethod, new PropertyValue((int)_spreadMethod)); }
1614                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
1615                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
1616                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
1617                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
1618             }
1619         }
1620     }
1621
1622     /// <summary>
1623     /// A class encapsulating the property map of the mesh visual.
1624     /// </summary>
1625     /// <since_tizen> 3 </since_tizen>
1626     public class MeshVisual : VisualMap
1627     {
1628         /// <summary>
1629         /// Constructor.
1630         /// </summary>
1631         /// <since_tizen> 3 </since_tizen>
1632         public MeshVisual() : base()
1633         {
1634         }
1635
1636         private string _objectURL = null;
1637         private string _materialtURL = null;
1638         private string _texturesPath = null;
1639         private MeshVisualShadingModeValue? _shadingMode = null;
1640         private bool? _useMipmapping = null;
1641         private bool? _useSoftNormals = null;
1642         private Vector3 _lightPosition = null;
1643
1644         /// <summary>
1645         /// Gets or sets the location of the ".obj" file.<br />
1646         /// Mandatory.
1647         /// </summary>
1648         /// <since_tizen> 3 </since_tizen>
1649         public string ObjectURL
1650         {
1651             get
1652             {
1653                 return _objectURL;
1654             }
1655             set
1656             {
1657                 _objectURL = value;
1658                 UpdateVisual();
1659             }
1660         }
1661
1662         /// <summary>
1663         /// Gets or sets the location of the ".mtl" file.<br />
1664         /// If not specified, then a textureless object is assumed.<br />
1665         /// Optional.
1666         /// </summary>
1667         /// <since_tizen> 3 </since_tizen>
1668         public string MaterialtURL
1669         {
1670             get
1671             {
1672                 return _materialtURL;
1673             }
1674             set
1675             {
1676                 _materialtURL = value;
1677                 UpdateVisual();
1678             }
1679         }
1680
1681         /// <summary>
1682         /// Gets or sets the path to the directory the textures (including gloss and normal) are stored in.<br />
1683         /// Mandatory if using material.<br />
1684         /// </summary>
1685         /// <since_tizen> 3 </since_tizen>
1686         public string TexturesPath
1687         {
1688             get
1689             {
1690                 return _texturesPath;
1691             }
1692             set
1693             {
1694                 _texturesPath = value;
1695                 UpdateVisual();
1696             }
1697         }
1698
1699         /// <summary>
1700         /// Gets or sets the type of shading mode that the mesh will use.<br />
1701         /// If anything the specified shading mode requires is missing, a simpler mode that can be handled with what has been supplied will be used instead.<br />
1702         /// If not specified, it will use the best it can support (will try MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting first).<br />
1703         /// Optional.
1704         /// </summary>
1705         /// <since_tizen> 3 </since_tizen>
1706         public MeshVisualShadingModeValue ShadingMode
1707         {
1708             get
1709             {
1710                 return _shadingMode ?? (MeshVisualShadingModeValue.TexturedWithDetailedSpecularLighting);
1711             }
1712             set
1713             {
1714                 _shadingMode = value;
1715                 UpdateVisual();
1716             }
1717         }
1718
1719         /// <summary>
1720         /// Gets or sets whether to use mipmaps for textures or not.<br />
1721         /// If not specified, the default is true.<br />
1722         /// Optional.
1723         /// </summary>
1724         /// <since_tizen> 3 </since_tizen>
1725         public bool UseMipmapping
1726         {
1727             get
1728             {
1729                 return _useMipmapping ?? (true);
1730             }
1731             set
1732             {
1733                 _useMipmapping = value;
1734                 UpdateVisual();
1735             }
1736         }
1737
1738         /// <summary>
1739         /// Gets or sets whether to average normals at each point to smooth textures or not.<br />
1740         /// If not specified, the default is true.<br />
1741         /// Optional.
1742         /// </summary>
1743         /// <since_tizen> 3 </since_tizen>
1744         public bool UseSoftNormals
1745         {
1746             get
1747             {
1748                 return _useSoftNormals ?? (true);
1749             }
1750             set
1751             {
1752                 _useSoftNormals = value;
1753                 UpdateVisual();
1754             }
1755         }
1756
1757         /// <summary>
1758         /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.<br />
1759         /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center,
1760         /// and using all zeroes will place the light at the top-left corner.<br />
1761         /// If not specified, the default is an offset outwards from the center of the screen.<br />
1762         /// Optional.
1763         /// </summary>
1764         /// <since_tizen> 3 </since_tizen>
1765         public Vector3 LightPosition
1766         {
1767             get
1768             {
1769                 return _lightPosition;
1770             }
1771             set
1772             {
1773                 _lightPosition = value;
1774                 UpdateVisual();
1775             }
1776         }
1777
1778         /// <summary>
1779         /// Compose the out visual map.
1780         /// </summary>
1781         /// <since_tizen> 3 </since_tizen>
1782         protected override void ComposingPropertyMap()
1783         {
1784             if (_objectURL != null)
1785             {
1786                 _outputVisualMap = new PropertyMap();
1787                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Mesh));
1788                 _outputVisualMap.Add(MeshVisualProperty.ObjectURL, new PropertyValue(_objectURL));
1789                 if (_materialtURL != null) { _outputVisualMap.Add(MeshVisualProperty.MaterialtURL, new PropertyValue(_materialtURL)); }
1790                 if (_texturesPath != null) { _outputVisualMap.Add(MeshVisualProperty.TexturesPath, new PropertyValue(_texturesPath)); }
1791                 if (_shadingMode != null) { _outputVisualMap.Add(MeshVisualProperty.ShadingMode, new PropertyValue((int)_shadingMode)); }
1792                 if (_useMipmapping != null) { _outputVisualMap.Add(MeshVisualProperty.UseMipmapping, new PropertyValue((bool)_useMipmapping)); }
1793                 if (_useSoftNormals != null) { _outputVisualMap.Add(MeshVisualProperty.UseSoftNormals, new PropertyValue((bool)_useSoftNormals)); }
1794                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
1795                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
1796                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
1797                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
1798             }
1799         }
1800     }
1801
1802     /// <summary>
1803     /// A class encapsulating the property map of the primetive visual.
1804     /// </summary>
1805     /// <since_tizen> 3 </since_tizen>
1806     public class PrimitiveVisual : VisualMap
1807     {
1808         /// <summary>
1809         /// Constructor.
1810         /// </summary>
1811         /// <since_tizen> 3 </since_tizen>
1812         public PrimitiveVisual() : base()
1813         {
1814         }
1815
1816         private PrimitiveVisualShapeType? _shape = null;
1817         private Color _mixColorForPrimitiveVisual = null;
1818         private int? _slices = null;
1819         private int? _stacks = null;
1820         private float? _scaleTopRadius = null;
1821         private float? _scaleBottomRadius = null;
1822         private float? _scaleHeight = null;
1823         private float? _scaleRadius = null;
1824         private Vector3 _scaleDimensions = null;
1825         private float? _bevelPercentage = null;
1826         private float? _bevelSmoothness = null;
1827         private Vector3 _lightPosition = null;
1828
1829         /// <summary>
1830         /// Gets or sets the specific shape to render.<br />
1831         /// If not specified, the default is PrimitiveVisualShapeType.Sphere.<br />
1832         /// Optional.
1833         /// </summary>
1834         /// <since_tizen> 3 </since_tizen>
1835         public PrimitiveVisualShapeType Shape
1836         {
1837             get
1838             {
1839                 return _shape ?? (PrimitiveVisualShapeType.Sphere);
1840             }
1841             set
1842             {
1843                 _shape = value;
1844                 UpdateVisual();
1845             }
1846         }
1847
1848         /// <summary>
1849         /// Gets or sets the color of the shape.<br />
1850         /// If not specified, the default is Color (0.5, 0.5, 0.5, 1.0).<br />
1851         /// Applies to all shapes.<br />
1852         /// Optional.
1853         /// </summary>
1854         /// <since_tizen> 3 </since_tizen>
1855         public new Color MixColor
1856         {
1857             get
1858             {
1859                 return _mixColorForPrimitiveVisual ?? (new Color(0.5f, 0.5f, 0.5f, 1.0f));
1860             }
1861             set
1862             {
1863                 _mixColorForPrimitiveVisual = value;
1864                 UpdateVisual();
1865             }
1866         }
1867
1868         /// <summary>
1869         /// Gets or sets the number of slices as you go around the shape.<br />
1870         /// For spheres and conical frustrums, this determines how many divisions there are as you go around the object.<br />
1871         /// If not specified, the default is 128.<br />
1872         /// The range is from 1 to 255.<br />
1873         /// Optional.
1874         /// </summary>
1875         /// <since_tizen> 3 </since_tizen>
1876         public int Slices
1877         {
1878             get
1879             {
1880                 return _slices ?? (128);
1881             }
1882             set
1883             {
1884                 _slices = value;
1885                 UpdateVisual();
1886             }
1887         }
1888
1889         /// <summary>
1890         /// Gets or sets the number of stacks as you go down the shape.<br />
1891         /// For spheres, 'stacks' determines how many layers there are as you go down the object.<br />
1892         /// If not specified, the default is 128.<br />
1893         /// The range is from 1 to 255.<br />
1894         /// Optional.
1895         /// </summary>
1896         /// <since_tizen> 3 </since_tizen>
1897         public int Stacks
1898         {
1899             get
1900             {
1901                 return _stacks ?? (128);
1902             }
1903             set
1904             {
1905                 _stacks = value;
1906                 UpdateVisual();
1907             }
1908         }
1909
1910         /// <summary>
1911         /// Gets or sets the scale of the radius of the top circle of a conical frustrum.<br />
1912         /// If not specified, the default is 1.0f.<br />
1913         /// Applies to: - PrimitiveVisualShapeType.ConicalFrustrum<br />
1914         /// Only values greater than or equal to 0.0f are accepted.<br />
1915         /// Optional.
1916         /// </summary>
1917         /// <since_tizen> 3 </since_tizen>
1918         public float ScaleTopRadius
1919         {
1920             get
1921             {
1922                 return _scaleTopRadius ?? (1.0f);
1923             }
1924             set
1925             {
1926                 _scaleTopRadius = value;
1927                 UpdateVisual();
1928             }
1929         }
1930
1931         /// <summary>
1932         /// Gets or sets the scale of the radius of the bottom circle of a conical frustrum.<br />
1933         /// If not specified, the default is 1.5f.<br />
1934         /// Applies to:  - PrimitiveVisualShapeType.ConicalFrustrum<br />
1935         ///              - PrimitiveVisualShapeType.Cone<br />
1936         /// Only values greater than or equal to 0.0f are accepted.<br />
1937         /// Optional.
1938         /// </summary>
1939         /// <since_tizen> 3 </since_tizen>
1940         public float ScaleBottomRadius
1941         {
1942             get
1943             {
1944                 return _scaleBottomRadius ?? (1.5f);
1945             }
1946             set
1947             {
1948                 _scaleBottomRadius = value;
1949                 UpdateVisual();
1950             }
1951         }
1952
1953         /// <summary>
1954         /// Gets or sets the scale of the height of a conic.<br />
1955         /// If not specified, the default is 3.0f.<br />
1956         /// Applies to:<br />
1957         ///      - PrimitiveVisualShapeType.ConicalFrustrum<br />
1958         ///      - PrimitiveVisualShapeType.Cone<br />
1959         ///      - PrimitiveVisualShapeType.Cylinder<br />
1960         /// Only values greater than or equal to 0.0f are accepted.<br />
1961         /// Optional.
1962         /// </summary>
1963         /// <since_tizen> 3 </since_tizen>
1964         public float ScaleHeight
1965         {
1966             get
1967             {
1968                 return _scaleHeight ?? (3.0f);
1969             }
1970             set
1971             {
1972                 _scaleHeight = value;
1973                 UpdateVisual();
1974             }
1975         }
1976
1977         /// <summary>
1978         /// Gets or sets the scale of the radius of a cylinder.<br />
1979         /// If not specified, the default is 1.0f.<br />
1980         /// Applies to:<br />
1981         ///      - PrimitiveVisualShapeType.Cylinder<br />
1982         /// Only values greater than or equal to 0.0f are accepted.<br />
1983         /// Optional.
1984         /// </summary>
1985         /// <since_tizen> 3 </since_tizen>
1986         public float ScaleRadius
1987         {
1988             get
1989             {
1990                 return _scaleRadius ?? (1.0f);
1991             }
1992             set
1993             {
1994                 _scaleRadius = value;
1995                 UpdateVisual();
1996             }
1997         }
1998
1999         /// <summary>
2000         /// Gets or sets the dimensions of a cuboid. Scales in the same fashion as a 9-patch image.<br />
2001         /// If not specified, the default is Vector3.One.<br />
2002         /// Applies to:<br />
2003         ///      - PrimitiveVisualShapeType.Cube<br />
2004         ///      - PrimitiveVisualShapeType.Octahedron<br />
2005         ///      - PrimitiveVisualShapeType.BevelledCube<br />
2006         /// Each Vector3 parameter should be greater than or equal to 0.0f.<br />
2007         /// Optional.
2008         /// </summary>
2009         /// <since_tizen> 3 </since_tizen>
2010         public Vector3 ScaleDimensions
2011         {
2012             get
2013             {
2014                 return _scaleDimensions ?? (Vector3.One);
2015             }
2016             set
2017             {
2018                 _scaleDimensions = value;
2019                 UpdateVisual();
2020             }
2021         }
2022
2023         /// <summary>
2024         /// Gets or sets determines how bevelled the cuboid should be, based off the smallest dimension.<br />
2025         /// Bevel percentage ranges from 0.0 to 1.0. It affects the ratio of the outer face widths to the width of the overall cube.<br />
2026         /// If not specified, the default is 0.0f (no bevel).<br />
2027         /// Applies to:<br />
2028         ///      - PrimitiveVisualShapeType.BevelledCube<br />
2029         /// The range is from 0.0f to 1.0f.<br />
2030         /// Optional.
2031         /// </summary>
2032         /// <since_tizen> 3 </since_tizen>
2033         public float BevelPercentage
2034         {
2035             get
2036             {
2037                 return _bevelPercentage ?? (0.0f);
2038             }
2039             set
2040             {
2041                 _bevelPercentage = value;
2042                 UpdateVisual();
2043             }
2044         }
2045
2046         /// <summary>
2047         /// Gets or sets descriptions of how smooth the bevelled edges should be.<br />
2048         /// If not specified, the default is 0.0f (sharp edges).<br />
2049         /// Applies to:<br />
2050         ///      - PrimitiveVisualShapeType.BevelledCube<br />
2051         /// The range is from 0.0f to 1.0f.<br />
2052         /// Optional.
2053         /// </summary>
2054         /// <since_tizen> 3 </since_tizen>
2055         public float BevelSmoothness
2056         {
2057             get
2058             {
2059                 return _bevelSmoothness ?? (0.0f);
2060             }
2061             set
2062             {
2063                 _bevelSmoothness = value;
2064                 UpdateVisual();
2065             }
2066         }
2067
2068         /// <summary>
2069         /// Gets or sets the position, in the stage space, of the point light that applies lighting to the model.<br />
2070         /// This is based off the stage's dimensions, so using the width and the height of the stage halved will correspond to the center,
2071         /// and using all zeroes will place the light at the top-left corner.<br />
2072         /// If not specified, the default is an offset outwards from the center of the screen.<br />
2073         /// Applies to all shapes.<br />
2074         /// Optional.
2075         /// </summary>
2076         /// <since_tizen> 3 </since_tizen>
2077         public Vector3 LightPosition
2078         {
2079             get
2080             {
2081                 return _lightPosition;
2082             }
2083             set
2084             {
2085                 _lightPosition = value;
2086                 UpdateVisual();
2087             }
2088         }
2089
2090         /// <summary>
2091         /// Compose the out visual map.
2092         /// </summary>
2093         /// <since_tizen> 3 </since_tizen>
2094         protected override void ComposingPropertyMap()
2095         {
2096             _outputVisualMap = new PropertyMap(); ;
2097             _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Primitive));
2098             if (_shape != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Shape, new PropertyValue((int)_shape)); }
2099             if (_mixColorForPrimitiveVisual != null) { _outputVisualMap.Add(PrimitiveVisualProperty.MixColor, new PropertyValue(_mixColorForPrimitiveVisual)); }
2100             if (_slices != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Slices, new PropertyValue((int)_slices)); }
2101             if (_stacks != null) { _outputVisualMap.Add(PrimitiveVisualProperty.Stacks, new PropertyValue((int)_stacks)); }
2102             if (_scaleTopRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleTopRadius, new PropertyValue((float)_scaleTopRadius)); }
2103             if (_scaleBottomRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleBottomRadius, new PropertyValue((float)_scaleBottomRadius)); }
2104             if (_scaleHeight != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleHeight, new PropertyValue((float)_scaleHeight)); }
2105             if (_scaleRadius != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleRadius, new PropertyValue((float)_scaleRadius)); }
2106             if (_scaleDimensions != null) { _outputVisualMap.Add(PrimitiveVisualProperty.ScaleDimensions, new PropertyValue(_scaleDimensions)); }
2107             if (_bevelPercentage != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelPercentage, new PropertyValue((float)_bevelPercentage)); }
2108             if (_bevelSmoothness != null) { _outputVisualMap.Add(PrimitiveVisualProperty.BevelSmoothness, new PropertyValue((float)_bevelSmoothness)); }
2109             if (_lightPosition != null) { _outputVisualMap.Add(PrimitiveVisualProperty.LightPosition, new PropertyValue(_lightPosition)); }
2110             if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
2111             if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
2112             if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
2113         }
2114     }
2115
2116     /// <summary>
2117     /// A class encapsulating the property map of the n-patch image visual.
2118     /// </summary>
2119     /// <since_tizen> 3 </since_tizen>
2120     public class NPatchVisual : VisualMap
2121     {
2122         /// <summary>
2123         /// Constructor.
2124         /// </summary>
2125         /// <since_tizen> 3 </since_tizen>
2126         public NPatchVisual() : base()
2127         {
2128         }
2129
2130         private string _url = null;
2131         private bool? _borderOnly = null;
2132         private Rectangle _border = null;
2133
2134         /// <summary>
2135         /// Gets or sets the URL of the image.<br />
2136         /// Mandatory.
2137         /// </summary>
2138         /// <since_tizen> 3 </since_tizen>
2139         public string URL
2140         {
2141             get
2142             {
2143                 return _url;
2144             }
2145             set
2146             {
2147                 _url = value;
2148                 UpdateVisual();
2149             }
2150         }
2151
2152         /// <summary>
2153         /// Gets or sets whether to draw the borders only (If true).<br />
2154         /// If not specified, the default is false.<br />
2155         /// For n-patch images only.<br />
2156         /// Optional.
2157         /// </summary>
2158         /// <since_tizen> 3 </since_tizen>
2159         public bool BorderOnly
2160         {
2161             get
2162             {
2163                 return _borderOnly ?? false;
2164             }
2165             set
2166             {
2167                 _borderOnly = value;
2168                 UpdateVisual();
2169             }
2170         }
2171
2172         /// <summary>
2173         /// The border of the image is in the order: left, right, bottom, top.<br />
2174         /// For n-patch images only.<br />
2175         /// Optional.
2176         /// </summary>
2177         /// <since_tizen> 3 </since_tizen>
2178         public Rectangle Border
2179         {
2180             get
2181             {
2182                 return _border;
2183             }
2184             set
2185             {
2186                 _border = value;
2187                 UpdateVisual();
2188             }
2189         }
2190
2191         /// <summary>
2192         /// Compose the out visual map.
2193         /// </summary>
2194         /// <since_tizen> 3 </since_tizen>
2195         protected override void ComposingPropertyMap()
2196         {
2197             if (_url != null)
2198             {
2199                 _outputVisualMap = new PropertyMap();
2200                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch));
2201                 _outputVisualMap.Add(NpatchImageVisualProperty.URL, new PropertyValue(_url));
2202                 if (_borderOnly != null) { _outputVisualMap.Add(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)_borderOnly)); }
2203                 if (_border != null) { _outputVisualMap.Add(NpatchImageVisualProperty.Border, new PropertyValue(_border)); }
2204                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
2205                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
2206                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
2207                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
2208             }
2209         }
2210     }
2211
2212     /// <summary>
2213     /// A class encapsulating the property map of the SVG visual.
2214     /// </summary>
2215     /// <since_tizen> 3 </since_tizen>
2216     public class SVGVisual : VisualMap
2217     {
2218         /// <summary>
2219         /// Constructor.
2220         /// </summary>
2221         /// <since_tizen> 3 </since_tizen>
2222         public SVGVisual() : base()
2223         {
2224         }
2225
2226         private string _url = null;
2227
2228         /// <summary>
2229         /// The url of the svg resource.
2230         /// </summary>
2231         /// <since_tizen> 3 </since_tizen>
2232         public string URL
2233         {
2234             get
2235             {
2236                 return _url;
2237             }
2238             set
2239             {
2240                 _url = value;
2241                 UpdateVisual();
2242             }
2243         }
2244
2245         /// <summary>
2246         /// Compose the out visual map.
2247         /// </summary>
2248         /// <since_tizen> 3 </since_tizen>
2249         protected override void ComposingPropertyMap()
2250         {
2251             if (_url != null)
2252             {
2253                 _outputVisualMap = new PropertyMap();
2254                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.SVG));
2255                 _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_url));
2256                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
2257                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
2258                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
2259                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
2260             }
2261         }
2262     }
2263
2264     /// <summary>
2265     /// A class encapsulating the property map of the animated image (AGIF) visual.
2266     /// </summary>
2267     /// <since_tizen> 3 </since_tizen>
2268     public class AnimatedImageVisual : VisualMap
2269     {
2270         /// <summary>
2271         /// Constructor.
2272         /// </summary>
2273         /// <since_tizen> 3 </since_tizen>
2274         public AnimatedImageVisual() : base()
2275         {
2276         }
2277
2278         private List<string> _urls = null;
2279         private int? _batchSize = null;
2280         private int? _cacheSize = null;
2281         private float? _frameDelay = null;
2282
2283         /// <summary>
2284         /// Gets and Sets the url in the AnimatedImageVisual.
2285         /// </summary>
2286         /// <since_tizen> 3 </since_tizen>
2287         public string URL
2288         {
2289             get
2290             {
2291                 if( _urls != null )
2292                 {
2293                     return _urls[0];
2294                 }
2295                 else
2296                 {
2297                     return null;
2298                 }
2299             }
2300             set
2301             {
2302                 if( _urls == null )
2303                 {
2304                     _urls = new List<string>();
2305                     _urls.Add(value);
2306                 }
2307                 else
2308                 {
2309                     _urls[0] = value;
2310                 }
2311                 UpdateVisual();
2312             }
2313         }
2314
2315         /// <summary>
2316         /// Gets and Sets the url list in the AnimatedImageVisual.
2317         /// </summary>
2318         /// <since_tizen> 4 </since_tizen>
2319         public List<string> URLS
2320         {
2321             get
2322             {
2323                 return _urls;
2324             }
2325             set
2326             {
2327                 _urls = value;
2328                 UpdateVisual();
2329             }
2330         }
2331
2332         /// <summary>
2333         /// Gets and Sets the batch size for pre-loading images in the AnimatedImageVisual.
2334         /// </summary>
2335         /// <since_tizen> 4 </since_tizen>
2336         public int BatchSize
2337         {
2338             get
2339             {
2340                 return _batchSize ?? 1;
2341             }
2342             set
2343             {
2344                 _batchSize = value;
2345                 UpdateVisual();
2346             }
2347         }
2348
2349         /// <summary>
2350         /// Gets and Sets the cache size for loading images in the AnimatedImageVisual.
2351         /// </summary>
2352         /// <since_tizen> 4 </since_tizen>
2353         public int CacheSize
2354         {
2355             get
2356             {
2357                 return _cacheSize ?? 1;
2358             }
2359             set
2360             {
2361                 _cacheSize = value;
2362                 UpdateVisual();
2363             }
2364         }
2365
2366         /// <summary>
2367         /// Gets and Sets The number of milliseconds between each frame in the AnimatedImageVisual.
2368         /// </summary>
2369         /// <since_tizen> 4 </since_tizen>
2370         public float FrameDelay
2371         {
2372             get
2373             {
2374                 return _frameDelay ?? 0.1f;
2375             }
2376             set
2377             {
2378                 _frameDelay = value;
2379                 UpdateVisual();
2380             }
2381         }
2382
2383         /// <summary>
2384         /// Compose the out visual map.
2385         /// </summary>
2386         /// <since_tizen> 3 </since_tizen>
2387         protected override void ComposingPropertyMap()
2388         {
2389             if (_urls != null)
2390             {
2391                 _outputVisualMap = new PropertyMap();
2392                 _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage));
2393                 if( _urls.Count == 1 )
2394                 {
2395                     _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_urls[0]));
2396                 }
2397                 else
2398                 {
2399                     var urlArray = new PropertyArray();
2400                     foreach( var url in _urls)
2401                     {
2402                         urlArray.Add(new PropertyValue(url));
2403                     }
2404                     _outputVisualMap.Add( ImageVisualProperty.URL, ( new PropertyValue( urlArray ) ) );
2405                 }
2406                 if (_batchSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
2407                 if (_cacheSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
2408                 if (_frameDelay != null ) {_outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
2409                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
2410                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
2411                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
2412                 if (_opacity != null) { _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity)); }
2413             }
2414         }
2415     }
2416
2417
2418     //temporary fix for TCT
2419     /// <summary>
2420     /// A class encapsulating the property map of the transition data.
2421     /// </summary>
2422     /// <since_tizen> 3 </since_tizen>
2423     public class VisualAnimator : VisualMap
2424     {
2425         /// <summary>
2426         /// Create VisualAnimator object.
2427         /// </summary>
2428         /// <since_tizen> 3 </since_tizen>
2429         public VisualAnimator() : base()
2430         {
2431         }
2432
2433         private string _alphaFunction = null;
2434         private int _startTime = 0;
2435         private int _endTime = 0;
2436         private string _target = null;
2437         private string _propertyIndex = null;
2438         private object _destinationValue = null;
2439
2440         /// <summary>
2441         /// Sets and Gets the AlphaFunction of this transition.
2442         /// </summary>
2443         /// <since_tizen> 3 </since_tizen>
2444         public AlphaFunction.BuiltinFunctions AlphaFunction
2445         {
2446             get
2447             {
2448                 switch (_alphaFunction)
2449                 {
2450                     case "LINEAR":
2451                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear;
2452                     case "REVERSE":
2453                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse;
2454                     case "EASE_IN_SQUARE":
2455                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare;
2456                     case "EASE_OUT_SQUARE":
2457                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare;
2458                     case "EASE_IN":
2459                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn;
2460                     case "EASE_OUT":
2461                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut;
2462                     case "EASE_IN_OUT":
2463                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut;
2464                     case "EASE_IN_SINE":
2465                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine;
2466                     case "EASE_OUT_SINE":
2467                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine;
2468                     case "EASE_IN_OUT_SINE":
2469                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine;
2470                     case "BOUNCE":
2471                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce;
2472                     case "SIN":
2473                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin;
2474                     case "EASE_OUT_BACK":
2475                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack;
2476                     default:
2477                         return Tizen.NUI.AlphaFunction.BuiltinFunctions.Default;
2478                 }
2479             }
2480             set
2481             {
2482                 switch (value)
2483                 {
2484                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.Linear:
2485                         {
2486                             _alphaFunction = "LINEAR";
2487                             break;
2488                         }
2489                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.Reverse:
2490                         {
2491                             _alphaFunction = "REVERSE";
2492                             break;
2493                         }
2494                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSquare:
2495                         {
2496                             _alphaFunction = "EASE_IN_SQUARE";
2497                             break;
2498                         }
2499                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSquare:
2500                         {
2501                             _alphaFunction = "EASE_OUT_SQUARE";
2502                             break;
2503                         }
2504                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseIn:
2505                         {
2506                             _alphaFunction = "EASE_IN";
2507                             break;
2508                         }
2509                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOut:
2510                         {
2511                             _alphaFunction = "EASE_OUT";
2512                             break;
2513                         }
2514                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOut:
2515                         {
2516                             _alphaFunction = "EASE_IN_OUT";
2517                             break;
2518                         }
2519                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInSine:
2520                         {
2521                             _alphaFunction = "EASE_IN_SINE";
2522                             break;
2523                         }
2524                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutSine:
2525                         {
2526                             _alphaFunction = "EASE_OUT_SINE";
2527                             break;
2528                         }
2529                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseInOutSine:
2530                         {
2531                             _alphaFunction = "EASE_IN_OUT_SINE";
2532                             break;
2533                         }
2534                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.Bounce:
2535                         {
2536                             _alphaFunction = "BOUNCE";
2537                             break;
2538                         }
2539                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.Sin:
2540                         {
2541                             _alphaFunction = "SIN";
2542                             break;
2543                         }
2544                     case Tizen.NUI.AlphaFunction.BuiltinFunctions.EaseOutBack:
2545                         {
2546                             _alphaFunction = "EASE_OUT_BACK";
2547                             break;
2548                         }
2549                     default:
2550                         {
2551                             _alphaFunction = "DEFAULT";
2552                             break;
2553                         }
2554                 }
2555             }
2556         }
2557
2558         /// <summary>
2559         /// Sets and Gets the StartTime of this transition.
2560         /// </summary>
2561         /// <since_tizen> 3 </since_tizen>
2562         public int StartTime
2563         {
2564             get
2565             {
2566                 return _startTime;
2567             }
2568             set
2569             {
2570                 _startTime = value;
2571             }
2572         }
2573
2574         /// <summary>
2575         /// Sets and Gets the EndTime of this transition.
2576         /// </summary>
2577         /// <since_tizen> 3 </since_tizen>
2578         public int EndTime
2579         {
2580             get
2581             {
2582                 return _endTime;
2583             }
2584             set
2585             {
2586                 _endTime = value;
2587             }
2588         }
2589
2590         /// <summary>
2591         /// Sets and Gets the Target of this transition.
2592         /// </summary>
2593         /// <since_tizen> 3 </since_tizen>
2594         public string Target
2595         {
2596             get
2597             {
2598                 return _target;
2599             }
2600             set
2601             {
2602                 _target = value;
2603             }
2604         }
2605
2606         /// <summary>
2607         /// Sets and Gets the PropertyIndex of this transition.
2608         /// </summary>
2609         /// <since_tizen> 3 </since_tizen>
2610         public string PropertyIndex
2611         {
2612             get
2613             {
2614                 return _propertyIndex;
2615             }
2616             set
2617             {
2618                 _propertyIndex = value;
2619             }
2620         }
2621
2622         /// <summary>
2623         /// Sets and Gets the DestinationValue of this transition.
2624         /// </summary>
2625         /// <since_tizen> 3 </since_tizen>
2626         public object DestinationValue
2627         {
2628             get
2629             {
2630                 return _destinationValue;
2631             }
2632             set
2633             {
2634                 _destinationValue = value;
2635             }
2636         }
2637
2638         /// <summary>
2639         /// Compose the out visual map.
2640         /// </summary>
2641         /// <since_tizen> 3 </since_tizen>
2642         protected override void ComposingPropertyMap()
2643         {
2644             PropertyMap _animator = new PropertyMap();
2645             _animator.Add("alphaFunction", new PropertyValue(_alphaFunction));
2646
2647             PropertyMap _timePeriod = new PropertyMap();
2648             _timePeriod.Add("duration", new PropertyValue((_endTime - _startTime) / 1000.0f));
2649             _timePeriod.Add("delay", new PropertyValue(_startTime / 1000.0f));
2650             _animator.Add("timePeriod", new PropertyValue(_timePeriod));
2651
2652             StringBuilder sb = new StringBuilder(_propertyIndex);
2653             sb[0] = (char)(sb[0] | 0x20);
2654             string _str = sb.ToString();
2655
2656             PropertyValue val = PropertyValue.CreateFromObject(_destinationValue);
2657
2658             PropertyMap _transition = new PropertyMap();
2659             _transition.Add("target", new PropertyValue(_target));
2660             _transition.Add("property", new PropertyValue(_str));
2661             _transition.Add("targetValue", val);
2662             _transition.Add("animator", new PropertyValue(_animator));
2663
2664             _outputVisualMap = _transition;
2665         }
2666     }
2667     //temporary fix for TCT
2668
2669
2670
2671 }