using System;
using System.ComponentModel;
+using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace Tizen.NUI.BaseComponents.VectorGraphics
/// </summary>
/// <exception cref="ArgumentNullException"> Thrown when value is null. </exception>
[EditorBrowsable(EditorBrowsableState.Never)]
- public List<float> StrokeDash
+ public ReadOnlyCollection<float> StrokeDash
{
get {
- List<float> ret = new List<float>();
+ List<float> retList = new List<float>();
int patternCount = Interop.Shape.GetStrokeDashCount(BaseHandle.getCPtr(this));
for (int i = 0; i < patternCount; i++)
{
- ret.Add(Interop.Shape.GetStrokeDashIndexOf(BaseHandle.getCPtr(this), i));
+ retList.Add(Interop.Shape.GetStrokeDashIndexOf(BaseHandle.getCPtr(this), i));
}
+
+ ReadOnlyCollection<float> ret = new ReadOnlyCollection<float>(retList);
return ret;
}
set {
using Tizen.NUI.BaseComponents;
using Tizen.NUI.BaseComponents.VectorGraphics;
using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
namespace Tizen.NUI.Samples
{
FillColor = new Color(0.0f, 0.0f, 1.0f, 1.0f),
StrokeColor = new Color(1.0f, 1.0f, 0.0f, 1.0f),
StrokeWidth = 10.0f,
- StrokeDash = new List<float>() {15.0f, 30.0f},
+ StrokeDash = new List<float>(){15.0f, 30.0f}.AsReadOnly(),
};
shape2.AddCircle(0.0f, 0.0f, 150.0f, 100.0f);
shape2.Transform(new float[] {0.6f, 0.0f, 350.0f, 0.0f, 0.6f, 100.0f, 0.0f, 0.0f, 1.0f});
canvasView.AddDrawable(shape);
- timer = new Timer(1000 / 32);
- timer.Tick += onTick;
- timer.Start();
-
-
// Test Getter
log.Debug(tag, "Shape2 Color : " + shape2.FillColor.R + " " + shape2.FillColor.G + " " + shape2.FillColor.B + " " + shape2.FillColor.A + "\n");
log.Debug(tag, "Shape2 StrokeColor : " + shape2.StrokeColor.R + " " + shape2.StrokeColor.G + " " + shape2.StrokeColor.B + " " + shape2.StrokeColor.A + "\n");
}
root.Add(canvasView);
+
+ timer = new Timer(1000 / 32);
+ timer.Tick += onTick;
+ timer.Start();
}
public void Deactivate()