Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: PDF Maker

From: sqlab:gmx at: 16-Jul-2001 9:32

Hi Gabriele I really appreciate your work, Some comments. How about a path notation in using the options, as in 'box 'box/solid 'box/line/width 'line 'line/width regards AR
> Hi! > > I just wanted to note that I'm currently adding graphics to > pdf-maker.r. It now does lines and boxes as well as coordinate > transformations (nested at any level). I'll add generic shapes > very soon, together with clipping etc. I've also added comments to > the code so that you'll be able to see how it is working (and use > the lowlevel dialect if needed). > > For the graphics I decided to go this way: > > ; simple commands > 'line x1 y1 x2 y2 > 'box x y w h > 'solid 'box x y w h ; for filled box > ; you can also set line width etc. > 'line 'width w 'cap 'round > ; or set and draw > 'line 'width w x1 y1 x2 y2 > ; for BOXes > 'box 'line 'width lw x y w h > ; which is the same as > 'line 'width lw > 'box x y w h > ; line color can be set with > 'line opt ['color] tuple! > ; fill color with > 'fill opt ['color] tuple! > > ; transformations can be done with > 'apply 'translation x y [ > ; ... > ] > ; you can nest them... > 'textbox ... > 'line ... > 'apply 'rotation angle 'translation x y [ > 'line ... > 'textbox ... > 'apply 'scaling sx sy [ > 'box ... > 'textbox ... > ] > ] > ; and so on... (apply has other nice features, too) > > ; for paths, I plan to go this way > 'stroke options [path] ; draw a path > 'fill options [path] ; fill a path > 'paint options [path] ; fill and stroke a path > ; where the options are the same as for LINE etc. > ; and set a new state > > I'd like to have comments on these. > > Regards, > Gabriele. > -- > Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer > Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/ >
AR