SpreadJS Documentation
paint Method
The canvas's two-dimensional context.
The cell's value.
x-coordinate relative to the canvas.
y-coordinate relative to the canvas.
The cell's width.
The cell's height.
The cell's actual style.
The context associated with the cell type. See the Remarks for more information.
Paints a cell on the canvas.
Syntax
var instance = new GcSpread.Sheets.BaseCellType();
var returnValue; // Type: any
returnValue = instance.paint(ctx, value, x, y, w, h, style, context);
function paint( 
   ctx : CanvasRenderingContext2D,
   value : object,
   x : number,
   y : number,
   w : number,
   h : number,
   style : Style,
   context : object
) : any;

Parameters

ctx
The canvas's two-dimensional context.
value
The cell's value.
x
x-coordinate relative to the canvas.
y
y-coordinate relative to the canvas.
w
The cell's width.
h
The cell's height.
style
The cell's actual style.
context
The context associated with the cell type. See the Remarks for more information.
Remarks

The context parameter can include the following items:

Item Type Description
context.sheet GcSpread.Sheets.Sheet instance Indicates the current sheet.
context.row number The row index.
context.col number The column index.
context.sheetArea GcSpread.Sheets.SheetArea The current sheet area.

 

See Also

Reference

BaseCellType type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.