Skip to main content
All docs
V25.1
  • BrickGraphics.DrawPageImage(DXImage, RectangleF, BorderSide, Color) Method

    Adds a specific PageImageBrick to a report.

    Namespace: DevExpress.XtraPrinting

    Assembly: DevExpress.Printing.v25.1.Core.dll

    NuGet Package: DevExpress.Printing.Core

    Declaration

    public PageImageBrick DrawPageImage(
        DXImage image,
        RectangleF rect,
        BorderSide sides,
        Color backColor
    )

    Parameters

    Name Type Description
    image DXImage

    The image to draw in a specific brick.

    rect RectangleF

    The RectangleF structure that specifies the location and size of the current brick in measurement units, specified via the BrickGraphics.PageUnit property value.

    sides BorderSide

    Border settings for a specific PageImageBrick.

    backColor Color

    The color to be displayed in the transparent portions of an image.

    Returns

    Type Description
    PageImageBrick

    The PageImageBrick added to a report.

    Remarks

    This method adds a specific PageImageBrick. The brick’s position in a report is defined via the rect parameter. This parameter also determines the size of the image displayed within a brick. If the dimensions of the specified rectanlge and actual brick image dimensions are different, the image is stretched or shrunk to fit inside the specified rectangle. To prevent this, the rect dimensions must exactly match the image dimensions. If the image has transparent areas, then these areas are filled with the color specified via backColor. If backColor is set to Color.Empty, the color used to fill transparent areas is defined via the BrickGraphics.BackColor property value.

    The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DrawPageImage(DXImage, RectangleF, BorderSide, Color) method.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also