Search Results for

    Show / Hide Table of Contents

    Class Drawing.NoAA

    A specialized class the deals with drawing graphics without anti-aliasing. It deals with two issues:

    • Lines in ImageSharp are drawn on the centre pixel. Without AA they're drawn a pixel off. This class draws all lines with +0.0,+0.5 coordinates. See https://github.com/SixLabors/ImageSharp.Drawing/issues/28
    • It also applies the NoAntiAliasing profile by default to all operations.
    Inheritance
    Object
    Drawing.NoAA
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Acoustics.Shared.ImageSharp
    Assembly: Acoustics.Shared.dll
    Syntax
    public class NoAA

    Constructors

    | Improve this Doc View Source

    NoAA(IImageProcessingContext)

    Declaration
    public NoAA(IImageProcessingContext context)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Processing.IImageProcessingContext context

    Fields

    | Improve this Doc View Source

    Bug28Offset

    Defines behaviour for where to draw stroke relative to the true real line defined by a path.

    Declaration
    public static readonly PointF Bug28Offset
    Field Value
    Type Description
    SixLabors.ImageSharp.PointF

    Methods

    | Improve this Doc View Source

    DrawBorderInset(Pen, RectangleF)

    Draws a border line on the inside perimiter of rectangle. ImageSharp by default draws lines split either side of the imaginary center line.

    Declaration
    public void DrawBorderInset(Pen border, RectangleF rectangle)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.Pen border
    SixLabors.ImageSharp.RectangleF rectangle
    Remarks

    ImageSharp's Draw Rectangle is unpredictable and buggy, especially for non-antialiased operations. See Acoustics.Test.Shared.Drawing.RectangleCornerBugTest. This method instead draws four lines as the border. // AT 2020-11: Update bug seems to be fixed.

    | Improve this Doc View Source

    DrawLine(IPen, Int32, Int32, Int32, Int32)

    Declaration
    public void DrawLine(IPen pen, int x1, int y1, int x2, int y2)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.IPen pen
    Int32 x1
    Int32 y1
    Int32 x2
    Int32 y2
    | Improve this Doc View Source

    DrawLines(Color, Single, PointF[])

    Declaration
    public void DrawLines(Color color, float thickness, params PointF[] points)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Color color
    Single thickness
    SixLabors.ImageSharp.PointF[] points
    | Improve this Doc View Source

    DrawLines(IPen, PointF[])

    Declaration
    public void DrawLines(IPen pen, params PointF[] points)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.IPen pen
    SixLabors.ImageSharp.PointF[] points
    | Improve this Doc View Source

    DrawRectangle(Color, Int32, Int32, Int32, Int32, Single)

    Draws a thickness thick (1px by default) bordered rectangle with no fill with anti-aliasing disabled.

    Declaration
    public void DrawRectangle(Color color, int x1, int y1, int x2, int y2, float thickness = 1F)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Color color
    Int32 x1
    Int32 y1
    Int32 x2
    Int32 y2
    Single thickness
    | Improve this Doc View Source

    DrawRectangle(Pen, RectangleF)

    Declaration
    public void DrawRectangle(Pen border, RectangleF rectangle)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.Pen border
    SixLabors.ImageSharp.RectangleF rectangle
    | Improve this Doc View Source

    DrawRectangle(Pen, Int32, Int32, Int32, Int32)

    Declaration
    public void DrawRectangle(Pen pen, int x1, int y1, int x2, int y2)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.Pen pen
    Int32 x1
    Int32 y1
    Int32 x2
    Int32 y2
    | Improve this Doc View Source

    FillRectangle(IBrush, Int32, Int32, Int32, Int32)

    Declaration
    public void FillRectangle(IBrush brush, int x1, int y1, int x2, int y2)
    Parameters
    Type Name Description
    SixLabors.ImageSharp.Drawing.Processing.IBrush brush
    Int32 x1
    Int32 y1
    Int32 x2
    Int32 y2

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top