Search Results for

    Show / Hide Table of Contents

    Class PictureObject

    Represents a Picture object that can display pictures.

    Inheritance
    System.Object
    Base
    ComponentBase
    ReportComponentBase
    PictureObjectBase
    PictureObject
    Implements
    IFRSerializable
    Inherited Members
    PictureObjectBase.Angle
    PictureObjectBase.DataColumn
    PictureObjectBase.Height
    PictureObjectBase.ImageLocation
    PictureObjectBase.ImageSourceExpression
    PictureObjectBase.IsDataColumn
    PictureObjectBase.IsFileLocation
    PictureObjectBase.IsWebLocation
    PictureObjectBase.MaxHeight
    PictureObjectBase.MaxWidth
    PictureObjectBase.Padding
    PictureObjectBase.ShowErrorImage
    PictureObjectBase.SizeMode
    PictureObjectBase.Width
    PictureObjectBase.ImageAlign
    PictureObjectBase.Shape
    PictureObjectBase.CalculateUri()
    PictureObjectBase.Draw(FRPaintEventArgs)
    PictureObjectBase.GetImageAngleTransform(RectangleF, Single, Single, Single, Single, Single, Single, PointF, PointF, PointF)
    PictureObjectBase.MovePointOnAngle(PointF, SizeF, Single)
    PictureObjectBase.RestoreState()
    PictureObjectBase.rotateVector(PointF, Single)
    PictureObjectBase.SaveState()
    PictureObjectBase.UpdateAutoSize()
    PictureObjectBase.GetExpressions()
    ReportComponentBase.BeforePrint
    ReportComponentBase.AfterPrint
    ReportComponentBase.AfterData
    ReportComponentBase.Click
    ReportComponentBase.Exportable
    ReportComponentBase.ExportableExpression
    ReportComponentBase.Border
    ReportComponentBase.Fill
    ReportComponentBase.FillColor
    ReportComponentBase.Bookmark
    ReportComponentBase.Hyperlink
    ReportComponentBase.CanGrow
    ReportComponentBase.CanShrink
    ReportComponentBase.GrowToBottom
    ReportComponentBase.ShiftMode
    ReportComponentBase.Style
    ReportComponentBase.EvenStyle
    ReportComponentBase.HoverStyle
    ReportComponentBase.EvenStylePriority
    ReportComponentBase.PageBreak
    ReportComponentBase.PrintOn
    ReportComponentBase.BeforePrintEvent
    ReportComponentBase.AfterPrintEvent
    ReportComponentBase.AfterDataEvent
    ReportComponentBase.ClickEvent
    ReportComponentBase.FlagSimpleBorder
    ReportComponentBase.FlagUseBorder
    ReportComponentBase.FlagUseFill
    ReportComponentBase.FlagPreviewVisible
    ReportComponentBase.FlagSerializeStyle
    ReportComponentBase.FlagProvidesHyperlinkValue
    ReportComponentBase.IsCompilationNeeded
    ReportComponentBase.Cursor
    ReportComponentBase.MouseMoveEvent
    ReportComponentBase.MouseUpEvent
    ReportComponentBase.MouseDownEvent
    ReportComponentBase.MouseEnterEvent
    ReportComponentBase.MouseLeaveEvent
    ReportComponentBase.ApplyStyle(Style)
    ReportComponentBase.SaveStyle()
    ReportComponentBase.RestoreStyle()
    ReportComponentBase.DrawBackground(FRPaintEventArgs)
    ReportComponentBase.IsVisible(FRPaintEventArgs)
    ReportComponentBase.Validate()
    ReportComponentBase.OnClick(EventArgs)
    ReportComponentBase.OnAfterLoad()
    ReportComponentBase.HasClickListeners()
    ReportComponentBase.ResetData()
    ReportComponentBase.CalcHeight()
    ReportComponentBase.OnBeforePrint(EventArgs)
    ReportComponentBase.OnAfterPrint(EventArgs)
    ReportComponentBase.OnAfterData(EventArgs)
    ComponentBase.AbsBottom
    ComponentBase.AbsBounds
    ComponentBase.AbsLeft
    ComponentBase.AbsRight
    ComponentBase.AbsTop
    ComponentBase.Anchor
    ComponentBase.Bottom
    ComponentBase.Bounds
    ComponentBase.ClientSize
    ComponentBase.Dock
    ComponentBase.GroupIndex
    ComponentBase.Left
    ComponentBase.Right
    ComponentBase.Tag
    ComponentBase.Top
    ComponentBase.Visible
    ComponentBase.VisibleExpression
    ComponentBase.Printable
    ComponentBase.PrintableExpression
    ComponentBase.CalcVisibleExpression(String)
    Base.Name
    Base.Restrictions
    Base.Flags
    Base.Parent
    Base.BaseName
    Base.ClassName
    Base.Report
    Base.Page
    Base.ChildObjects
    Base.AllObjects
    Base.ZOrder
    Base.IsAncestor
    Base.IsDesigning
    Base.IsPrinting
    Base.IsRunning
    Base.OriginalComponent
    Base.Disposed
    Base.SetProp(Base, Base)
    Base.FloatDiff(Single, Single)
    Base.DeserializeSubItems(FRReader)
    Base.ExtractDefaultMacros(String)
    Base.Dispose()
    Base.SetFlags(Flags, Boolean)
    Base.SetReport(Report)
    Base.SetName(String)
    Base.SetParent(Base)
    Base.SetParentCore(Base)
    Base.FindObject(String)
    Base.CreateUniqueName()
    Base.Clear()
    Base.BaseAssign(Base)
    Base.AssignAll(Base)
    Base.HasParent(Base)
    Base.HasFlag(Flags)
    Base.HasRestriction(Restrictions)
    Base.InvokeEvent(String, Object)
    Base.GetCustomScript()
    Base.ExtractMacros()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    Namespace: FastReport
    Assembly: FastReport.Base.dll
    Syntax
    public class PictureObject : PictureObjectBase, IDisposable, IFRSerializable
    Remarks

    The Picture object can display the following kind of pictures:

    • picture that is embedded in the report file. Use the Image property to do this;
    • picture that is stored in the database BLOb field. Use the property to specify the name of data column you want to show;
    • picture that is stored in the local disk file. Use the property to specify the name of the file;
    • picture that is stored in the Web. Use the property to specify the picture's URL.

    Use the property to specify a size mode. The and properties can be used to restrict the image size if SizeMode is set to AutoSize.

    The TransparentColor property can be used to display an image with transparent background. Use the Transparency property if you want to display semi-transparent image.

    Constructors

    PictureObject()

    Initializes a new instance of the PictureObject class with default settings.

    Declaration
    public PictureObject()

    Properties

    Grayscale

    Gets or sets a value indicating that the image should be displayed in grayscale mode.

    Declaration
    public override bool Grayscale { get; set; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    PictureObjectBase.Grayscale

    GrayscaleHash

    Gets or sets a hash of grayscale svg image

    Declaration
    public int GrayscaleHash { get; set; }
    Property Value
    Type Description
    System.Int32

    Image

    Gets or sets the image.

    Declaration
    public virtual Image Image { get; set; }
    Property Value
    Type Description
    Image
    Remarks

    By default, image that you assign to this property is never disposed - you should take care about it. If you want to dispose the image when this PictureObject is disposed, set the ShouldDisposeImage property to true right after you assign an image:

    myPictureObject.Image = new Bitmap("file.bmp");
    myPictureObject.ShouldDisposeImage = true;

    ImageFormat

    Gets or sets the extension of image.

    Declaration
    public virtual ImageFormat ImageFormat { get; set; }
    Property Value
    Type Description
    ImageFormat

    ImageHeight

    Return base size of image, internal use only

    Declaration
    protected override float ImageHeight { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    PictureObjectBase.ImageHeight

    ImageWidth

    Return base size of image, internal use only

    Declaration
    protected override float ImageWidth { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    PictureObjectBase.ImageWidth

    ShouldDisposeImage

    Gets or sets a value indicating that the image stored in the Image property should be disposed when this object is disposed.

    Declaration
    public bool ShouldDisposeImage { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    By default, image assigned to the Image property is never disposed - you should take care about it. If you want to dispose the image when this PictureObject is disposed, set this property to true right after you assign an image to the Image property.

    Tile

    Gets or sets a value indicating that the image should be tiled.

    Declaration
    public bool Tile { get; set; }
    Property Value
    Type Description
    System.Boolean

    Transparency

    Gets or sets the transparency of the PictureObject.

    Declaration
    public float Transparency { get; set; }
    Property Value
    Type Description
    System.Single
    Remarks

    Valid range of values is 0..1. Default value is 0.

    TransparentColor

    Gets or sets the color of the image that will be treated as transparent.

    Declaration
    public Color TransparentColor { get; set; }
    Property Value
    Type Description
    Color

    TransparentImage

    Gets or sets a bitmap transparent image

    Declaration
    public Bitmap TransparentImage { get; set; }
    Property Value
    Type Description
    Bitmap

    Methods

    Assign(Base)

    Copies the contents of another, similar object.

    Declaration
    public override void Assign(Base source)
    Parameters
    Type Name Description
    Base source

    Source object to copy the contents from.

    Overrides
    PictureObjectBase.Assign(Base)
    Remarks

    Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is

    destination.Assign(source);

    which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.

    See Also
    AssignAll(Base)

    Deserialize(FRReader)

    Declaration
    public override void Deserialize(FRReader reader)
    Parameters
    Type Name Description
    FRReader reader
    Overrides
    ReportComponentBase.Deserialize(FRReader)

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    Overrides
    Base.Dispose(Boolean)

    DisposeImage()

    Disposes image

    Declaration
    public void DisposeImage()

    DrawImage(FRPaintEventArgs)

    Draws the image.

    Declaration
    public override void DrawImage(FRPaintEventArgs e)
    Parameters
    Type Name Description
    FRPaintEventArgs e

    Paint event args.

    Overrides
    PictureObjectBase.DrawImage(FRPaintEventArgs)

    DrawImageInternal2(IGraphics, PointF, PointF, PointF)

    Declaration
    protected override void DrawImageInternal2(IGraphics graphics, PointF upperLeft, PointF upperRight, PointF lowerLeft)
    Parameters
    Type Name Description
    IGraphics graphics
    PointF upperLeft
    PointF upperRight
    PointF lowerLeft
    Overrides
    PictureObjectBase.DrawImageInternal2(IGraphics, PointF, PointF, PointF)

    EstablishImageForm(GraphicsPath, Single, Single, Single, Single)

    The shape of the image is set using GraphicsPath

    Declaration
    public void EstablishImageForm(GraphicsPath path, float drawLeft, float drawTop, float drawWidth, float drawHeight)
    Parameters
    Type Name Description
    GraphicsPath path
    System.Single drawLeft
    System.Single drawTop
    System.Single drawWidth
    System.Single drawHeight

    FinalizeComponent()

    Performs a finalization after the report is finished.

    Declaration
    public override void FinalizeComponent()
    Overrides
    ReportComponentBase.FinalizeComponent()
    Remarks

    This method is used by the report engine, do not call it directly.

    ForceLoadImage()

    Forces loading the image from a data column.

    Declaration
    public void ForceLoadImage()
    Remarks

    Call this method in the AfterData event handler to force loading an image into the Image property. Normally, the image is stored internally as byte[] array and never loaded into the Image property, to save the time. The side effect is that you can't analyze the image properties such as width and height. If you need this, call this method before you access the Image property. Note that this will significantly slow down the report.

    GetData()

    Gets the data from a datasource that the object is connected to.

    Declaration
    public override void GetData()
    Overrides
    ReportComponentBase.GetData()
    Remarks

    This method is called by the report engine before processing the object.

    Do not call it directly. You may override it if you are developing a new FastReport component. In this method you should get the data from a datasource that the object is connected to.

    GetDataAsync(CancellationToken)

    Declaration
    public override async Task GetDataAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    ReportComponentBase.GetDataAsync(CancellationToken)

    InitializeComponent()

    Initializes the object before running a report.

    Declaration
    public override void InitializeComponent()
    Overrides
    ReportComponentBase.InitializeComponent()
    Remarks

    This method is used by the report engine, do not call it directly.

    LoadImage()

    Loads image

    Declaration
    public override void LoadImage()
    Overrides
    PictureObjectBase.LoadImage()

    LoadImageAsync(CancellationToken)

    Declaration
    public override async Task LoadImageAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    PictureObjectBase.LoadImageAsync(CancellationToken)

    ResetImageIndex()

    Declaration
    protected override void ResetImageIndex()
    Overrides
    PictureObjectBase.ResetImageIndex()

    Serialize(FRWriter)

    Declaration
    public override void Serialize(FRWriter writer)
    Parameters
    Type Name Description
    FRWriter writer
    Overrides
    PictureObjectBase.Serialize(FRWriter)

    SetImageData(Byte[])

    Sets image data to FImageData

    Declaration
    public void SetImageData(byte[] data)
    Parameters
    Type Name Description
    System.Byte[] data

    Implements

    IFRSerializable
    Back to top © 1998-2025 Copyright Fast Reports Inc.