World: r3wp
[AGG] to discus new Rebol/View with AGG
older newer | first last |
Jean-François 11-Apr-2007 [953x2] | Oldes, I also love that app. |
Contextfreeart. I always thought it wouldn't be that hard for one of you guys to implement it in Rebol/AGG. | |
Cyphre 11-Apr-2007 [955] | Yep, I wanted to make Contextfree parser in Rebol couple of years ago but still don't get to it. Anyway it would be a nice PARSE/DRAW exercise :) |
Dockimbel 20-May-2007 [956x3] | In the new DRAW/AGG dialect, it seems that the 'reset-matrix command just don't work with 'matrix or 'translate. I've tried the examples from TRANSLATE command found in the online DRAW documentation, the 2nd and 3rd examples are supposed to reset the translation, it just don't work (unless I've missed something obvious). Tested with View 1.3.2.3.1 and View 2.7.5.3.1. Examples URL: http://www.rebol.com/docs/draw-ref.html#section-3.33 |
Whatever method I use in my DRAW code, I keep having the cumulative effect on TRANSLATE (and also on MATRIX). | |
BTW, I'm working on a DRAW-based visual CAPTCHA for web forms. I guess that if these commands are buggy, I'll have to do it the old-fashion way, making all the calculations in REBOL (instead of letting DRAW do the maths). | |
Steeve 20-May-2007 [959] | use PUSH command instead |
Anton 21-May-2007 [960] | Oldes, ContextFreeArt is nice. |
Dockimbel 21-May-2007 [961] | PUSH is used the 3rd example I was refering to and doesn't work too, TRANSLATE still cumulates. |
Cyphre 21-May-2007 [962x4] | Dockimbel: the examples you are refering to are working OK. Notice the beginnign coordinate of third box. I think this is what confused you. |
(ie the third box 'offset' starts at 100x100 so after reset-matrix it is at 150x150) | |
To clarify it have a look at result this example: view layout [ box 600x400 effect [ draw [ fill-pen blue box 50x50 150x150 translate 50x50 fill-pen red box 50x50 150x150 reset-matrix translate 70x70 fill-pen yellow box 0x0 100x100 ] draw [ translate 200x0 fill-pen blue box 50x50 150x150 translate 50x50 fill-pen red box 50x50 150x150 translate 70x70 fill-pen yellow box 0x0 100x100 ] ] ] | |
The same is for the PUSH variant. Let me know if you have any other questions regarding this. | |
Dockimbel 21-May-2007 [966] | Thanks Cyphre, I was hoping I missed something ! You're right your example is working ok. The example in the doc was really confusing. |
Cyphre 21-May-2007 [967] | Yes, the example is a bit confusing :) I hope we will have better DRAW docs for R3. |
Dockimbel 21-May-2007 [968x4] | The following code crashes View 2.7.5.3.1 : |
view layout [ box effect [ draw [ pen black red push [shape [move 0x0 line 50x50]] ] ] ] | |
If you comment the 'red argument, it behaves normally. | |
I'm posting it to RAMBO. | |
Henrik 21-May-2007 [972x3] | dockimbel: http://usb.brando.com.hk/prod_detail.php?prod_id=00286 <--- related? |
oops, wrong link | |
http://www.rebol.net/cgi-bin/rambo.r?id=4086& | |
Dockimbel 21-May-2007 [975] | Look similar, seems that the 2nd argument for PEN triggers the crash. |
Rebolek 21-May-2007 [976] | This is known bug, it's already in RAMBO - http://www.rebol.net/cgi-bin/rambo.r?id=4040& |
Gabriele 21-May-2007 [977] | bug has been fixed for 2.7.6 (will be released shortly) |
Dockimbel 21-May-2007 [978] | That's good news |
ICarii 30-May-2007 [979] | Is the AGG implementation capable of drawing filled donuts such as the third example in - http://www.w3.org/TR/SVG/painting.html#FillProperties |
Geomol 31-May-2007 [980] | view layout [box 400x400 white effect [draw [pen none fill-pen red shape [move 100x100 arc 300x300 90 false true arc 100x100 90 false true move 150x150 arc 250x250 60 true true arc 150x150 60 true true]]]] When I run this code under OS X, REBOL/View version 2.7.5, I get the effect. I find, that some of the parameters isn't logic. The documentation is ambigious, http://www.rebol.com/docs/draw-ref.html#section-5, so it may change. |
ICarii 31-May-2007 [981x4] | hmm thanks - i often find issues between the docs and the actual builds with argument order |
in the following example what does the 90 refer to?? | |
shape [move 0x0 arc 200x200 90 false true] | |
ive experimented with various values and don't have a clue - please enlighten me :) | |
Geomol 31-May-2007 [985] | I guess, Cyphre is the one to ask. |
ICarii 31-May-2007 [986x2] | lol - i tried values from 40 - 100 - all the same result :) |
hmm.. well 60 - 100 for the outer ring, 40 - 70 for the inner ring | |
Geomol 31-May-2007 [988] | Maybe this give a clue? view layout [b: box 400x400 white effect [draw [shape [move 0x200 arc 90 200x400 false true]]] at 300x20 slider [b/effect/draw/shape/arc: to-integer value * 360 show b]] |
Gregg 31-May-2007 [989] | From Cyphre: Yes, the DRAW dialect has FILL-RULE keyword which should work the same as described in the svg documentation. And yes, we need to improve the documentation and maybe even change the arc syntax. Any feedback on this is welcome. BTW the ARC shape command should work according the http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands |
Anton 31-May-2007 [990] | I found ARC very difficult to use. The parameters are not very helpful. |
Cyphre 2-Jun-2007 [991] | Yes, the ARC shape command is a bit confusing....we need to improve the syntax or make at least clear docs on it. |
Pekr 2-Jun-2007 [992] | I would like our agg command structure to concentrate upon compatibility with SVG, if possible and if it would be benefical to us. E.g. I remember we could not produce compatible gradients ... |
ICarii 4-Jun-2007 [993x3] | is it possible to add viewport rendering into AGG? eg virtual boundary limits - this would save using additional gobs/faces and simplify things a lot |
eg: i might have an effect: [draw [viewport [any agg commands.. text etc....] .. viewport [...] viewport [ .. viewport []]]] | |
if viewport was to be done like shape - but contain the full AGG dialect we could do nesting. | |
Gabriele 4-Jun-2007 [996] | you mean for clipping on non-rectangular areas? |
ICarii 4-Jun-2007 [997x5] | no for clipping on retangular regions.. there is a command for that already and ive missed it havent I? ;) |
hahaha clip | |
i cant believe i missed that | |
*slaps self* | |
was too busy looking for region / viewport / zone.. | |
Pekr 4-Jun-2007 [1002] | what is the viewport? I do remember it from Amiga, but don't remember what it was about..... kind of separate gfx space/bitmap to draw on? |
older newer | first last |