[]
Gets the position of the shadow line.
public void GetShadowLinePosition(BorderEdges borderEdges, RectangleF borderRect, float pageScale, out PointF shadowStart, out PointF shadowEnd)
Type | Name | Description |
---|---|---|
BorderEdges | borderEdges | The border edges. |
RectangleF | borderRect | The rectangle area of the border. |
float | pageScale | The page scale. |
PointF | shadowStart | Output parameter of the beginning of the shadow. |
PointF | shadowEnd | Output parameter of the ending of the shadow. |
public void DrawShadow(Border border, float pageScale, RectangleF borderRect)
{
using (var pen = new Pen(Brushes.Black, Border.ShadowLineWidth / pageScale))
{
pen.SetLineCap(LineCap.Square, LineCap.Square, DashCap.Flat);
// Right Shadow
border.GetShadowLinePosition(BorderEdges.Right, borderRect, pageScale, out var shadowStart, out var shadowEnd);
DrawLine(pen, shadowStart, shadowEnd);
// Bottom Shadow
border.GetShadowLinePosition(BorderEdges.Bottom, borderRect, pageScale, out shadowStart, out shadowEnd);
DrawLine(pen, shadowStart, shadowEnd);
}
}