|
|
|
submodule "/pliant/language/compiler.pli" submodule "/pliant/language/compiler/type/inherit.pli" submodule "prototype.pli" submodule "/pliant/graphic/image/prototype.pli" submodule "/pliant/util/encoding/html.pli" submodule "/pliant/graphic/misc/float.pli" module "/pliant/math/curve.pli" module "/pliant/graphic/vector/outline.pli"
method img fill x0 y0 x1 y1 color oarg_rw ImagePrototype img ; arg Float x0 y0 x1 y1 ; arg A var Int ix0 := max (img index_x x0) 0 var Int iy0 := max (img index_y y0) 0 var Int ix1 := min (img index_x x1) img:size_x var Int iy1 := min (img index_y y1) img:size_y if ix1>ix0 and iy1>iy0
|
|
submodule "/pliant/language/compiler.pli" submodule "/pliant/language/compiler/type/inherit.pli" submodule "prototype.pli" submodule "/pliant/graphic/image/prototype.pli" submodule "/pliant/util/encoding/html.pli" submodule "/pliant/graphic/misc/float.pli" module "/pliant/math/curve.pli" module "/pliant/graphic/vector/outline.pli"
method img fill x0 y0 x1 y1 color oarg_rw ImagePrototype img ; arg Float x0 y0 x1 y1 ; arg A var Int ix0 := max (img index_x x0) 0 var Int iy0 := max (img index_y y0) 0 var Int ix1 := min (img index_x x1) img:size_x var Int iy1 := min (img index_y y1) img:size_y if ix1>ix0 and iy1>iy0
|
|
|
|
img fill ix0 iy0 ix1-ix0 iy1-iy0
|
|
img fill ix0 iy0 ix1-ix0 iy1-iy0 color
|
|
function html_color s -> c arg Str s ; arg Int c function hexa s -> i arg Str s ; arg Int i i := 0 for (var Int index) 0 s:len-1 var Int c := s:index:number if c>="0":number and c<="9":number i := i*16+(c-"0":number) eif c>="A":number and c<="Z":number i := i*16+(c+10-"A":number) eif c>="a":number and c<="z":number i := i*16+(c+10-"a":number) if (s 0 1)="#" and s:len=7 c := hexa:(s 1 2)+hexa:(s 3 2)*2^8+hexa:(s 5 2)*2^16 else c := undefined
|
|
function html_color s -> c arg Str s ; arg Int c function hexa s -> i arg Str s ; arg Int i i := 0 for (var Int index) 0 s:len-1 var Int c := s:index:number if c>="0":number and c<="9":number i := i*16+(c-"0":number) eif c>="A":number and c<="Z":number i := i*16+(c+10-"A":number) eif c>="a":number and c<="z":number i := i*16+(c+10-"a":number) if (s 0 1)="#" and s:len=7 c := hexa:(s 1 2)+hexa:(s 3 2)*2^8+hexa:(s 5 2)*2^16 else c := undefined
|