Class PictureObjectBase
the base class for all picture objects
Implements
Inherited Members
Namespace: FastReport
Assembly: FastReport.Base.dll
Syntax
public abstract class PictureObjectBase : ReportComponentBase, IFRSerializable
Constructors
PictureObjectBase()
Declaration
public PictureObjectBase()
Properties
Angle
Gets or sets the image rotation angle, in degrees. Possible values are 0, 90, 180, 270.
Declaration
public int Angle { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
DataColumn
Gets or sets the data column name to get the image from.
Declaration
public string DataColumn { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Grayscale
Gets or sets a value indicating that the image should be displayed in grayscale mode.
Declaration
public virtual bool Grayscale { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Height
Declaration
public override float Height { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
ImageAlign
Gets or sets the alignment of a image in the border.
Declaration
public ImageAlign ImageAlign { get; set; }
Property Value
Type | Description |
---|---|
ImageAlign |
ImageHeight
Return base size of image, internal use only
Declaration
protected abstract float ImageHeight { get; }
Property Value
Type | Description |
---|---|
System.Single |
ImageLocation
Gets or sets the path for the image to display in the PictureObject.
Declaration
public string ImageLocation { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This property may contain the path to the image file as well as external URL.
ImageSourceExpression
Gets or sets the expression that determines the source for the image to display in the PictureObject.
Declaration
public string ImageSourceExpression { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
The result of the expression should be data column name or path to the image file. The data column name will be saved to the DataColumn property. The path will be savetd to the ImageLocation property.
ImageWidth
Return base size of image, internal use only
Declaration
protected abstract float ImageWidth { get; }
Property Value
Type | Description |
---|---|
System.Single |
IsDataColumn
Gets a value indicating that the image stored in the databases column
Declaration
public bool IsDataColumn { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFileLocation
Gets a value indicating that the image stored in the separate file
Declaration
public bool IsFileLocation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsWebLocation
Gets a value indicating that the image stored in the Web
Declaration
public bool IsWebLocation { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MaxHeight
Gets or sets the maximum height of a Picture object, in pixels.
Declaration
public float MaxHeight { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Use this property to restrict the object size if the SizeMode property is set to AutoSize.
MaxWidth
Gets or sets the maximum width of a Picture object, in pixels.
Declaration
public float MaxWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Remarks
Use this property to restrict the object size if the SizeMode property is set to AutoSize.
Padding
Gets or sets padding within the PictureObject.
Declaration
public Padding Padding { get; set; }
Property Value
Type | Description |
---|---|
Padding |
Shape
Gets or sets a shape kind.
Declaration
public ShapeKind Shape { get; set; }
Property Value
Type | Description |
---|---|
ShapeKind |
ShowErrorImage
Gets or sets a value indicating whether the PictureObject should display the error indicator if there is no image in it.
Declaration
public bool ShowErrorImage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SizeMode
Gets or sets a value that specifies how an image is positioned within a PictureObject.
Declaration
public virtual PictureBoxSizeMode SizeMode { get; set; }
Property Value
Type | Description |
---|---|
PictureBoxSizeMode |
Width
Declaration
public override float Width { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Overrides
Methods
Assign(Base)
Declaration
public override void Assign(Base source)
Parameters
Type | Name | Description |
---|---|---|
Base | source |
Overrides
CalculateUri()
Calculates URI from ImageLocation
Declaration
public Uri CalculateUri()
Returns
Type | Description |
---|---|
Uri |
Draw(FRPaintEventArgs)
Declaration
public override void Draw(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e |
Overrides
DrawImage(FRPaintEventArgs)
Declaration
public abstract void DrawImage(FRPaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FRPaintEventArgs | e |
DrawImageInternal2(IGraphics, PointF, PointF, PointF)
Declaration
protected abstract void DrawImageInternal2(IGraphics graphics, PointF upperLeft, PointF upperRight, PointF lowerLeft)
Parameters
Type | Name | Description |
---|---|---|
IGraphics | graphics | |
PointF | upperLeft | |
PointF | upperRight | |
PointF | lowerLeft |
GetExpressions()
Declaration
public override string[] GetExpressions()
Returns
Type | Description |
---|---|
System.String[] |
Overrides
GetImageAngleTransform(RectangleF, Single, Single, Single, Single, Single, Single, out PointF, out PointF, out PointF)
gets points for transform this image
Declaration
public void GetImageAngleTransform(RectangleF drawRect, float imageWidth, float imageHeight, float scaleX, float scaleY, float offsetX, float offsetY, out PointF upperLeft, out PointF upperRight, out PointF lowerLeft)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | drawRect | the box where to draw image |
System.Single | imageWidth | image width |
System.Single | imageHeight | image height |
System.Single | scaleX | scale horizontal |
System.Single | scaleY | scale vertical |
System.Single | offsetX | offset of left |
System.Single | offsetY | offset of top |
PointF | upperLeft | out start of vectors |
PointF | upperRight | out end of frist vector |
PointF | lowerLeft | out end of second vector |
LoadImage()
Loads image
Declaration
public abstract void LoadImage()
MovePointOnAngle(PointF, SizeF, Single)
Moves the point on specified angle
Declaration
public PointF MovePointOnAngle(PointF p, SizeF size, float fangle)
Parameters
Type | Name | Description |
---|---|---|
PointF | p | |
SizeF | size | |
System.Single | fangle |
Returns
Type | Description |
---|---|
PointF |
ResetImageIndex()
Reset index of image
Declaration
protected abstract void ResetImageIndex()
RestoreState()
Declaration
public override void RestoreState()
Overrides
rotateVector(PointF, Single)
Rotates vector on specified angle
Declaration
public PointF rotateVector(PointF p, float fangle)
Parameters
Type | Name | Description |
---|---|---|
PointF | p | |
System.Single | fangle |
Returns
Type | Description |
---|---|
PointF |
SaveState()
Declaration
public override void SaveState()
Overrides
Serialize(FRWriter)
Declaration
public override void Serialize(FRWriter writer)
Parameters
Type | Name | Description |
---|---|---|
FRWriter | writer |
Overrides
UpdateAutoSize()
When auto size was updated, internal use only
Declaration
protected void UpdateAutoSize()