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
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
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
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
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
The builder instance for chaining.
None()
Sets the paint to ’none’.
public PaintBuilder None()
Returns
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
The builder instance for chaining.