ez.no / exponential / documentation / reference / template operators / pdf / filled_rectangle
{pdf( filled_rectangle, hash( x, x_position,
y, y_position,
width, width,
height, height,
[ rgb, rgb_color, ]
[ rgbTop, rgb_top_color,
rgbBottom, rgb_bottom_color, ]
[ cmyk, cmyk_color, ]
[ cmykTop, cmyk_top_color,
cmykBottom, cmyk_bottom_color, ] ) )}
| Name | Type | Description | Required |
|---|---|---|---|
| x | integer/float | X page offset | yes |
| y | integer/float | Y page offset | yes |
| width | integer/float | Rectang width | yes |
| height | integer/float | Rectangle height | yes |
| rgb | array | Rectangle RGB color, range 0 .. 255 | no |
| rgbTop | array | Rectangle top RGB color, range 0 .. 255 | no |
| rgbBottom | array | Rectangle bottom RGB color, range 0 .. 255 | no |
| cmyk | array | Rectangle CMYK color, range 0 .. 1 | no |
| cmykTop | array | Rectangle top CMYK color, range 0 .. 1 | no |
| cmykBottom | array | Rectangle bottom CMYK color, range 0 .. 1 | no |
Create a filled rectangle. By specifying different top and bottom color it is possible to create gradients. Linear interpolation is used.
Available from 3.4 and newer.
This will create a gradient fill of a whole A4 page.
{pdf(filled_rectangle, hash( x, -10, y, 30.5, width, 282.9, height, 821.9, cmykTop, array( 0.96, 0.30, 0, 0 ), cmykBottom, array( 0.15, 0.04, 0, 0 )))} {pdf(filled_rectangle, hash( x, 272.9, y, 30.5, width, 333, height, 821.9, cmykTop, array( 0.34, 0.05, 0, 0 ), cmykBottom, array( 0.10, 0.02, 0, 0 )))} {pdf(filled_rectangle, hash( x, -10, y, -10, width, 606, height, 40.5, cmyk, array(0.89, 0.43, 0.01, 0)))}
log in or create a user account to comment.
Comments