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