Shadow Constructor (Color, Single, Single, Single, Single)

Creates the Shadow effect with the specified color, size, offset, and opacity.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing.Effects
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public Shadow(
	Color color,
	float size,
	float offsetX,
	float offsetY,
	float opacity
)

Parameters

color

Type: Aurigma.GraphicsMill.Color

The color of the shadow.
size

Type: System.Single

The size of the shadow in points.
offsetX

Type: System.Single

The x-coordinate of the offset of the shadow in points.
offsetY

Type: System.Single

The y-coordinate of the offset of the shadow in points.
opacity

Type: System.Single

The opacity of the shadow.

Examples

C#
using (var bitmap = new Bitmap(230, 90, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    using (var shadowingText = new PlainText("Shadowing Text", graphics.CreateFont("Comic", 28)))
    {
        shadowingText.Position = new System.Drawing.PointF(10, 30);
        shadowingText.Brush = new SolidBrush(RgbColor.Blue);
        shadowingText.Effect = new Shadow(RgbColor.Black, 5, 1, 1, 0.9f);
        graphics.DrawText(shadowingText);
    }
    using (var glowingText = new PlainText("Glowing Text", graphics.CreateFont("Comic", 28)))
    {
        glowingText.Position = new System.Drawing.PointF(10, 70);
        glowingText.Pen = new Pen(RgbColor.Blue);
        glowingText.Effect = new Glow(RgbColor.Black, 5, 0.5f);
        graphics.DrawText(glowingText);
    }
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference