World: r3wp
[AGG] to discus new Rebol/View with AGG
older newer | first last |
Cyphre 18-May-2006 [773] | You would have plenty of work with converting SVG exported file from Flash IDE back to the Flash compound shapes ;) |
Volker 18-May-2006 [774] | Which means you need either a clever parser, or a call to new AGG. |
Cyphre 18-May-2006 [775x3] | have a look here to get the idea how Flash renders: http://blogs.msdn.com/mswanson/archive/2006/02/27/539749.aspx |
it is efficient way (as the result is rendered in one pass) but it needs lot of more work to define the shapes properly ;) | |
AFAIK no other publicly known graphics system is using this method. | |
Pekr 18-May-2006 [778x2] | well, Cyphre, then we need you to come-up with commercial Rebol native Authoring tool - you know - we want to beat Scala, right? :-) |
Cyphre - can you talk about new View internals? Gabriele sheds some light on some topics here from time to time, but very little was said about View. The only thing we know from blog is, that even system was replaced .... | |
Cyphre 18-May-2006 [780x3] | I'm not agains that the Flash rendering support in DRAW but this needs to be well designed. I'll probably discuss it woth Oldes as he is very deep in Flash internals. I believe we will find some elegant way ;) |
Pekr: I cannot tel you much news at the moment. Watch the blogs ;) | |
BTW I'm currently working on some DRAW fixes from RAMBO. So I'd like to ask all DRAW users: If you have encountered a serious bug which is not in RAMBO, please put it in so they can be fixed in this round. | |
Pekr 18-May-2006 [783] | I think that guys are interested in SVG compatibility issues, to have SVG compatible renderer :-) |
Graham 18-May-2006 [784x2] | How about a way to change the coordinate system? |
I'd like to see a way to set 0,0 to bottom left ... | |
Volker 18-May-2006 [786] | How about exposing the math? To map mouse back to faces, as in Antons demo? |
Graham 18-May-2006 [787] | What do you think? |
Cyphre 18-May-2006 [788] | Wait guys ;) I was asking for bug reports not for new features :) But feel free to add those to RAMBO as wishes to not forget on them. |
Volker 18-May-2006 [789] | How far can transformation go? can it turn things upside down? |
Graham 18-May-2006 [790] | I think using top left 0,0 is a bug :) |
Volker 18-May-2006 [791x3] | But common on screens. |
also similar to line-counting. top line is first line, not #66 | |
but for diagramms it is terrible *nod+ | |
Cyphre 18-May-2006 [794] | Graham: lot of people could think writing from letf to right is a bug too :) |
Graham 18-May-2006 [795x2] | but that's for text. Not for drawing. |
mathematics uses Cartesian coordinates | |
Cyphre 18-May-2006 [797] | BTW you can very easily change the coordinate system even now. |
Graham 18-May-2006 [798x2] | How? |
Is there a way of applying translate to invert the y axis? | |
Cyphre 18-May-2006 [800x4] | here is simple example: |
view layout [ origin 0 bx: box 400x400 black effect [ draw [ translate 0x400 scale 1 -1 pen red line 50x50 350x50 pen blue line 50x50 50x350 pen yellow line 50x50 100x200 200x150 300x250 350x225 ] ] ] | |
but this won't work with text though because it would be reversed in Y axis too. | |
Another solution is to apply own translation function on the dialect block or generate the dialect block with translated coords from scratch. (this shouldn't be a rocket science and would work with text too) | |
Volker 18-May-2006 [804x3] | Regarding text, maybe Graham is right and a graphics-only reverse would help? for diagrams. The current way is a bit complicated, until one gets the trick. |
means "apply own translation function on the dialect block". And now that little reversion-math, y: high - y . | |
now -> know | |
Pekr 18-May-2006 [807] | that would require one step above parser to draw dialect, no? |
Cyphre 19-May-2006 [808x2] | It's really easy: |
translate-draw: func [ height [integer!] blk [block!] /local dr p ][ parse blk [some ['draw set dr block! (parse dr [some [p: pair! (p/1: as-pair p/1/x height - p/1/y) | skip]]) | skip]] blk ] view layout [ origin 0 bx: box 400x400 black effect translate-draw 400 [ draw [ pen red line 50x50 350x50 pen blue line 50x50 50x350 pen yellow line 50x50 100x200 200x150 300x250 350x225 pen white text aliased 10x350 "Y axis" text aliased 320x40 "X axis" ] ] ] | |
Volker 19-May-2006 [810] | Looks like magic :) But should not be required to draw a line through some data? |
Graham 5-Jun-2006 [811x2] | rotate says it sets the clockwise rotation for draw commands. |
So, why does the text move across the page ? view/new layout [ b: box 400x400 black effect [ draw []] ] for i 0 90 5 [ b/effect: compose/deep [ draw [ rotate (i) text vectorial "This is a string of text 1" 300x75 ]] show b wait .2 ] | |
Henrik 5-Jun-2006 [813] | because the text rotates around 0x0 rather than around itself |
Graham 5-Jun-2006 [814] | should this be changed? |
Henrik 5-Jun-2006 [815x2] | which is what I figured you wanted to do. you need to make the text at 0x0, rotate it and then translate it to the position you want |
e.g. translate 100x100 rotate 30 text "something" | |
Graham 5-Jun-2006 [817] | or set up a straight line "spline" for the text ... |
Henrik 5-Jun-2006 [818] | possibly |
Graham 5-Jun-2006 [819] | Well, seems to me it should be changed. |
Henrik 5-Jun-2006 [820] | changed in AGG or in the code? |
Graham 5-Jun-2006 [821x2] | Text should rotate at the point where it is being drawn |
in AGG. | |
older newer | first last |