Back to top OpenSVG (c) Veridict AB, www.veridict.com
Edit this page

Class DrawConfig

Record used to configure drawing parameters for an SVG shape.

Inheritance
object
DrawConfig
Implements
IEquatable<DrawConfig>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OpenSvg.Config
Assembly: OpenSvg.dll
Syntax
public record DrawConfig : IEquatable<DrawConfig>
Remarks

Provides properties to set the fill color, stroke color, and stroke width for SVG shapes.

Constructors

| Edit this page View Source

DrawConfig()

Declaration
public DrawConfig()
| Edit this page View Source

DrawConfig(SKColor, SKColor, float)

Record used to configure drawing parameters for an SVG shape.

Declaration
public DrawConfig(SKColor FillColor, SKColor StrokeColor, float StrokeWidth)
Parameters
Type Name Description
SKColor FillColor
SKColor StrokeColor
float StrokeWidth
Remarks

Provides properties to set the fill color, stroke color, and stroke width for SVG shapes.

Properties

| Edit this page View Source

DefaultFillColor

Declaration
public static SKColor DefaultFillColor { get; }
Property Value
Type Description
SKColor
| Edit this page View Source

DefaultStrokeColor

Declaration
public static SKColor DefaultStrokeColor { get; }
Property Value
Type Description
SKColor
| Edit this page View Source

DefaultStrokeWidth

Declaration
public static float DefaultStrokeWidth { get; }
Property Value
Type Description
float
| Edit this page View Source

FillColor

Declaration
public SKColor FillColor { get; init; }
Property Value
Type Description
SKColor
| Edit this page View Source

StrokeColor

Declaration
public SKColor StrokeColor { get; init; }
Property Value
Type Description
SKColor
| Edit this page View Source

StrokeWidth

Declaration
public float StrokeWidth { get; init; }
Property Value
Type Description
float
| Edit this page View Source

Transparent

Gets a transparent DrawConfig instance. One use-case is for creating invisible spaces between shapes.

Declaration
public static DrawConfig Transparent { get; }
Property Value
Type Description
DrawConfig

Methods

| Edit this page View Source

WithFillColor(SKColor)

Returns a new copy of the DrawConfig record with the specified fill color.

Declaration
public DrawConfig WithFillColor(SKColor fillColor)
Parameters
Type Name Description
SKColor fillColor

The new fill color to set.

Returns
Type Description
DrawConfig

A new DrawConfig with the specified fill color.

| Edit this page View Source

WithStrokeColor(SKColor)

Returns a new copy of the DrawConfig record with the specified stroke color.

Declaration
public DrawConfig WithStrokeColor(SKColor strokeColor)
Parameters
Type Name Description
SKColor strokeColor

The new stroke color to set.

Returns
Type Description
DrawConfig

A new DrawConfig with the specified stroke color.

| Edit this page View Source

WithStrokeWidth(float)

Returns a new copy of the DrawConfig record with the specified stroke width.

Declaration
public DrawConfig WithStrokeWidth(float strokeWidth)
Parameters
Type Name Description
float strokeWidth

The new stroke width to set.

Returns
Type Description
DrawConfig

A new DrawConfig with the specified stroke width.

Implements

IEquatable<T>