-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRoundLabelBrickExporter.cs
More file actions
27 lines (25 loc) · 1.12 KB
/
RoundLabelBrickExporter.cs
File metadata and controls
27 lines (25 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using DevExpress.Drawing;
using DevExpress.XtraPrinting;
using DevExpress.XtraPrinting.BrickExporters;
using DevExpress.XtraReports.CustomControls;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace CustomControls.RoundBordersControls {
public class RoundLabelBrickExporter : LabelBrickExporter {
RoundLabelBrick RoundedBrick { get { return Brick as RoundLabelBrick; } }
protected override void DrawBackground(IGraphics gr, RectangleF rect) {
if(RoundedBrick.BorderCornerRadius > 0) {
DXSmoothingMode oldSmoothingMode = gr.SmoothingMode;
try {
gr.SmoothingMode = DXSmoothingMode.AntiAlias;
RoundedBorderPaintHelper.DrawRoundedBackGround(gr, rect, Style, BrickPaint, RoundedBrick.BorderCornerRadius);
RoundedBorderPaintHelper.DrawRoundedBorders(gr, rect, Style, BrickPaint, RoundedBrick.BorderCornerRadius);
} finally {
gr.SmoothingMode = oldSmoothingMode;
}
return;
}
base.DrawBackground(gr, rect);
}
}
}