mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-05-11 21:32:09 +00:00
In doc:
2005-02-07 Ben Maurer <bmaurer@ximian.com> * en/Gdk/Point.xml, en/Gdk/Rectangle.xml: Document new members. In .: 2005-02-07 Ben Maurer <bmaurer@ximian.com> * gdk/Point.custom, gdk/Rectangle.custom: misc. new apis to make this more like the S.D structs. svn path=/trunk/gtk-sharp/; revision=40282
This commit is contained in:
parent
3e5b480903
commit
ec4072d1b5
|
@ -1,3 +1,8 @@
|
||||||
|
2005-02-07 Ben Maurer <bmaurer@ximian.com>
|
||||||
|
|
||||||
|
* gdk/Point.custom, gdk/Rectangle.custom: misc. new apis to make
|
||||||
|
this more like the S.D structs.
|
||||||
|
|
||||||
2005-02-03 Mike Kestner <mkestner@novell.com>
|
2005-02-03 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
* gtk/NodeStore.cs : use CreateNativeObject to allow subclassing.
|
* gtk/NodeStore.cs : use CreateNativeObject to allow subclassing.
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2005-02-07 Ben Maurer <bmaurer@ximian.com>
|
||||||
|
|
||||||
|
* en/Gdk/Point.xml, en/Gdk/Rectangle.xml: Document new
|
||||||
|
members.
|
||||||
|
|
||||||
2005-01-28 Dan Winship <danw@novell.com>
|
2005-01-28 Dan Winship <danw@novell.com>
|
||||||
|
|
||||||
* en/GLib/NotifyArgs.xml:
|
* en/GLib/NotifyArgs.xml:
|
||||||
|
|
|
@ -103,5 +103,74 @@
|
||||||
<remarks />
|
<remarks />
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
<Member MemberName="IsEmpty">
|
||||||
|
<MemberSignature Language="C#" Value="public bool IsEmpty { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Checks if the point is (0,0)</summary>
|
||||||
|
<returns>true if this == (0,0</returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Equals">
|
||||||
|
<MemberSignature Language="C#" Value="public override bool Equals (object o);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="o" Type="System.Object" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Equality for points</summary>
|
||||||
|
<param name="o">a <see cref="T:System.Object" /></param>
|
||||||
|
<returns>true if <paramref name="o"/> == this</returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="GetHashCode">
|
||||||
|
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Hashing for points</summary>
|
||||||
|
<returns>a hash code</returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Offset">
|
||||||
|
<MemberSignature Language="C#" Value="public void Offset (int dx, int dy);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="dx" Type="System.Int32" />
|
||||||
|
<Parameter Name="dy" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Moves this point by quanities dx and dy</summary>
|
||||||
|
<param name="dx">Quanity by which to change X</param>
|
||||||
|
<param name="dy">Quanity by which to change Y</param>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName=".ctor">
|
||||||
|
<MemberSignature Language="C#" Value="public Point (Gdk.Size sz);" />
|
||||||
|
<MemberType>Constructor</MemberType>
|
||||||
|
<ReturnValue />
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="sz" Type="Gdk.Size" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Constructs a point from a <see cref="T:Gdk.Size" /></summary>
|
||||||
|
<param name="sz">a <see cref="T:Gdk.Size" /></param>
|
||||||
|
<returns><paramref name="sz"/> as a <see cref="T:Gdk.Point" /></returns>
|
||||||
|
<remarks>The point will have an X of <paramref name="sz"/>.Width and a Y of <paramref name="sz"/>.Height</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
</Members>
|
</Members>
|
||||||
</Type>
|
</Type>
|
|
@ -179,5 +179,400 @@
|
||||||
<remarks>The result is the rectangular region occupied by both source rectanlges.</remarks>
|
<remarks>The result is the rectangular region occupied by both source rectanlges.</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
<Member MemberName="Top">
|
||||||
|
<MemberSignature Language="C#" Value="public int Top { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>The Y coordinate of the top of the rectangle.</summary>
|
||||||
|
<returns>a <see cref="T:System.Int32" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Bottom">
|
||||||
|
<MemberSignature Language="C#" Value="public int Bottom { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>The Y coordinate of the bottom of the rectangle.</summary>
|
||||||
|
<returns>a <see cref="T:System.Int32" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Right">
|
||||||
|
<MemberSignature Language="C#" Value="public int Right { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>The X coordinate of the right of the rectangle.</summary>
|
||||||
|
<returns>a <see cref="T:System.Int32" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Left">
|
||||||
|
<MemberSignature Language="C#" Value="public int Left { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>The X coordinate of the left of the rectangle.</summary>
|
||||||
|
<returns>a <see cref="T:System.Int32" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="IsEmpty">
|
||||||
|
<MemberSignature Language="C#" Value="public bool IsEmpty { get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Gets if the area of the rectangle is zero</summary>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
<remarks>This will return true if either the height or the width is zero.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Size">
|
||||||
|
<MemberSignature Language="C#" Value="public Gdk.Size Size { set; get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Size</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Gets the size represented by (Width, Height)</summary>
|
||||||
|
<returns>a <see cref="T:Gdk.Size" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Location">
|
||||||
|
<MemberSignature Language="C#" Value="public Gdk.Point Location { set; get; };" />
|
||||||
|
<MemberType>Property</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Point</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Gets the point represented by (X, Y)</summary>
|
||||||
|
<returns>a <see cref="T:Gdk.Point" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="FromLTRB">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle FromLTRB (int left, int top, int right, int bottom);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="left" Type="System.Int32" />
|
||||||
|
<Parameter Name="top" Type="System.Int32" />
|
||||||
|
<Parameter Name="right" Type="System.Int32" />
|
||||||
|
<Parameter Name="bottom" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Creates a rectangle given the left, right, top, and bottom.</summary>
|
||||||
|
<param name="left">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="top">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="right">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="bottom">a <see cref="T:System.Int32" /></param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Union">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Union (Gdk.Rectangle r1, Gdk.Rectangle r2);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="r1" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="r2" Type="Gdk.Rectangle" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Gets the smallest rectangle that contains both parameters</summary>
|
||||||
|
<param name="r1">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="r2">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Intersect">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Intersect (Gdk.Rectangle r1, Gdk.Rectangle r2);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="r1" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="r2" Type="Gdk.Rectangle" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Gets the largest rectangle (if any) which is contained by both parameters.</summary>
|
||||||
|
<param name="r1">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="r2">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Inflate">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Inflate (Gdk.Rectangle rect, int x, int y);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="rect" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="x" Type="System.Int32" />
|
||||||
|
<Parameter Name="y" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Changes the size of each side of the rectangle by the specified amount.</summary>
|
||||||
|
<param name="rect">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="x">Change in the X size</param>
|
||||||
|
<param name="y">Change in the Y size</param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
<remarks>The rectangle's center is the same as the center of <paramref name="rect"/>.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Inflate">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Inflate (Gdk.Rectangle rect, Gdk.Size sz);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="rect" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="sz" Type="Gdk.Size" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Changes the size of each side of the rectangle by the specified amount.</summary>
|
||||||
|
<param name="rect">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="sz">A change in size.</param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
<remarks>The rectangle's center is the same as the center of <paramref name="rect"/>.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Offset">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Offset (Gdk.Rectangle rect, int dx, int dy);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="rect" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="dx" Type="System.Int32" />
|
||||||
|
<Parameter Name="dy" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Returns the rectangle shifted by (dx,dy)</summary>
|
||||||
|
<param name="rect">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="dx">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="dy">a <see cref="T:System.Int32" /></param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Offset">
|
||||||
|
<MemberSignature Language="C#" Value="public static Gdk.Rectangle Offset (Gdk.Rectangle rect, Gdk.Point dr);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>Gdk.Rectangle</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="rect" Type="Gdk.Rectangle" />
|
||||||
|
<Parameter Name="dr" Type="Gdk.Point" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Returns a rectangle shifted by the vector dr</summary>
|
||||||
|
<param name="rect">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<param name="dr">a <see cref="T:Gdk.Point" /></param>
|
||||||
|
<returns>a <see cref="T:Gdk.Rectangle" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Equals">
|
||||||
|
<MemberSignature Language="C#" Value="public override bool Equals (object o);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="o" Type="System.Object" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Equality for rectangles</summary>
|
||||||
|
<param name="o">a <see cref="T:System.Object" /></param>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="GetHashCode">
|
||||||
|
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Int32</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters />
|
||||||
|
<Docs>
|
||||||
|
<summary>Hashing for rectangles</summary>
|
||||||
|
<returns>a <see cref="T:System.Int32" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Contains">
|
||||||
|
<MemberSignature Language="C#" Value="public bool Contains (Gdk.Rectangle rect);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="rect" Type="Gdk.Rectangle" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Tests if a rectangle is contained in this rectangle.</summary>
|
||||||
|
<param name="rect">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
<remarks>The rectangle must be fully enclosed for this test to return true. That is,
|
||||||
|
the intersection of this and <paramref name="rect" /> must equal <paramref name="rect" />.</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Contains">
|
||||||
|
<MemberSignature Language="C#" Value="public bool Contains (Gdk.Point pt);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="pt" Type="Gdk.Point" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Does hit testing for a point</summary>
|
||||||
|
<param name="pt">a <see cref="T:Gdk.Point" /></param>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Contains">
|
||||||
|
<MemberSignature Language="C#" Value="public bool Contains (int x, int y);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="x" Type="System.Int32" />
|
||||||
|
<Parameter Name="y" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Does hit testing for a point</summary>
|
||||||
|
<param name="x">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="y">a <see cref="T:System.Int32" /></param>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="IntersectsWith">
|
||||||
|
<MemberSignature Language="C#" Value="public bool IntersectsWith (Gdk.Rectangle r);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Boolean</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="r" Type="Gdk.Rectangle" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Tests if there is any overlap of this rectangle and another</summary>
|
||||||
|
<param name="r">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Intersect">
|
||||||
|
<MemberSignature Language="C#" Value="public void Intersect (Gdk.Rectangle r);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="r" Type="Gdk.Rectangle" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Modifies this rectangle to be the intersection with another rectangle</summary>
|
||||||
|
<param name="r">a <see cref="T:Gdk.Rectangle" /></param>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Inflate">
|
||||||
|
<MemberSignature Language="C#" Value="public void Inflate (Gdk.Size sz);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="sz" Type="Gdk.Size" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Inflates this rectangle by a given size.</summary>
|
||||||
|
<param name="sz">a <see cref="T:Gdk.Size" /></param>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Inflate">
|
||||||
|
<MemberSignature Language="C#" Value="public void Inflate (int width, int height);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="width" Type="System.Int32" />
|
||||||
|
<Parameter Name="height" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Inflates this rectangle by a given size.</summary>
|
||||||
|
<param name="width">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="height">a <see cref="T:System.Int32" /></param>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Offset">
|
||||||
|
<MemberSignature Language="C#" Value="public void Offset (int dx, int dy);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="dx" Type="System.Int32" />
|
||||||
|
<Parameter Name="dy" Type="System.Int32" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Offsets this rectangle by (dx,dy)</summary>
|
||||||
|
<param name="dx">a <see cref="T:System.Int32" /></param>
|
||||||
|
<param name="dy">a <see cref="T:System.Int32" /></param>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName="Offset">
|
||||||
|
<MemberSignature Language="C#" Value="public void Offset (Gdk.Point dr);" />
|
||||||
|
<MemberType>Method</MemberType>
|
||||||
|
<ReturnValue>
|
||||||
|
<ReturnType>System.Void</ReturnType>
|
||||||
|
</ReturnValue>
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="dr" Type="Gdk.Point" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Offsets this rectangle by the vector dr</summary>
|
||||||
|
<param name="dr">a <see cref="T:Gdk.Point" /></param>
|
||||||
|
<remarks>To be added</remarks>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
|
<Member MemberName=".ctor">
|
||||||
|
<MemberSignature Language="C#" Value="public Rectangle (Gdk.Point loc, Gdk.Size sz);" />
|
||||||
|
<MemberType>Constructor</MemberType>
|
||||||
|
<ReturnValue />
|
||||||
|
<Parameters>
|
||||||
|
<Parameter Name="loc" Type="Gdk.Point" />
|
||||||
|
<Parameter Name="sz" Type="Gdk.Size" />
|
||||||
|
</Parameters>
|
||||||
|
<Docs>
|
||||||
|
<summary>Creates a rectangle from a point and a size.</summary>
|
||||||
|
<param name="loc">a <see cref="T:Gdk.Point" /></param>
|
||||||
|
<param name="sz">a <see cref="T:Gdk.Size" /></param>
|
||||||
|
<returns>A rectangle with a location of <paramref name="loc"/> and size of <paramref name="size"/>.</returns>
|
||||||
|
</Docs>
|
||||||
|
</Member>
|
||||||
</Members>
|
</Members>
|
||||||
</Type>
|
</Type>
|
|
@ -1,10 +1,14 @@
|
||||||
// Gdk.Point.custom - Gdk Point class customizations
|
// Gdk.Point.custom - Gdk Point class customizations
|
||||||
//
|
//
|
||||||
// Author: Jasper van Putten <Jaspervp@gmx.net>
|
// Authors:
|
||||||
// Author: Martin Willemoes Hansen <mwh@sysrq.dk>
|
// Jasper van Putten <Jaspervp@gmx.net>
|
||||||
|
// Martin Willemoes Hansen <mwh@sysrq.dk>
|
||||||
|
// Ben Maurer <bmaurer@novell.com>
|
||||||
|
// Contains lots of c&p from System.Drawing
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Jasper van Putten
|
// Copyright (c) 2002 Jasper van Putten
|
||||||
// Copyright (c) 2003 Martin Willemoes Hansen
|
// Copyright (c) 2003 Martin Willemoes Hansen
|
||||||
|
// Copyright (c) 2005 Novell, Inc
|
||||||
//
|
//
|
||||||
// This code is inserted after the automatically generated code.
|
// This code is inserted after the automatically generated code.
|
||||||
//
|
//
|
||||||
|
@ -22,30 +26,69 @@
|
||||||
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
// Boston, MA 02111-1307, USA.
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToString method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// returns a string representation of this point
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public override string ToString ()
|
public override string ToString ()
|
||||||
{
|
{
|
||||||
return String.Format ("({0},{1})", X, Y);
|
return String.Format ("({0},{1})", X, Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Point Constructor
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// Constructs a new Point with the specified
|
|
||||||
/// coordinates.
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public Point (int x, int y)
|
public Point (int x, int y)
|
||||||
{
|
{
|
||||||
this.X = x;
|
this.X = x;
|
||||||
this.Y = y;
|
this.Y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point (Size sz)
|
||||||
|
{
|
||||||
|
this.X = sz.Width;
|
||||||
|
this.Y = sz.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals (object o)
|
||||||
|
{
|
||||||
|
if (!(o is Point))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (this == (Point) o);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode ()
|
||||||
|
{
|
||||||
|
return X ^ Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Offset (int dx, int dy)
|
||||||
|
{
|
||||||
|
X += dx;
|
||||||
|
Y += dy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsEmpty {
|
||||||
|
get {
|
||||||
|
return ((X == 0) && (Y == 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static explicit operator Size (Point pt)
|
||||||
|
{
|
||||||
|
return new Size (pt.X, pt.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Point operator + (Point pt, Size sz)
|
||||||
|
{
|
||||||
|
return new Point (pt.X + sz.Width, pt.Y + sz.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Point operator - (Point pt, Size sz)
|
||||||
|
{
|
||||||
|
return new Point (pt.X - sz.Width, pt.Y - sz.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator == (Point pt_a, Point pt_b)
|
||||||
|
{
|
||||||
|
return ((pt_a.X == pt_b.X) && (pt_a.Y == pt_b.Y));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator != (Point pt_a, Point pt_b)
|
||||||
|
{
|
||||||
|
return ((pt_a.X != pt_b.X) || (pt_a.Y != pt_b.Y));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
// Gdk.Point.Rectangle - Gdk Rectangle class customizations
|
// Gdk.Point.Rectangle - Gdk Rectangle class customizations
|
||||||
//
|
//
|
||||||
// Author: Jasper van Putten <Jaspervp@gmx.net>
|
// Authors:
|
||||||
|
// Jasper van Putten <Jaspervp@gmx.net>
|
||||||
|
// Ben Maurer <bmaurer@novell.com>
|
||||||
|
// Contains lots of c&p from System.Drawing
|
||||||
//
|
//
|
||||||
// Copyright (c) 2002 Jasper van Putten
|
// Copyright (c) 2002 Jasper van Putten
|
||||||
|
// Copyright (c) 2005 Novell, Inc
|
||||||
//
|
//
|
||||||
// This code is inserted after the automatically generated code.
|
// This code is inserted after the automatically generated code.
|
||||||
//
|
//
|
||||||
|
@ -21,20 +25,12 @@
|
||||||
// Boston, MA 02111-1307, USA.
|
// Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// ToString method
|
|
||||||
/// </summary>
|
|
||||||
///
|
|
||||||
/// <remarks>
|
|
||||||
/// returns a string representation of this Rectangle
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
|
|
||||||
public override string ToString ()
|
public override string ToString ()
|
||||||
{
|
{
|
||||||
return String.Format ("{0}x{1}+{2}+{3}", Width, Height, X, Y);
|
return String.Format ("{0}x{1}+{2}+{3}", Width, Height, X, Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// constructors
|
||||||
public Rectangle (int x, int y, int width, int height)
|
public Rectangle (int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
this.X = x;
|
this.X = x;
|
||||||
|
@ -43,3 +39,174 @@ public Rectangle (int x, int y, int width, int height)
|
||||||
this.Height = height;
|
this.Height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Rectangle (Point loc, Size sz) : this (loc.X, loc.Y, sz.Width, sz.Height) {}
|
||||||
|
|
||||||
|
public static Rectangle FromLTRB (int left, int top, int right, int bottom)
|
||||||
|
{
|
||||||
|
return new Rectangle (left, top, right - left,
|
||||||
|
bottom - top);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Equality
|
||||||
|
public override bool Equals (object o)
|
||||||
|
{
|
||||||
|
if (!(o is Rectangle))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return (this == (Rectangle) o);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode ()
|
||||||
|
{
|
||||||
|
return (Height + Width) ^ X + Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator == (Rectangle r1, Rectangle r2)
|
||||||
|
{
|
||||||
|
return ((r1.Location == r2.Location) && (r1.Size == r2.Size));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool operator != (Rectangle r1, Rectangle r2)
|
||||||
|
{
|
||||||
|
return !(r1 == r2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hit Testing / Intersection / Union
|
||||||
|
public bool Contains (Rectangle rect)
|
||||||
|
{
|
||||||
|
return (rect == Intersect (this, rect));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Contains (Point pt)
|
||||||
|
{
|
||||||
|
return Contains (pt.X, pt.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Contains (int x, int y)
|
||||||
|
{
|
||||||
|
return ((x >= Left) && (x <= Right) &&
|
||||||
|
(y >= Top) && (y <= Bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IntersectsWith (Rectangle r)
|
||||||
|
{
|
||||||
|
return !((Left > r.Right) || (Right < r.Left) ||
|
||||||
|
(Top > r.Bottom) || (Bottom < r.Top));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Union (Rectangle r1, Rectangle r2)
|
||||||
|
{
|
||||||
|
return FromLTRB (Math.Min (r1.Left, r2.Left),
|
||||||
|
Math.Min (r1.Top, r2.Top),
|
||||||
|
Math.Max (r1.Right, r2.Right),
|
||||||
|
Math.Max (r1.Bottom, r2.Bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Intersect (Rectangle r)
|
||||||
|
{
|
||||||
|
if (!IntersectsWith (r)) {
|
||||||
|
X = 0;
|
||||||
|
Y = 0;
|
||||||
|
Width = 0;
|
||||||
|
Height = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
X = Math.Max (Left, r.Left);
|
||||||
|
Y = Math.Max (Top, r.Top);
|
||||||
|
Width = Math.Min (Right, r.Right) - X;
|
||||||
|
Height = Math.Min (Bottom, r.Bottom) - Y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Intersect (Rectangle r1, Rectangle r2)
|
||||||
|
{
|
||||||
|
Rectangle r = r1;
|
||||||
|
r.Intersect (r2);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Position/Size
|
||||||
|
public int Top {
|
||||||
|
get { return Y; }
|
||||||
|
}
|
||||||
|
public int Bottom {
|
||||||
|
get { return Y + Height; }
|
||||||
|
}
|
||||||
|
public int Right {
|
||||||
|
get { return X + Width; }
|
||||||
|
}
|
||||||
|
public int Left {
|
||||||
|
get { return X; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsEmpty {
|
||||||
|
get { return (Width == 0) || (Height == 0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public Size Size {
|
||||||
|
get {
|
||||||
|
return new Size (Width, Height);
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
Width = value.Width;
|
||||||
|
Height = value.Height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point Location {
|
||||||
|
get {
|
||||||
|
return new Point (X, Y);
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
X = value.X;
|
||||||
|
Y = value.Y;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Inflate and Offset
|
||||||
|
public void Inflate (Size sz)
|
||||||
|
{
|
||||||
|
Inflate (sz.Width, sz.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Inflate (int width, int height)
|
||||||
|
{
|
||||||
|
X -= width;
|
||||||
|
Y -= height;
|
||||||
|
Width += width * 2;
|
||||||
|
Height += height * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Inflate (Rectangle rect, int x, int y)
|
||||||
|
{
|
||||||
|
Rectangle r = rect;
|
||||||
|
r.Inflate (x, y);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Inflate (Rectangle rect, Size sz)
|
||||||
|
{
|
||||||
|
return Inflate (rect, sz.Width, sz.Height);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Offset (int dx, int dy)
|
||||||
|
{
|
||||||
|
X += dx;
|
||||||
|
Y += dy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Offset (Point dr)
|
||||||
|
{
|
||||||
|
Offset (dr.X, dr.Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Offset (Rectangle rect, int dx, int dy)
|
||||||
|
{
|
||||||
|
Rectangle r = rect;
|
||||||
|
r.Offset (dx, dy);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Rectangle Offset (Rectangle rect, Point dr)
|
||||||
|
{
|
||||||
|
return Offset (rect, dr.X, dr.Y);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue