r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[AGG] to discus new Rebol/View with AGG

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?
ICarii
4-Jun-2007
[1003x6]
viewport was for virtual bounded regions of the drawing screen
exactly what clip does now :) except clip doesnt set an origin
so I guess after all that I still do want a viewport ;P
altho i can be munged with a translate after teh clip i suppose
i/it
re clipping non rectangular that would be too expensive in processing 
terms.
Gabriele
4-Jun-2007
[1009]
i think AGG can probably handle non-rect clipping too.
ICarii
4-Jun-2007
[1010]
it would be a nice effect
Gabriele
4-Jun-2007
[1011]
however... what you need is done best by just using multiple gobs. 
feel free to use hundreds of them ;)
ICarii
4-Jun-2007
[1012]
yeah - but im worried about event hit detection - or is it a pre-composited?
Gabriele
4-Jun-2007
[1013x3]
events - how events are detected depends completely on you in R3
eg one face in micro vid has many gobs... and all the events for 
those gobs go to that face.
so you can have hundreds of gobs all sharing the same feel functions.
Pekr
4-Jun-2007
[1016]
hmm, how are events tied to gobs then? With face, we had 'feel for 
that ...
Gabriele
4-Jun-2007
[1017x3]
or even have a single event function as event awake (you can do this 
in R2 too)
petr: by mezz code :)
and, it's fast, don't worry :)
Pekr
4-Jun-2007
[1020]
mezz code? slow :-)
Gabriele
4-Jun-2007
[1021]
no it isn't ;)
Pekr
4-Jun-2007
[1022x2]
ah, you were faster, so actually it might be fast :-)
well, if mezz code can be rebcoded :-)
Gabriele
4-Jun-2007
[1024x2]
basically... the event gives you the window gob and the offset in 
it. then there's a native that can map an offset inside the window 
to the gob it belongs too. so the mezz code just uses that, then 
maps the gob to the feel, eg via gob/data (user data field)
so it's not much different from what R2 does, except that you have 
full control over it.
Pekr
4-Jun-2007
[1026]
well, how is feel tied to gob? Is it automatically done, according 
to gob offset, and even offset? What if there is many gobs under 
the event offset? Hierarchy applies? Can we have event-transparent 
gobs?
Gabriele
4-Jun-2007
[1027x3]
if you had a game that was operated by keys only, for example, you 
would not need to do any of this, so it's even faster than R2
event > window + offset > gob at that offset > use gob/data to get 
to face object > face/feel/on-click etc.
since gob/data can be whatever... you can map any gob to any feel, 
gob b inside gob a may map to gob c which is elsewhere.