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
stringa type of the media to use.
MediaDeviceDescription(string, float, float)
Creates a new MediaDeviceDescription instance.
public MediaDeviceDescription(string type, float width, float height)
Parameters
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
intthe bits per component
Returns
- MediaDeviceDescription
the media device description
SetColorIndex(int)
Sets the color index.
public virtual MediaDeviceDescription SetColorIndex(int colorIndex)
Parameters
colorIndex
intthe color index
Returns
- MediaDeviceDescription
the media device description
SetGrid(bool)
Sets the grid value.
public virtual MediaDeviceDescription SetGrid(bool grid)
Parameters
grid
boolthe grid value
Returns
- MediaDeviceDescription
the media device description
SetHeight(float)
Sets the height in points.
public virtual MediaDeviceDescription SetHeight(float height)
Parameters
height
floatthe 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
intthe 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
stringthe orientation
Returns
- MediaDeviceDescription
the media device description
SetResolution(float)
Sets the resolution in DPI.
public virtual MediaDeviceDescription SetResolution(float resolution)
Parameters
resolution
floatthe resolution
Returns
- MediaDeviceDescription
the media device description
SetScan(string)
Sets the scan value.
public virtual MediaDeviceDescription SetScan(string scan)
Parameters
scan
stringthe scan value
Returns
- MediaDeviceDescription
the media device description
SetWidth(float)
Sets the width in points.
public virtual MediaDeviceDescription SetWidth(float width)
Parameters
width
floatthe width
Returns
- MediaDeviceDescription
the media device description