corelibraries-devexpress-dot-xtraprinting-dot-ibrickgraphics-dot-drawbrick-x28-devexpress-dot-xtraprinting-dot-ibrick-system-dot-drawing-dot-rectanglef-x29.md
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
IBrick DrawBrick(
IBrick brick,
RectangleF rect
)
Function DrawBrick(
brick As IBrick,
rect As RectangleF
) As IBrick
| Name | Type | Description |
|---|---|---|
| brick | IBrick |
The brick to be added to a report.
| | rect | RectangleF |
A RectangleF structure that specifies the location and size of the current brick.
|
| Type | Description |
|---|---|
| IBrick |
The brick added to a report.
|
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.
WinControlImageType_Utils.Bitmap);
graph.DrawBrick(new ImageBrick() {
Image = bitmap,
reporting-winforms-custom-brick/CS/Form1.cs#L37
// 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
if (ib != null)
graph.DrawBrick(ib, ib.Rect);
}
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
' 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
If ib IsNot Nothing Then
graph.DrawBrick(ib, ib.Rect)
End If
See Also