X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=plugins%2Fdali-swig%2Fmanual%2Fcsharp%2FSize.cs;h=d238d3664c6a7dfaa61ebec5da2615716c1baaa1;hp=f89172a7ffe0eb4b91ab93f38e7e35ad4d1486f3;hb=refs%2Fchanges%2F53%2F107353%2F4;hpb=22b6cdee7ed55d63eac35b64b304fc771052fcee diff --git a/plugins/dali-swig/manual/csharp/Size.cs b/plugins/dali-swig/manual/csharp/Size.cs index f89172a..d238d36 100644 --- a/plugins/dali-swig/manual/csharp/Size.cs +++ b/plugins/dali-swig/manual/csharp/Size.cs @@ -38,8 +38,8 @@ namespace Dali */ public Size(Vector2 o) { - width = o.x; - height = o.y; + width = o.X; + height = o.Y; } /** @@ -70,6 +70,18 @@ namespace Dali set { height = value; } } + public float Width + { + get { return width; } + set { width = value; } + } + + public float Height + { + get { return height; } + set { height = value; } + } + /** * @brief operator+ * @@ -171,7 +183,7 @@ namespace Dali return copy; } - // User-defined conversion from Position to Vector3 + // User-defined conversion from Position to Vector2 public static implicit operator Vector2(Size size) { return new Vector2(size.width, size.height); @@ -179,7 +191,116 @@ namespace Dali public static implicit operator Size(Vector2 vec) { - return new Size(vec.x, vec.y); + return new Size(vec.X, vec.Y); } } + + public class Size3D + { + private float width; + private float height; + private float depth; + + public Size3D(float a, float b, float c) + { + width = a; + height = b; + depth = c; + } + + public Size3D() + { + width = 0.0f; + height = 0.0f; + depth = 0.0f; + } + + public Size3D(Vector3 o) + { + width = o.X; + height = o.Y; + depth = o.Z; + } + + public Size3D(Vector2 o) + { + width = o.X; + height = o.Y; + depth = 0.0f; + } + + public Size3D(Size3D a) + { + width = a.width; + height = a.height; + depth = a.depth; + } + + public float W + { + get { return width; } + set { width = value; } + } + + public float H + { + get { return height; } + set { height = value; } + } + + public float D + { + get { return depth; } + set { depth = value; } + } + + public float Width + { + get { return width; } + set { width = value; } + } + + public float Height + { + get { return height; } + set { height = value; } + } + + public float Depth + { + get { return depth; } + set { depth = value; } + } + + public float X + { + get { return width; } + set { width = value; } + } + + public float Y + { + get { return height; } + set { height = value; } + } + + public float Z + { + get { return depth; } + set { depth = value; } + } + + // User-defined conversion from Position to Vector3 + public static implicit operator Vector3(Size3D size) + { + return new Vector3(size.width, size.height, size.depth); + } + + public static implicit operator Size3D(Vector3 vec) + { + return new Size3D(vec.X, vec.Y, vec.Z); + } + + } + }