CodeGlyphX logo
CodeGlyphX

API Reference

Struct

ImageRegion

Namespace CodeGlyphX
Assembly CodeGlyphX
Base ValueType
Implements
IEquatable<ImageRegion>
Modifiers sealed

Defines an integer region within an image.

Inheritance

  • ValueType
  • ImageRegion

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by

Accepted by parameters

Constructors

public ImageRegion(Int32 x, Int32 y, Int32 width, Int32 height) #

Creates an image region.

Parameters

x System.Int32 requiredposition: 0
y System.Int32 requiredposition: 1
width System.Int32 requiredposition: 2
height System.Int32 requiredposition: 3

Methods

public Nullable<ImageRegion> ClipTo(Int32 imageWidth, Int32 imageHeight) #
Returns: Nullable<ImageRegion>

Returns the intersection with the supplied image dimensions, or null when there is no overlap.

Parameters

imageWidth System.Int32 requiredposition: 0
imageHeight System.Int32 requiredposition: 1
Equals 2 overloads
public virtual Boolean Equals(ImageRegion other) #
Returns: Boolean

Parameters

other CodeGlyphX.ImageRegion requiredposition: 0
public override Boolean Equals(Object obj) #
Returns: Boolean

Parameters

obj System.Object requiredposition: 0
public override Int32 GetHashCode() #
Returns: Int32
op_Equality(CodeGlyphX.ImageRegion left, CodeGlyphX.ImageRegion right) #

Compares two regions.

Parameters

left CodeGlyphX.ImageRegion required
right CodeGlyphX.ImageRegion required
op_Inequality(CodeGlyphX.ImageRegion left, CodeGlyphX.ImageRegion right) #

Compares two regions.

Parameters

left CodeGlyphX.ImageRegion required
right CodeGlyphX.ImageRegion required
public override String ToString() #
Returns: String

Properties

public Int32 X { get; } #

Gets the horizontal origin.

public Int32 Y { get; } #

Gets the vertical origin.

public Int32 Width { get; } #

Gets the region width.

public Int32 Height { get; } #

Gets the region height.

public Int32 Right { get; } #

Gets the exclusive right edge.

public Int32 Bottom { get; } #

Gets the exclusive bottom edge.