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