Optional preview options when rendering an AutoCAD hatch gradient to SVG.

interface AcDbPatGradientPreviewOptions {
    angle?: number;
    background?: string;
    endColor?: AcDbPatGradientColor;
    height?: number;
    oneColorMode?: boolean;
    shadeTintValue?: number;
    shift?: number;
    startColor?: AcDbPatGradientColor;
    width?: number;
}

Properties

angle?: number

Gradient angle in radians, matching AcDbHatch.gradientAngle.

background?: string

Background fill color shown behind the gradient rectangle.

Second gradient color.

A number is treated as packed RGB (0xRRGGBB). A string is emitted as a CSS color value.

height?: number

SVG viewport height in pixels.

oneColorMode?: boolean

Whether the gradient uses one base color plus a shade/tint variant.

shadeTintValue?: number

Shade/tint value used in one-color mode. 0 maps to black, 0.5 keeps the base color, and 1 maps to white.

shift?: number

Relative shift applied to the gradient focus or midpoint.

First gradient color.

A number is treated as packed RGB (0xRRGGBB). A string is emitted as a CSS color value.

width?: number

SVG viewport width in pixels.