1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
13 public class Rectangle : global::System.IDisposable {
14 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 protected bool swigCMemOwn;
17 internal Rectangle(global::System.IntPtr cPtr, bool cMemoryOwn) {
18 swigCMemOwn = cMemoryOwn;
19 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Rectangle obj) {
23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
27 DisposeQueue.Instance.Add(this);
30 public virtual void Dispose() {
31 if (!Stage.IsInstalled()) {
32 DisposeQueue.Instance.Add(this);
37 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
40 NDalicPINVOKE.delete_Rectangle(swigCPtr);
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
44 global::System.GC.SuppressFinalize(this);
49 public static bool operator ==(Rectangle a, Rectangle b)
51 // If both are null, or both are same instance, return true.
52 if (System.Object.ReferenceEquals(a, b))
57 // If one is null, but not both, return false.
58 if (((object)a == null) || ((object)b == null))
63 // Return true if the fields match:
64 return a.X == b.X && a.Y == b.Y && a.Width == b.Width && a.Height == b.Height;
67 public static bool operator !=(Rectangle a, Rectangle b)
72 ///< X position of the rectangle
85 ///< Y position of the rectangle
98 ///< Width of the rectangle
111 ///< Height of the rectangle
124 public Rectangle() : this(NDalicPINVOKE.new_Rectangle__SWIG_0(), true) {
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public Rectangle(int x, int y, int width, int height) : this(NDalicPINVOKE.new_Rectangle__SWIG_1(x, y, width, height), true) {
129 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
132 public Rectangle(Rectangle rhs) : this(NDalicPINVOKE.new_Rectangle__SWIG_2(Rectangle.getCPtr(rhs)), true) {
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
136 public Rectangle Assign(Rectangle rhs) {
137 Rectangle ret = new Rectangle(NDalicPINVOKE.Rectangle_Assign(swigCPtr, Rectangle.getCPtr(rhs)), false);
138 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 public void Set(int newX, int newY, int newWidth, int newHeight) {
143 NDalicPINVOKE.Rectangle_Set(swigCPtr, newX, newY, newWidth, newHeight);
144 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
147 public bool IsEmpty() {
148 bool ret = NDalicPINVOKE.Rectangle_IsEmpty(swigCPtr);
149 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
154 int ret = NDalicPINVOKE.Rectangle_Left(swigCPtr);
155 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 int ret = NDalicPINVOKE.Rectangle_Right(swigCPtr);
161 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 int ret = NDalicPINVOKE.Rectangle_Top(swigCPtr);
167 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
171 public int Bottom() {
172 int ret = NDalicPINVOKE.Rectangle_Bottom(swigCPtr);
173 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 int ret = NDalicPINVOKE.Rectangle_Area(swigCPtr);
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
183 public bool Intersects(Rectangle other) {
184 bool ret = NDalicPINVOKE.Rectangle_Intersects(swigCPtr, Rectangle.getCPtr(other));
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
189 public bool Contains(Rectangle other) {
190 bool ret = NDalicPINVOKE.Rectangle_Contains(swigCPtr, Rectangle.getCPtr(other));
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
197 NDalicPINVOKE.Rectangle_x_set(swigCPtr, value);
198 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
201 int ret = NDalicPINVOKE.Rectangle_x_get(swigCPtr);
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
209 NDalicPINVOKE.Rectangle_left_set(swigCPtr, value);
210 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213 int ret = NDalicPINVOKE.Rectangle_left_get(swigCPtr);
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
221 NDalicPINVOKE.Rectangle_y_set(swigCPtr, value);
222 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225 int ret = NDalicPINVOKE.Rectangle_y_get(swigCPtr);
226 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 NDalicPINVOKE.Rectangle_right_set(swigCPtr, value);
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 int ret = NDalicPINVOKE.Rectangle_right_get(swigCPtr);
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
245 NDalicPINVOKE.Rectangle_width_set(swigCPtr, value);
246 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
249 int ret = NDalicPINVOKE.Rectangle_width_get(swigCPtr);
250 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
257 NDalicPINVOKE.Rectangle_bottom_set(swigCPtr, value);
258 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
261 int ret = NDalicPINVOKE.Rectangle_bottom_get(swigCPtr);
262 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269 NDalicPINVOKE.Rectangle_height_set(swigCPtr, value);
270 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
273 int ret = NDalicPINVOKE.Rectangle_height_get(swigCPtr);
274 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
281 NDalicPINVOKE.Rectangle_top_set(swigCPtr, value);
282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 int ret = NDalicPINVOKE.Rectangle_top_get(swigCPtr);
286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();