Class PaintBuilder

Class PaintBuilder

Namespace: Aspose.Svg.Builder
Assembly: Aspose.SVG.dll (25.5.0)

A builder class for creating paint values for SVG elements.

[ComVisible(true)]
public class PaintBuilder

Inheritance

object PaintBuilder

Inherited Members

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

PaintBuilder()

public PaintBuilder()

Methods

Build()

Builds the final paint value.

public string Build()

Returns

string

A string representing the paint value.

Color(Color)

Sets the paint to a specific color.

public PaintBuilder Color(Color colorValue)

Parameters

colorValue Color

The color to set.

Returns

PaintBuilder

The builder instance for chaining.

ContextFill()

Sets the paint to ‘context-fill’, which uses the current fill color of the context.

public PaintBuilder ContextFill()

Returns

PaintBuilder

The builder instance for chaining.

ContextStroke()

Sets the paint to ‘context-stroke’, which uses the current stroke color of the context.

public PaintBuilder ContextStroke()

Returns

PaintBuilder

The builder instance for chaining.

None()

Sets the paint to ’none’.

public PaintBuilder None()

Returns

PaintBuilder

The builder instance for chaining.

PaintServerId(string, Color?)

Sets the paint to a paint server (like a gradient or pattern) with an optional fallback color.

public PaintBuilder PaintServerId(string paintServerId, Color? fallbackColor = null)

Parameters

paintServerId string

The ID of the paint server.

fallbackColor Color ?

Optional fallback color if the paint server is not available.

Returns

PaintBuilder

The builder instance for chaining.

 English