Back to Devexpress

IBrickGraphics.DrawBrick(IBrick, RectangleF) Method

corelibraries-devexpress-dot-xtraprinting-dot-ibrickgraphics-dot-drawbrick-x28-devexpress-dot-xtraprinting-dot-ibrick-system-dot-drawing-dot-rectanglef-x29.md

latest4.9 KB
Original Source

IBrickGraphics.DrawBrick(IBrick, RectangleF) Method

If implemented by a class, adds a brick to a report.

Namespace : DevExpress.XtraPrinting

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

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
IBrick DrawBrick(
    IBrick brick,
    RectangleF rect
)
vb
Function DrawBrick(
    brick As IBrick,
    rect As RectangleF
) As IBrick

Parameters

NameTypeDescription
brickIBrick

The brick to be added to a report.

| | rect | RectangleF |

A RectangleF structure that specifies the location and size of the current brick.

|

Returns

TypeDescription
IBrick

The brick added to a report.

|

Remarks

Measurement units of the rect region are specified by the class that implements the IBrickGraphics interface.

For instance, by default the BrickGraphics class uses pixels as measurement units. But you can change this using the BrickGraphics.PageUnit property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DrawBrick(IBrick, RectangleF) 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.

winforms-dashboard-print-and-export-visual-representation-as-is/CS/DashboardExport/DashboardExporter.cs#L86

csharp
WinControlImageType_Utils.Bitmap);
graph.DrawBrick(new ImageBrick() {
        Image = bitmap,

reporting-winforms-custom-brick/CS/Form1.cs#L37

csharp
// Add the brick with specified dimensions to the document.
graph.DrawBrick(brick, new RectangleF(0, 0, 150, 100));
printingSystem1.End();

winforms-grid-print-custom-draw-content/CS/MyXtraGrid/MyGridView/MyGridViewPrintInfo.cs#L45

csharp
if (ib != null)
        graph.DrawBrick(ib, ib.Rect);
}

winforms-dashboard-print-and-export-visual-representation-as-is/VB/DashboardExport/DashboardExporter.vb#L85

vb
Dim bitmap As Image = XRControlPaint.GetControlImage(viewer, WinControlDrawMethod_Utils.UseWMPrintRecursive, WinControlImageType_Utils.Bitmap)
    graph.DrawBrick(New ImageBrick() With {.Image = bitmap, .SizeMode = ImageSizeMode.CenterImage}, New Rectangle(0, 0, width, height))
End Sub

reporting-winforms-custom-brick/VB/Form1.vb#L39

vb
' Add the brick with specified dimensions to the document.
graph.DrawBrick(brick, New RectangleF(0, 0, 150, 100))
printingSystem1.End()

winforms-grid-print-custom-draw-content/VB/MyXtraGrid/MyGridView/MyGridViewPrintInfo.vb#L45

vb
If ib IsNot Nothing Then
    graph.DrawBrick(ib, ib.Rect)
End If

See Also

IBrickGraphics Interface

IBrickGraphics Members

DevExpress.XtraPrinting Namespace