Class ImageItem
Represents an image, picture or graphic item.
Inherited Members
Namespace: Neodynamic.SDK.Printing
Assembly: cs.temp.dll.dll
Syntax
public class ImageItem : Item, IXmlTemplate, INotifyPropertyChanged
Constructors
ImageItem()
Initializes a new instance of the ImageItem class.
Declaration
public ImageItem()
ImageItem(Double, Double)
Initializes a new instance of the ImageItem class with the specified location.
Declaration
public ImageItem(double x, double y)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x | The x-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. |
System.Double | y | The y-coordinate of the upper-left corner of the item relative to the upper-left corner of its container. |
Properties
ConvertToMonochrome
Gets or sets whether the pixels composing the source image must be converted to monochrome. Default is true.
Declaration
public bool ConvertToMonochrome { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
To render and print color images, set ConvertToMonochrome to False.
When printing to thermal printers the monochrome conversion will take place always.
Flip
Gets or sets the axis used for flipping. Default value is None
Declaration
public Flip Flip { get; set; }
Property Value
Type | Description |
---|---|
Flip |
Height
Gets or sets the height of the image item. Default value is 0 (zero)
Declaration
public double Height { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
HideIfNotFound
Gets or sets whether the Image is not displayed or printed if it's not found. Default value is false
Declaration
public bool HideIfNotFound { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGrayscaleOrBlackWhite
Gets or sets whether the pixels composing the source image are grayscale or black and white based. Default is false.
Declaration
public bool IsGrayscaleOrBlackWhite { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LockAspectRatio
Gets or sets how source image's proportions are maintained if it is resized. Default value is None
Declaration
public LockAspectRatio LockAspectRatio { get; set; }
Property Value
Type | Description |
---|---|
LockAspectRatio |
MonochromeSettings
Gets the monochrome settings for Black/White conversion. Default value is OtsuThreshold
Declaration
public MonochromeSettings MonochromeSettings { get; }
Property Value
Type | Description |
---|---|
MonochromeSettings |
NameAtPrinterStorage
Gets or sets the name of this ImageItem object available in the Printer's internal storage.
Declaration
public string NameAtPrinterStorage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
RotationAngle
Gets or sets the rotation angle to apply on the source image. It is measured clockwise from the x-axis. Default value is 0 (zero)
Declaration
public int RotationAngle { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SourceBase64
Gets or sets the Base64 string of the image content. Default value is an empty string
Declaration
public string SourceBase64 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SourceBinary
Gets or sets the binary content of the image. Default value is Null
Declaration
public byte[] SourceBinary { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] |
SourceDpi
Gets or sets the DPI resolution of the source image. Default value is 96
Declaration
public int SourceDpi { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SourceFile
Gets or sets the image file path or URL. Default value is an empty string
Declaration
public string SourceFile { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Width
Gets or sets the width of the image item. Default value is 0 (zero)
Declaration
public double Width { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
Clone()
Creates a copy of the current ImageItem.
Declaration
public override Item Clone()
Returns
Type | Description |
---|---|
Item | A copy of the current ImageItem. |
Overrides
ConvertToUnit(UnitType)
Declaration
public override void ConvertToUnit(UnitType unit)
Parameters
Type | Name | Description |
---|---|---|
UnitType | unit |
Overrides
UpdateFrom(Item)
Declaration
public override void UpdateFrom(Item item)
Parameters
Type | Name | Description |
---|---|---|
Item | item | The ImageItem object that is used for updating this ImageItem object. |