[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Border.GetShadowLinePosition

GetShadowLinePosition Method

GetShadowLinePosition(BorderEdges, RectangleF, float, out PointF, out PointF)

Gets the position of the shadow line.

Declaration
public void GetShadowLinePosition(BorderEdges borderEdges, RectangleF borderRect, float pageScale, out PointF shadowStart, out PointF shadowEnd)
Parameters
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.

Examples
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);
	}
}