Falk Joensson's
Eas (Easy Application Script)

Rendering 2D Drawings:06. Filling Shapes

DRAW'FILL! all future-drawn closed shapes will be filled with a light grey color DRAW'FILL:0 turns off filling of closed shapes DRAW'FILL:c all future-drawn closed shapes will be filled with the color c given as either a string of the CSS'COLA formats #X #XA #RGB #RGBA #RRGGBB #RRGGBBAA or a CSS color mixer string of the formats rgb(RRR,GGG,BBB) rgba(RRR,GGG,BBB,AAA) DRAW'FILL:a 0 g all future-drawn closed shapes will be filled with a linear gradient of the gradient colors g given as either an array or individual parameters, each of the single-color format described above for DRAW'FILL:c the colors are given from top to bottom, but the gradient can be rotated by an angle a given in clockwise degrees
DRAW'FILL:g all future-drawn closed shapes will be filled with a radial gradient of the gradient colors g given as either an array or individual parameters, each of the single-color format described above for DRAW'FILL:c the colors are given from the center outwards DRAW'FILL:g a all future-drawn closed shapes will be filled with a radial gradient of the gradient colors g given as either an array or individual parameters, each of the single-color format described above for DRAW'FILL:c the colors are given from the center outwards the fading will be radially asymmetric, with the innermost color shifted to the final-color outer circle's edge at an angle a given in degrees clockwise from upwards
DRAW'FILL:g a m 100 all future-drawn closed shapes will be filled with a radial gradient of the gradient colors g given as either an array or individual parameters, each of the single-color format described above for DRAW'FILL:c the colors are given from the center outwards the fading will be radially asymmetric, with the innermost color shifted towards the final-color outer circle's edge by the magnitude m in percent, at an angle a given in degrees clockwise from upwards DRAW'FILL:p all future-drawn closed shapes will be filled with a pattern image given by the E DHT Element Key p of an <img>, <canvas> or <video>, centered on the shape's center of mass filling with patterns works only if the source has already loaded (e.g. check that their DHT'W is #0), videos will yield the currently shown frame DRAW'FILL:p r 0 all future-drawn closed shapes will be filled with a pattern image given by the E DHT Element Key p of an <img>, <canvas> or <video>, centered on the shape's center of mass, rotated by the angle r given as clockwise degrees DRAW'FILL:p r 0 s 1 all future-drawn closed shapes will be filled with a pattern image given by the E DHT Element Key p of an <img>, <canvas> or <video>, centered on the shape's center of mass, rotated by the angle r given as clockwise degrees, scaled by the factor s if s is negative, the image will be flipped horizontally
DRAW'FILL:p r 0 h 1 v 1 all future-drawn closed shapes will be filled with a pattern image given by the E DHT Element Key p of an <img>, <canvas> or <video>, centered on the shape's center of mass, rotated by the angle r given as clockwise degrees, scaled horizontally by the factor h (a negative value will flip the image horizontally) and scaled vertically by the factor v (a negative value will flip the image vertically) DRAW'FILL:p r 0 h 1 v 1 x 0 y 0 o 100 all future-drawn closed shapes will be filled with a pattern image given by the E DHT Element Key p of an <img>, <canvas> or <video>, offset by x percent of the source's width towards the right, and upwards by y percent of the source's height, from being centered on the shape's center of mass, rotated by the angle r given as clockwise degrees, scaled horizontally by the factor h (a negative value will flip the image horizontally) and scaled vertically by the factor v (a negative value will flip the image vertically) with the opacity given as o in percent an overview of the allowed modificator values: r-360=r=r+360 h#0 v#0 -100≤x≤100 -100≤y≤100 0≤o≤100
06. Filling Shapes
D Download Eas 4B
O Donate
C Contact
Esc Search / Table of Contents