- About Graphics Mill
- What's New?
- Breaking Changes in Graphics Mill 12
- Breaking Changes in Graphics Mill 11
- Features
- Supported File Formats
- System Requirements
- Getting Started
- Working with Image Formats
- Transforming Images (Resize, Rotate, Crop)
- Working with Metadata
- Color Management and Color Reduction
- Drawing Text and Graphics
- Color Keying (Green Screen Removal)
- Channels and Pixel Data
- Color and Tone Correction
- Working with Photoshop (PSD) Files
- Image Filters
- Processing Large Images
- Basics of Image Processing
- Troubleshooting
- Class Library Reference
- Aurigma.GraphicsMill Namespace
- Aurigma.GraphicsMill.Codecs Namespace
- Aurigma.GraphicsMill.Codecs.ClippingPath Namespace
- Aurigma.GraphicsMill.Codecs.Psd Namespace
- Aurigma.GraphicsMill.Drawing Namespace
- Aurigma.GraphicsMill.Drawing.Art Namespace
- Aurigma.GraphicsMill.Drawing.Effects Namespace
- Effect Class
- Glow Class
- Shadow Class
- Shadow Members
- Shadow Constructor
- Shadow Constructor
- Shadow Constructor (Single)
- Shadow Constructor (Color)
- Shadow Constructor (Color, Single)
- Shadow Constructor (Single, Single, Single)
- Shadow Constructor (Single, Single, Single, Single)
- Shadow Constructor (Color, Single, Single, Single)
- Shadow Constructor (Color, Single, Single, Single, Single)
- Shadow Methods
- Shadow Properties
- Aurigma.GraphicsMill.Licensing Namespace
- Aurigma.GraphicsMill.Templates Namespace
- Aurigma.GraphicsMill.Transforms Namespace
- Licensing
- End User License Agreement
- Copyright Notices
Shadow Constructor (Color, Single, Single, Single, Single)
Applies to: Graphics Mill 12.1, 6.x-12.x (may differ)
Creates the Shadow effect with the specified color, size, offset, and opacity.
Namespace:
Aurigma.GraphicsMill.Drawing.Effects
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
Syntax
C#
public Shadow(
Color color,
float size,
float offsetX,
float offsetY,
float opacity
)
Parameters
- 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.GetGraphics())
{
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");
}