TOC : Script API > JavaScript > JavaScript API > GeneralScript > DrawingContext > Method >

 

fill

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > GeneralScript > DrawingContext > Method >

 

fill

 

 

Paint the interior of the shape.

 

 

 

Prototype :

 

void fill

(

       No Arguments

)

 

 

 

Reference :

 

The fill color is defined in fillStyle.

 

The function draws the shape on the screen regardless of transparency or clipping of the component and it can draw the arc even in areas outside of the component. However, the shape drawn outside the input component area is clipped.

 

The shape drawn by the function can be exported only in pdf, jpg, png, gif, tif, svg format.

 

 

 

Example :

 

ctx.fillStyle = "#FF0000";

ctx.beginPath();

ctx.lineTo(0, 0);

ctx.lineTo(0, 50);

ctx.lineTo(50, 50);

ctx.fill();

 

 

 

Available Events :

 

OnPostDraw,  OnPreDraw

 

 

 

See also :

 

fillStyle