[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.ImageAlign

Class ImageAlign

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

Represents the alignment of an image within its container.

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

Constructors

ImageAlign()

Initializes a new instance of the ImageAlign class.

public ImageAlign()

ImageAlign(ImageAlignHorz, ImageAlignVert, bool, bool, bool, bool, bool)

Initializes a new instance of the ImageAlign class.

public ImageAlign(ImageAlignHorz alignHorz, ImageAlignVert alignVert, bool stretchHorz, bool stretchVert, bool keepAspectRatio, bool tileHorz, bool tileVert)

Parameters

alignHorz ImageAlignHorz

A value assigned to AlignHorz.

alignVert ImageAlignVert

A value assigned to AlignVert.

stretchHorz bool

A value assigned to StretchHorz.

stretchVert bool

A value assigned to StretchVert.

keepAspectRatio bool

A value assigned to KeepAspectRatio.

tileHorz bool

A value assigned to TileHorz.

tileVert bool

A value assigned to TileVert.

Fields

CenterImage

Gets the image alignment that centers an image.

public static readonly ImageAlign CenterImage

Field Value

ImageAlign

Default

Gets the default image alignment.

public static readonly ImageAlign Default

Field Value

ImageAlign

ScaleImage

Gets the image alignment that scales an image.

public static readonly ImageAlign ScaleImage

Field Value

ImageAlign

StretchImage

Gets the image alignment that stretches an image.

public static readonly ImageAlign StretchImage

Field Value

ImageAlign

Properties

AlignHorz

Gets or sets the horizontal alignment of an image within a container.

public ImageAlignHorz AlignHorz { get; set; }

Property Value

ImageAlignHorz

AlignVert

Gets or sets the vertical alignment of an image within a container.

public ImageAlignVert AlignVert { get; set; }

Property Value

ImageAlignVert

BestFit

Gets or sets a value indicating whether an image should be resized to best fit within its container. See remarks for details.

public bool BestFit { get; set; }

Property Value

bool

Remarks

Getting this property returns a Boolean conjunction (AND) of the StretchHorz, StretchVert and KeepAspectRatio values.

Setting this property to a true value sets StretchHorz, StretchVert and KeepAspectRatio to true.

Setting this property to a false value sets KeepAspectRatio only to false.

KeepAspectRatio

Gets or sets a value indicating whether the original aspect ratio is preserved when rendering an image. Used when StretchHorz or StretchVert is true.

public bool KeepAspectRatio { get; set; }

Property Value

bool

StretchHorz

Gets or sets a value indicating whether an image is stretched horizontally to fill its container.

public bool StretchHorz { get; set; }

Property Value

bool

StretchVert

Gets or sets a value indicating whether an image is stretched vertically to fill its container.

public bool StretchVert { get; set; }

Property Value

bool

TileHorz

Gets or sets a value indicating whether an image is tiled horizontally within its container. Ignored if StretchHorz is true.

public bool TileHorz { get; set; }

Property Value

bool

TileVert

Gets or sets a value indicating whether an image is tiled vertically within its container. Ignored if StretchVert is true.

public bool TileVert { get; set; }

Property Value

bool

Methods

ToString()

Returns a string that represents the current ImageAlign.

public override string ToString()

Returns

string

A string that represents the current ImageAlign.