EpsWriter.AlphaThreshold Property

Gets or sets an alpha threshold for this EpsWriter.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public float AlphaThreshold { get; set; }

Property Value

An alpha threshold for this EpsWriter.

Remarks

An image, drawn on the EPS document, may have the alpha channel specifying an opacity degree for each pixel. However, the EPS format cannot handle semi-transparency, that is, each pixel on EPS images can be displayed with full opacity or fully transparent. EpsWriter allows you to specify a threshold for transparency. Alpha threshold values are accepted in the range [0, 1]. If a pixel alpha value is greater than the threshold value, the pixel will be fully opaque; otherwise, it will be fully transparent.

Examples

C#
using (var bitmap = new Bitmap(200, 151, PixelFormat.Format32bppArgb, new RgbColor(255, 255, 255, 20)))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    graphics.DrawImage(new Bitmap(@"Images\RgbImage.jpg"), new System.Drawing.RectangleF(8, 8, 184, 136));
    //Draw a rectangle with transparency.
    var pen = new Pen(new RgbColor(0, 88, 0, 150), 8);
    graphics.DrawRectangle(pen, 4, 4, 192, 143);

    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual