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;
        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;
        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];
}

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;
      }
      • OptionalbgColor?: ColorPropertyDefine
      • Optionalcolor?: ColorPropertyDefine
      • Optionalfont?: FontPropertyDefine
      • Optionalicons?: SimpleColumnIconOption[]
      • Optionaloffset?: number
      • Optionalpadding?: string | number | (string | number)[]
      • Optionalshadow?: {
            blur?: number;
            color?: string;
            offset?: {
                x?: number;
                y?: number;
            };
            offsetX?: number;
            offsetY?: number;
        }
        • Optionalblur?: number
        • Optionalcolor?: string
        • Optionaloffset?: {
              x?: number;
              y?: number;
          }
          • Optionalx?: number
          • Optionaly?: number
        • OptionaloffsetX?: number
        • OptionaloffsetY?: number
      • OptionaltextAlign?: CanvasTextAlign
      • OptionaltextBaseline?: CanvasTextBaseline
      • OptionaltextOverflow?: string

    Returns void

  • Parameters

    Returns void

  • Parameters

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

          • ctx: CanvasRenderingContext2D

          Returns void

    Returns void

  • Parameters

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

          • ctx: CanvasRenderingContext2D

          Returns 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;
      }
      • OptionalautoWrapText?: boolean
      • Optionalcolor?: ColorPropertyDefine
      • Optionalfont?: FontPropertyDefine
      • Optionalicons?: SimpleColumnIconOption[]
      • OptionallineClamp?: LineClamp
      • OptionallineHeight?: string | number
      • Optionaloffset?: number
      • Optionalpadding?: string | number | (string | number)[]
      • OptionaltextAlign?: CanvasTextAlign
      • OptionaltextBaseline?: CanvasTextBaseline
      • OptionaltextOverflow?: string

    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;
      }
      • Optionalcolor?: ColorPropertyDefine
      • Optionalfont?: FontPropertyDefine
      • Optionalicons?: SimpleColumnIconOption[]
      • Optionaloffset?: number
      • Optionalpadding?: string | number | (string | number)[]
      • OptionaltextAlign?: CanvasTextAlign
      • OptionaltextBaseline?: CanvasTextBaseline
      • OptionaltextOverflow?: string

    Returns void

  • Parameters

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

    Returns [number, number, number, number]