cheetah-grid
    Preparing search index...

    Interface GridCanvasHelperAPI

    interface GridCanvasHelperAPI {
        theme: RequiredThemeDefine;
        buildCheckBoxInline(
            check: boolean,
            context: CellContext,
            option: {
                animElapsedTime?: number;
                borderColor?: ColorPropertyDefine;
                checkBgColor?: ColorPropertyDefine;
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                uncheckBgColor?: ColorPropertyDefine;
            },
        ): InlineAPI;
        button(
            caption: string,
            context: CellContext,
            option: {
                bgColor?: ColorPropertyDefine;
                color?: ColorPropertyDefine;
                font?: FontPropertyDefine;
                icons?: SimpleColumnIconOption[];
                offset?: number;
                padding?: string | number | (string | number)[];
                shadow?: {
                    blur?: number;
                    color?: string;
                    offset?: { x?: number; y?: number };
                    offsetX?: number;
                    offsetY?: number;
                };
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                textOverflow?: string;
            },
        ): void;
        checkbox(
            check: boolean,
            context: CellContext,
            option: {
                animElapsedTime?: number;
                borderColor?: ColorPropertyDefine;
                checkBgColor?: ColorPropertyDefine;
                offset?: number;
                padding?: string | number | (string | number)[];
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                uncheckBgColor?: ColorPropertyDefine;
            },
        ): void;
        drawBorderWithClip(
            context: CellContext,
            draw: (ctx: CanvasRenderingContext2D) => void,
        ): void;
        drawWithClip(
            context: CellContext,
            draw: (ctx: CanvasRenderingContext2D) => void,
        ): void;
        fillRectWithState(
            rect: RectProps,
            context: CellContext,
            option: { fillColor?: ColorPropertyDefine },
        ): void;
        getColor(
            color: ColorPropertyDefine,
            col: number,
            row: number,
            ctx: CanvasRenderingContext2D,
        ): string | CanvasGradient | CanvasPattern;
        getColor(
            color: ColorsPropertyDefine,
            col: number,
            row: number,
            ctx: CanvasRenderingContext2D,
        ): ColorsDef;
        getStyleProperty<T>(
            style: T | ((args: StylePropertyFunctionArg) => T),
            col: number,
            row: number,
            ctx: CanvasRenderingContext2D,
        ): T;
        multilineText(
            lines: string[],
            context: CellContext,
            option: {
                autoWrapText?: boolean;
                color?: ColorPropertyDefine;
                font?: FontPropertyDefine;
                icons?: SimpleColumnIconOption[];
                lineClamp?: LineClamp;
                lineHeight?: string | number;
                offset?: number;
                padding?: string | number | (string | number)[];
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                textOverflow?: string;
            },
        ): void;
        radioButton(
            check: boolean,
            context: CellContext,
            option: {
                animElapsedTime?: number;
                checkBgColor?: ColorPropertyDefine;
                checkBorderColor?: ColorPropertyDefine;
                checkColor?: ColorPropertyDefine;
                offset?: number;
                padding?: string | number | (string | number)[];
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                uncheckBgColor?: ColorPropertyDefine;
                uncheckBorderColor?: ColorPropertyDefine;
            },
        ): void;
        testFontLoad(
            font: undefined | string,
            value: string,
            context: CellContext,
        ): boolean;
        text(
            text: string | (string | InlineAPI)[],
            context: CellContext,
            option: {
                color?: ColorPropertyDefine;
                font?: FontPropertyDefine;
                icons?: SimpleColumnIconOption[];
                offset?: number;
                padding?: string | number | (string | number)[];
                textAlign?: CanvasTextAlign;
                textBaseline?: CanvasTextBaseline;
                textOverflow?: string;
            },
        ): void;
        toBoxPixelArray(
            value: string | number | (string | number)[],
            context: CellContext,
            font: undefined | string,
        ): [number, number, number, number];
    }
    Index

    Properties

    Methods

    • Parameters

      • caption: string
      • context: CellContext
      • option: {
            bgColor?: ColorPropertyDefine;
            color?: ColorPropertyDefine;
            font?: FontPropertyDefine;
            icons?: SimpleColumnIconOption[];
            offset?: number;
            padding?: string | number | (string | number)[];
            shadow?: {
                blur?: number;
                color?: string;
                offset?: { x?: number; y?: number };
                offsetX?: number;
                offsetY?: number;
            };
            textAlign?: CanvasTextAlign;
            textBaseline?: CanvasTextBaseline;
            textOverflow?: string;
        }

      Returns void

    • Parameters

      • check: boolean
      • context: CellContext
      • option: {
            animElapsedTime?: number;
            borderColor?: ColorPropertyDefine;
            checkBgColor?: ColorPropertyDefine;
            offset?: number;
            padding?: string | number | (string | number)[];
            textAlign?: CanvasTextAlign;
            textBaseline?: CanvasTextBaseline;
            uncheckBgColor?: ColorPropertyDefine;
        }

      Returns void

    • Parameters

      • context: CellContext
      • draw: (ctx: CanvasRenderingContext2D) => void

      Returns void

    • Parameters

      • context: CellContext
      • draw: (ctx: CanvasRenderingContext2D) => void

      Returns void

    • Parameters

      Returns string | CanvasGradient | CanvasPattern

    • Parameters

      Returns ColorsDef

    • Type Parameters

      • T

      Parameters

      Returns T

    • Parameters

      • lines: string[]
      • context: CellContext
      • option: {
            autoWrapText?: boolean;
            color?: ColorPropertyDefine;
            font?: FontPropertyDefine;
            icons?: SimpleColumnIconOption[];
            lineClamp?: LineClamp;
            lineHeight?: string | number;
            offset?: number;
            padding?: string | number | (string | number)[];
            textAlign?: CanvasTextAlign;
            textBaseline?: CanvasTextBaseline;
            textOverflow?: string;
        }

      Returns void

    • Parameters

      Returns void

    • Parameters

      • font: undefined | string
      • value: string
      • context: CellContext

      Returns boolean

    • Parameters

      • text: string | (string | InlineAPI)[]
      • context: CellContext
      • option: {
            color?: ColorPropertyDefine;
            font?: FontPropertyDefine;
            icons?: SimpleColumnIconOption[];
            offset?: number;
            padding?: string | number | (string | number)[];
            textAlign?: CanvasTextAlign;
            textBaseline?: CanvasTextBaseline;
            textOverflow?: string;
        }

      Returns void

    • Parameters

      • value: string | number | (string | number)[]
      • context: CellContext
      • font: undefined | string

      Returns [number, number, number, number]