add grid

From DavinciWiki
Revision as of 22:27, 31 January 2008 by Cedwards (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{{DavinciWiki_Function| Adds a grid of specified dimensions to a picture | Inputs: a byte picture

Outputs: a byte picture with a grid | Syntax: add_grid(data, dx, dy, line_color [, xo = INT] [, yo = INT] [, thick = INT])

 'data'         is the input picture
 'dx'           is the delta x for the vertical grid lines
 'dy'           is the delta y for the horizontal grid lines
 'line_color'   is the line color 'white,black,quarterwhite,quarterblack,halfwhite,halfblack'
 'xo'           is the x offset before the first vertical grid lines
 'yo'           is the y offset before the first horizontal grid lines
 'thick'        is the line_weight

| dv> a 4480x1600x3 array of byte, bip format [21,504,000 bytes] dv> b=add_grid2(a,640,640,"halfwhite",yo=320,thick=1) 4480x1600x3 array of byte, bip format [21,504,000 bytes] dv> display(b) Writing /tmp/dv_32752/4H2q1r: 4480x1600x3 PNG file.

| Before and After images grid before.png grid after.png |

|

|

  • general_science.dvrc

| 1.01 | }}

Personal tools