Table of Contents

Class MediaDeviceDescription

Namespace
iText.StyledXmlParser.Css.Media
Assembly
itext.styledxmlparser.dll

Class that bundles all the values of a media device description.

public class MediaDeviceDescription
Inheritance
MediaDeviceDescription
Inherited Members

Constructors

MediaDeviceDescription(string)

See MediaType class constants for possible values.

public MediaDeviceDescription(string type)

Parameters

type string

a type of the media to use.

MediaDeviceDescription(string, float, float)

Creates a new MediaDeviceDescription instance.

public MediaDeviceDescription(string type, float width, float height)

Parameters

type string

the type

width float

the width

height float

the height

Methods

CreateDefault()

Creates the default MediaDeviceDescription.

public static MediaDeviceDescription CreateDefault()

Returns

MediaDeviceDescription

the media device description

GetBitsPerComponent()

Gets the bits per component.

public virtual int GetBitsPerComponent()

Returns

int

the bits per component

GetColorIndex()

Gets the color index.

public virtual int GetColorIndex()

Returns

int

the color index

GetDefault()

Gets default MediaDeviceDescription instance.

public static MediaDeviceDescription GetDefault()

Returns

MediaDeviceDescription

the default media device description

Remarks

Gets default MediaDeviceDescription instance. Do not modify any fields of the returned media device description because it may lead to unpredictable results. Use CreateDefault() if you want to modify device description.

GetHeight()

Gets the height in points.

public virtual float GetHeight()

Returns

float

the height

GetMonochrome()

Gets the number of bits per pixel on a monochrome (greyscale) device.

public virtual int GetMonochrome()

Returns

int

the number of bits per pixel on a monochrome (greyscale) device

GetOrientation()

Gets the orientation.

public virtual string GetOrientation()

Returns

string

the orientation

GetResolution()

Gets the resolution in DPI.

public virtual float GetResolution()

Returns

float

the resolution

GetScan()

Gets the scan value.

public virtual string GetScan()

Returns

string

the scan value

GetType()

Gets the type.

public virtual string GetType()

Returns

string

the type

GetWidth()

Gets the width in points.

public virtual float GetWidth()

Returns

float

the width

IsGrid()

Checks if the media device is a grid.

public virtual bool IsGrid()

Returns

bool

true, if is grid

SetBitsPerComponent(int)

Sets the bits per component.

public virtual MediaDeviceDescription SetBitsPerComponent(int bitsPerComponent)

Parameters

bitsPerComponent int

the bits per component

Returns

MediaDeviceDescription

the media device description

SetColorIndex(int)

Sets the color index.

public virtual MediaDeviceDescription SetColorIndex(int colorIndex)

Parameters

colorIndex int

the color index

Returns

MediaDeviceDescription

the media device description

SetGrid(bool)

Sets the grid value.

public virtual MediaDeviceDescription SetGrid(bool grid)

Parameters

grid bool

the grid value

Returns

MediaDeviceDescription

the media device description

SetHeight(float)

Sets the height in points.

public virtual MediaDeviceDescription SetHeight(float height)

Parameters

height float

the height

Returns

MediaDeviceDescription

the media device description

SetMonochrome(int)

Sets the number of bits per pixel on a monochrome (greyscale) device.

public virtual MediaDeviceDescription SetMonochrome(int monochrome)

Parameters

monochrome int

the number of bits per pixel on a monochrome (greyscale) device

Returns

MediaDeviceDescription

the media device description

SetOrientation(string)

Sets the orientation.

public virtual MediaDeviceDescription SetOrientation(string orientation)

Parameters

orientation string

the orientation

Returns

MediaDeviceDescription

the media device description

SetResolution(float)

Sets the resolution in DPI.

public virtual MediaDeviceDescription SetResolution(float resolution)

Parameters

resolution float

the resolution

Returns

MediaDeviceDescription

the media device description

SetScan(string)

Sets the scan value.

public virtual MediaDeviceDescription SetScan(string scan)

Parameters

scan string

the scan value

Returns

MediaDeviceDescription

the media device description

SetWidth(float)

Sets the width in points.

public virtual MediaDeviceDescription SetWidth(float width)

Parameters

width float

the width

Returns

MediaDeviceDescription

the media device description