skia
    Preparing search index...

    Interface Paint

    See SkPaint.h for more information on this class.

    interface Paint {
        _type: "Paint";
        copy(): Paint;
        delete(): void;
        deleteLater(): void;
        getColor(): Color;
        getStrokeCap(): EmbindEnumEntity;
        getStrokeJoin(): EmbindEnumEntity;
        getStrokeMiter(): number;
        getStrokeWidth(): number;
        isAliasOf(other: any): boolean;
        isDeleted(): boolean;
        setAlphaf(alpha: number): void;
        setAntiAlias(aa: boolean): void;
        setBlender(blender: Blender): void;
        setBlendMode(mode: EmbindEnumEntity): void;
        setColor(color: InputColor, colorSpace?: ColorSpace): void;
        setColorComponents(
            r: number,
            g: number,
            b: number,
            a: number,
            colorSpace?: ColorSpace,
        ): void;
        setColorFilter(filter: ColorFilter | null): void;
        setColorInt(color: number, colorSpace?: ColorSpace): void;
        setDither(shouldDither: boolean): void;
        setImageFilter(filter: ImageFilter | null): void;
        setMaskFilter(filter: MaskFilter | null): void;
        setPathEffect(effect: PathEffect | null): void;
        setShader(shader: Shader | null): void;
        setStrokeCap(cap: EmbindEnumEntity): void;
        setStrokeJoin(join: EmbindEnumEntity): void;
        setStrokeMiter(limit: number): void;
        setStrokeWidth(width: number): void;
        setStyle(style: EmbindEnumEntity): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _type: "Paint"

    Methods

    • Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values (sRGB gamut, and encoded with the sRGB transfer function).

      Returns Color

    • Returns the limit at which a sharp corner is drawn beveled.

      Returns number

    • Returns the thickness of the pen used to outline the shape.

      Returns number

    • Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.

      Parameters

      • alpha: number

      Returns void

    • Requests, but does not require, that edge pixels draw opaque or with partial transparency.

      Parameters

      • aa: boolean

      Returns void

    • Sets the current blender, increasing its refcnt, and if a blender is already present, decreasing that object's refcnt.

      • A nullptr blender signifies the default SrcOver behavior.

      • For convenience, you can call setBlendMode() if the blend effect can be expressed as one of those values.

      Parameters

      Returns void

    • Sets alpha and RGB used when stroking and filling. The color is four floating point values, unpremultiplied. The color values are interpreted as being in the provided colorSpace.

      Parameters

      Returns void

    • Sets alpha and RGB used when stroking and filling. The color is four floating point values, unpremultiplied. The color values are interpreted as being in the provided colorSpace.

      Parameters

      • r: number
      • g: number
      • b: number
      • a: number
      • OptionalcolorSpace: ColorSpace

        defaults to sRGB

      Returns void

    • Sets the color used when stroking and filling. The color values are interpreted as being in the provided colorSpace.

      Parameters

      • color: number
      • OptionalcolorSpace: ColorSpace

        defaults to sRGB.

      Returns void

    • Requests, but does not require, to distribute color error.

      Parameters

      • shouldDither: boolean

      Returns void

    • Sets the current mask filter, replacing the existing one if there was one.

      Parameters

      Returns void

    • Sets the current path effect, replacing the existing one if there was one.

      Parameters

      Returns void

    • Sets the current shader, replacing the existing one if there was one.

      Parameters

      Returns void

    • Sets the limit at which a sharp corner is drawn beveled.

      Parameters

      • limit: number

      Returns void

    • Sets the thickness of the pen used to outline the shape.

      Parameters

      • width: number

      Returns void