Path

ez.no / exponential / documentation / reference / template operators / pdf / filled_rectangle


filled_rectangle

Summary

Create a filled rectangle.

Usage

{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, ] ) )}

Parameters

NameTypeDescriptionRequired
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

Returns

Description

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.

Examples

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)))}

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
       anchor
       createIndex
       filled_circle
       filled_rectangle
       footer
       footer_block
       frame_header
       frontpage
       header
       header_block
       image
       keyword
       line
       link
       newline
       newpage
       set_font
       set_margin
       strike
       table
       text
       text_box
       text_frame
       toc
       ul
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
Template functions
Data fetching
Modules
XML tags


Created

14/05/2004
2:11:21 pm
by Kåre Køhler Høvik

Last updated

19/05/2004
9:02:07 am
by Kåre Køhler Høvik

Authors

Kåre Køhler Høvik



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.