[]
        
(Showing Draft Content)

GrapeCity.Documents.Text.ObjectRect

Class ObjectRect

Namespace
GrapeCity.Documents.Text
Assembly
GcDocs.Imaging.dll

Represents a rectangular area occupied by an embedded object.

public class ObjectRect
Inheritance
object
ObjectRect
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

ObjectRect()

Initializes a new instance of the ObjectRect class.

public ObjectRect()

ObjectRect(ObjectRect)

Initializes a new instance of the ObjectRect class from another instance of ObjectRect.

public ObjectRect(ObjectRect source)

Parameters

source ObjectRect

ObjectRect(PointF, SizeF)

Initializes a new instance of the ObjectRect class with the specified location and size.

public ObjectRect(PointF pt, SizeF sz)

Parameters

pt System.Drawing.PointF

A System.Drawing.PointF that represents the upper-left corner of the rectangle.

sz System.Drawing.SizeF

A System.Drawing.SizeF that represents the size of the rectangle.

ObjectRect(RectangleF)

Initializes a new instance of the ObjectRect class from a System.Drawing.RectangleF.

public ObjectRect(RectangleF rc)

Parameters

rc System.Drawing.RectangleF

The rectangle used to initialize the new ObjectRect.

ObjectRect(float, float, float, float)

Initializes a new instance of the ObjectRect class with the specified coordinates and size.

public ObjectRect(float x, float y, float width, float height)

Parameters

x float

The X coordinate of the rectangle.

y float

The Y coordinate of the rectangle.

width float

The width of the rectangle.

height float

The height of the rectangle.

Properties

Bottom

Gets or sets the y-coordinate of the bottom edge of this ObjectRect, in graphic units.

public float Bottom { get; set; }

Property Value

float

Height

Gets or sets the height of this ObjectRect, in graphic units.

public float Height { get; set; }

Property Value

float

Left

Gets or sets the x-coordinate of the left edge of this ObjectRect, in graphic units.

public float Left { get; set; }

Property Value

float

Right

Gets or sets the x-coordinate of the right edge of this ObjectRect, in graphic units.

public float Right { get; set; }

Property Value

float

Tag

Gets or sets the custom data associated with this ObjectRect.

public object Tag { get; set; }

Property Value

object

Top

Gets or sets the y-coordinate of the top edge of this ObjectRect, in graphic units.

public float Top { get; set; }

Property Value

float

Width

Gets or sets the width of this ObjectRect, in graphic units.

public float Width { get; set; }

Property Value

float

X

Gets or sets the x-coordinate of the left edge of this ObjectRect, in graphic units.

public float X { get; set; }

Property Value

float

Y

Gets or sets the y-coordinate of the top edge of this ObjectRect, in graphic units.

public float Y { get; set; }

Property Value

float

Methods

Contains(float, float)

Determines if the specified point is contained within this rectangle.

public bool Contains(float x, float y)

Parameters

x float
y float

Returns

bool

FromLTRB(float, float, float, float)

Creates an instance of ObjectRect from (left, top, right, bottom) coordinates.

public static ObjectRect FromLTRB(float left, float top, float right, float bottom)

Parameters

left float

The X coordinate of the top left corner.

top float

The Y coordinate of the top left corner.

right float

The X coordinate of the bottom right corner.

bottom float

The Y coordinate of the bottom right corner.

Returns

ObjectRect

Inflate(float, float)

Inflates the rectangle by the specified amount.

public void Inflate(float dx, float dy)

Parameters

dx float
dy float

IntersectsWith(ObjectRect)

Determines if this rectangle intersects with rect.

public bool IntersectsWith(ObjectRect rect)

Parameters

rect ObjectRect

Returns

bool

Offset(float, float)

Offsets the rectangle by the specified amount.

public void Offset(float dx, float dy)

Parameters

dx float
dy float

Scale(float, float)

Scales all coordinates of a rectangle by the specified scaleX and scaleY.

public void Scale(float scaleX, float scaleY)

Parameters

scaleX float
scaleY float

Scale(float)

Scales all coordinates of a rectangle by the specified scaleFactor.

public void Scale(float scaleFactor)

Parameters

scaleFactor float

ToRectangleF()

Converts an ObjectRect to System.Drawing.RectangleF.

public RectangleF ToRectangleF()

Returns

System.Drawing.RectangleF

Operators

explicit operator RectangleF(ObjectRect)

Performs an explicit conversion from ObjectRect to System.Drawing.RectangleF.

public static explicit operator RectangleF(ObjectRect rect)

Parameters

rect ObjectRect

Returns

System.Drawing.RectangleF

explicit operator ObjectRect(RectangleF)

Performs an explicit conversion from System.Drawing.RectangleF to ObjectRect.

public static explicit operator ObjectRect(RectangleF rc)

Parameters

rc System.Drawing.RectangleF

Returns

ObjectRect