-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
+// Copyright (c) 2017 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
+// Some have been manually changed
namespace Tizen.NUI
{
using System;
+ /// <summary>
+ /// Color class
+ /// </summary>
public class Color : global::System.IDisposable
{
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
DisposeQueue.Instance.Add(this);
}
+ /// <summary>
+ /// To make Color instance be disposed.
+ /// </summary>
public virtual void Dispose()
{
if (!Stage.IsInstalled())
}
}
-
+ /// <summary>
+ /// Addition operator.
+ /// </summary>
+ /// <param name="arg1">First value</param>
+ /// <param name="arg2">Second value</param>
+ /// <returns>A Color containing the result of the addition</returns>
public static Color operator +(Color arg1, Color arg2)
{
return arg1.Add(arg2);
}
+ /// <summary>
+ /// Subtraction operator.
+ /// </summary>
+ /// <param name="arg1">First value</param>
+ /// <param name="arg2">Second value</param>
+ /// <returns>A Color containing the result of the subtraction</returns>
public static Color operator -(Color arg1, Color arg2)
{
return arg1.Subtract(arg2);
}
+ /// <summary>
+ /// Unary negation operator.
+ /// </summary>
+ /// <param name="arg1">Target Value</param>
+ /// <returns>A Color containg the negation</returns>
public static Color operator -(Color arg1)
{
return arg1.Subtract();
}
+ /// <summary>
+ /// Multiplication operator.
+ /// </summary>
+ /// <param name="arg1">First Value</param>
+ /// <param name="arg2">Second Value</param>
+ /// <returns>A Color containing the result of the multiplication</returns>
public static Color operator *(Color arg1, Color arg2)
{
return arg1.Multiply(arg2);
}
- public static Color operator *(Color arg1, float arg2)
- {
- return arg1.Multiply(arg2);
- }
-
+ /// <summary>
+ /// Division operator.
+ /// </summary>
+ /// <param name="arg1">First Value</param>
+ /// <param name="arg2">Second Value</param>
+ /// <returns>A Color containing the result of the division</returns>
public static Color operator /(Color arg1, Color arg2)
{
return arg1.Divide(arg2);
}
- public static Color operator /(Color arg1, float arg2)
- {
- return arg1.Divide(arg2);
- }
-
-
+ /// <summary>
+ /// Array subscript operator overload.
+ /// </summary>
+ /// <param name="index">Subscript index</param>
+ /// <returns>The float at the given index</returns>
public float this[uint index]
{
get
}
}
- public static Color GetColorFromPtr(global::System.IntPtr cPtr)
+ internal static Color GetColorFromPtr(global::System.IntPtr cPtr)
{
Color ret = new Color(cPtr, false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
-
+ /// <summary>
+ /// Default constructor
+ /// </summary>
public Color() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+
+ /// <summary>
+ /// Constructor.
+ /// </summary>
+ /// <param name="r">red component</param>
+ /// <param name="g">green component</param>
+ /// <param name="b">blue component</param>
+ /// <param name="a">alpha component</param>
public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(r, g, b, a), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Conversion constructor from an array of four floats.
+ /// </summary>
+ /// <param name="array">array Array of R,G,B,A</param>
public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- private Color Multiply(float rhs)
- {
- Color ret = new Color(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
-
private Color MultiplyAssign(Color rhs)
{
Color ret = new Color(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Color.getCPtr(rhs)), false);
return ret;
}
- private Color Divide(float rhs)
- {
- Color ret = new Color(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
private Color DivideAssign(Color rhs)
{
return ret;
}
+ /// <summary>
+ /// Check if two Color classes are same.
+ /// </summary>
+ /// <param name="rhs">A Color to be compared</param>
+ /// <returns>If two Colors are are same, then true.</returns>
public bool EqualTo(Color rhs)
{
bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Color.getCPtr(rhs));
return ret;
}
+ /// <summary>
+ /// Check if two Color classes are different.
+ /// </summary>
+ /// <param name="rhs">A Color to be compared</param>
+ /// <returns>If two Colors are are different, then true.</returns>
public bool NotEqualTo(Color rhs)
{
bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Color.getCPtr(rhs));
return ret;
}
+ /// <summary>
+ /// red component
+ /// </summary>
public float R
{
set
}
}
+ /// <summary>
+ /// green component
+ /// </summary>
public float G
{
set
}
}
+ /// <summary>
+ /// blue component
+ /// </summary>
public float B
{
set
}
}
+ /// <summary>
+ /// alpha component
+ /// </summary>
public float A
{
set
}
}
+ /// <summary>
+ /// Get black colored Color class
+ /// </summary>
public static Color Black
{
get
}
}
+ /// <summary>
+ /// Get white colored Color class
+ /// </summary>
public static Color White
{
get
}
}
+ /// <summary>
+ /// Get red colored Color class
+ /// </summary>
public static Color Red
{
get
}
}
+ /// <summary>
+ /// Get green colored Color class
+ /// </summary>
public static Color Green
{
get
}
}
+ /// <summary>
+ /// Get blue colored Color class
+ /// </summary>
public static Color Blue
{
get
}
}
+ /// <summary>
+ /// Get yellow colored Color class
+ /// </summary>
public static Color Yellow
{
get
}
}
+ /// <summary>
+ /// Get magenta colored Color class
+ /// </summary>
public static Color Magenta
{
get
}
}
+ /// <summary>
+ /// Get cyan colored Color class
+ /// </summary>
public static Color Cyan
{
get
}
}
+ /// <summary>
+ /// Get transparent colored Color class
+ /// </summary>
public static Color Transparent
{
get
}
}
+ /// <summary>
+ /// convert Color class to Vector4 class implicitly.
+ /// </summary>
+ /// <param name="color">A Color to be converted to Vector4</param>
public static implicit operator Vector4(Color color)
{
return new Vector4(color.R, color.G, color.B, color.A);
}
+ /// <summary>
+ /// convert Vector4 class to Color class implicitly.
+ /// </summary>
+ /// <param name="vec">A Vector4 to be converted to Color</param></param>
public static implicit operator Color(Vector4 vec)
{
return new Color(vec.R, vec.G, vec.B, vec.A);