Method dedicated to create fill attributes, bound to canvas SVG
otherwise newly created patters will not be usable in the canvas
See JSROOT.TAttFillHandler for more info.
Instance assigned as this.fillatt data member, recognized by GED editor

Name

Type

Description

args

object

for special cases one can specify TAttFill as args or number of parameters

Name

Type

Default

Description

std

boolean

true

optional

this is standard fill attribute for object and should be used as this.fillatt

attr

object

null

optional

object, derived from TAttFill

pattern

number

optional

integer index of fill pattern

color

number

optional

integer index of fill color

color_as_svg

string

optional

color will be specified as SVG string, not as index from color palette

In some situations canvas may not exists - for instance object drawn as html, not as svg.
In such case the only painter will be assigned to the first element

Following value of is_main parameter is allowed:
-1 - only assign id, this painter not add to painters list,
0 - normal painter (default),
1 - major objects like TH1/TH2 (required canvas with frame)
2 - if canvas missing, create it, but not set as main object
3 - if canvas and (or) frame missing, create them, but not set as main object
4 - major objects like TH3 (required canvas and frame in 3d mode)
5 - major objects like TGeoVolume (do not require canvas)