Class PdfImage
Represents the base class for images.
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public abstract class PdfImage : PdfShapeElement, IPdfWrapper
Constructors
PdfImage()
Declaration
protected PdfImage()
Properties
Height
Declaration
public virtual int Height { get; }
Property Value
Type |
---|
System.Int32 |
HorizontalResolution
Declaration
public virtual float HorizontalResolution { get; }
Property Value
Type |
---|
System.Single |
PhysicalDimension
Declaration
public virtual SizeF PhysicalDimension { get; }
Property Value
Type |
---|
System.Drawing.SizeF |
VerticalResolution
Declaration
public virtual float VerticalResolution { get; }
Property Value
Type |
---|
System.Single |
Width
Declaration
public virtual int Width { get; }
Property Value
Type |
---|
System.Int32 |
Methods
FromStream(Stream)
Creates PdfImage from stream.
Declaration
public static PdfImage FromStream(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream. |
Returns
Type | Description |
---|---|
PdfImage | Returns a created PdfImage object. |
GetPixelSize(Single, Single)
Calculates the width and height of the image.
Declaration
protected static SizeF GetPixelSize(float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Width of the image in points. |
System.Single | height | Height of the image in points. |
Returns
Type | Description |
---|---|
System.Drawing.SizeF | Calculates the width and height of the image. |
GetPointSize(Single, Single)
Calculates size of the image in points.
Declaration
protected SizeF GetPointSize(float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Width in pixels. |
System.Single | height | Height in pixels. |
Returns
Type | Description |
---|---|
System.Drawing.SizeF | size of the image in points. |
GetPointSize(Single, Single, Single, Single)
Calculates size of the image in points.
Declaration
protected SizeF GetPointSize(float width, float height, float horizontalResolution, float verticalResolution)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Width in pixels. |
System.Single | height | Height in pixels. |
System.Single | horizontalResolution | Horizontal resolution. |
System.Single | verticalResolution | Vertical resolution. |
Returns
Type | Description |
---|---|
System.Drawing.SizeF | size of the image in points. |
SetResolution(Single, Single)
Sets resolution of the image.
Declaration
protected void SetResolution(float horizontalResolution, float verticalResolution)
Parameters
Type | Name | Description |
---|---|---|
System.Single | horizontalResolution | Horizontal resolution of the image. |
System.Single | verticalResolution | Vertical resolution of the image. |
Explicit Interface Implementations
IPdfWrapper.Element
Gets the wrapped element.
Declaration
IPdfPrimitive IPdfWrapper.Element { get; }
Returns
Type |
---|
IPdfPrimitive |