Example #1
0
 /// <summary>
 /// Compose the out visual map.
 /// </summary>
 /// <since_tizen> 3 </since_tizen>
 protected override void ComposingPropertyMap()
 {
     if (_urls != null)
     {
         _outputVisualMap = new PropertyMap();
         _outputVisualMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.AnimatedImage));
         if (_urls.Count == 1)
         {
             _outputVisualMap.Add(ImageVisualProperty.URL, new PropertyValue(_urls[0]));
         }
         else
         {
             var urlArray = new PropertyArray();
             foreach (var url in _urls)
             {
                 urlArray.Add(new PropertyValue(url));
             }
             _outputVisualMap.Add(ImageVisualProperty.URL, (new PropertyValue(urlArray)));
         }
         if (_batchSize != null)
         {
             _outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize));
         }
         if (_cacheSize != null)
         {
             _outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize));
         }
         if (_frameDelay != null)
         {
             _outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay));
         }
         if (_loopCount != null)
         {
             _outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount));
         }
         if (_shader != null)
         {
             _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader));
         }
         if (_premultipliedAlpha != null)
         {
             _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha));
         }
         if (_mixColor != null)
         {
             _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor));
         }
         if (_opacity != null)
         {
             _outputVisualMap.Add((int)Visual.Property.Opacity, new PropertyValue((float)_opacity));
         }
         if (_visualFittingMode != null)
         {
             _outputVisualMap.Add((int)Visual.Property.VisualFittingMode, new PropertyValue((int)_visualFittingMode));
         }
     }
 }
Example #2
0
 /// <summary>
 /// Compose the out visual map.
 /// </summary>
 /// <since_tizen> 3 </since_tizen>
 protected override void ComposingPropertyMap()
 {
     if (_urls != null)
     {
         _outputVisualMap = new PropertyMap();
         PropertyValue temp = new PropertyValue((int)Visual.Type.AnimatedImage);
         _outputVisualMap.Add(Visual.Property.Type, temp);
         temp.Dispose();
         if (_urls.Count == 1)
         {
             temp = new PropertyValue(_urls[0]);
             _outputVisualMap.Add(ImageVisualProperty.URL, temp);
             temp.Dispose();
         }
         else
         {
             var urlArray = new PropertyArray();
             foreach (var url in _urls)
             {
                 urlArray.Add(new PropertyValue(url));
             }
             temp = new PropertyValue(urlArray);
             _outputVisualMap.Add(ImageVisualProperty.URL, temp);
             temp.Dispose();
             urlArray.Dispose();
         }
         if (_batchSize != null)
         {
             temp = new PropertyValue((int)_batchSize);
             _outputVisualMap.Add(ImageVisualProperty.BatchSize, temp);
             temp.Dispose();
         }
         if (_cacheSize != null)
         {
             temp = new PropertyValue((int)_cacheSize);
             _outputVisualMap.Add(ImageVisualProperty.CacheSize, temp);
             temp.Dispose();
         }
         if (_frameDelay != null)
         {
             temp = new PropertyValue((float)_frameDelay);
             _outputVisualMap.Add(ImageVisualProperty.FrameDelay, temp);
             temp.Dispose();
         }
         if (_loopCount != null)
         {
             temp = new PropertyValue((int)_loopCount);
             _outputVisualMap.Add(ImageVisualProperty.LoopCount, temp);
             temp.Dispose();
         }
         base.ComposingPropertyMap();
     }
 }