skia
    Preparing search index...

    Interface SkPicture

    See SkPicture.h for more information on this class.

    Of note, SkPicture is not what is colloquially thought of as a "picture" (what we call a bitmap). An SkPicture is a series of draw commands.

    interface SkPicture {
        _type: "SkPicture";
        approximateBytesUsed(): number;
        cullRect(outputArray?: Rect): Rect;
        delete(): void;
        deleteLater(): void;
        isAliasOf(other: any): boolean;
        isDeleted(): boolean;
        makeShader(
            tmx: EmbindEnumEntity,
            tmy: EmbindEnumEntity,
            mode: EmbindEnumEntity,
            localMatrix?: InputMatrix,
            tileRect?: InputRect,
        ): Shader;
        serialize(): Uint8Array<ArrayBufferLike> | null;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _type: "SkPicture"

    Methods

    • Returns the approximate byte size. Does not include large objects.

      Returns number

    • Return the bounding area for the Picture.

      Parameters

      • OptionaloutputArray: Rect

        if provided, the bounding box will be copied into this array instead of allocating a new one.

      Returns Rect

    • Returns a new shader that will draw with this picture.

      Parameters

      • tmx: EmbindEnumEntity

        The tiling mode to use when sampling in the x-direction.

      • tmy: EmbindEnumEntity

        The tiling mode to use when sampling in the y-direction.

      • mode: EmbindEnumEntity

        How to filter the tiles

      • OptionallocalMatrix: InputMatrix

        Optional matrix used when sampling

      • OptionaltileRect: InputRect

        The tile rectangle in picture coordinates: this represents the subset (or superset) of the picture used when building a tile. It is not affected by localMatrix and does not imply scaling (only translation and cropping). If null, the tile rect is considered equal to the picture bounds.

      Returns Shader

    • Returns the serialized format of this SkPicture. The format may change at anytime and no promises are made for backwards or forward compatibility.

      Returns Uint8Array<ArrayBufferLike> | null