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

Anton
11-Jul-2005
[368x2]
view layout [b: box navy 100x100 effect [draw [circle 30x50 19.5 
20.2 circle 60x50 19.5 20.6]] image b/size * 4 to-image b]
You can see the two ellipses are slightly different.
Rebolek
11-Jul-2005
[370]
yes I understand, but when there's such a precision with cicrle, 
why it's not same with 'arc?
Anton
11-Jul-2005
[371x2]
you can get it using    scale 0.1 0.1    for example.
sometimes it's handier with pair!s, sometimes it's handier with pairs 
of decimal!s
Rebolek
11-Jul-2005
[373x2]
OK, but I still think that 'arc, 'circle and 'ellipse should have 
radius parametr in same form.
pair! with decimal precission would be nice
Anton
11-Jul-2005
[375x2]
Ah, but that's the thing... :)
Adding a new datatype is a major extra body of code. And with SCALE 
we really don't need it.
Rebolek
11-Jul-2005
[377x4]
I know I know, it was ust a small dream ;)
but still - I think that 'arc, 'circle and ellipse should have same 
type parameteres
for radius
I've just found in the documentation that 'arc in 'shape uses two 
decimal!s and not one pair!. And now tell me it's NOT confusing :)))
Anton
12-Jul-2005
[381x3]
Circle fill and outline don't seem to match up quite perfectly.
img1: to-image layout/tight [image 40x40 effect [draw [pen black 
fill-pen leaf circle 20x20 19]]]

img2: to-image layout/tight [image white 40x40 effect [draw [pen 
black fill-pen leaf circle 20x20 19]]]
view layout [image 200x200 img1 image 200x200 img2]
You can see some light green pixels at top left of the outside of 
the circle, and at the bottom left, on the inside of the circle.

I wonder if this is a rebol agg implementation issue or an agg issue.
Gregg
12-Jul-2005
[384]
I believe that's a known issue Anton.
DideC
12-Jul-2005
[385]
Yes, known issue.
Anton
12-Jul-2005
[386x3]
ok, so I assume Cyphre is on to it already.
Shadwolf, you will find it much easier to work from this style:
do http://www.lexicon.net/antonr/rebol/gui/demo-direction-pointer.r
Cyphre
13-Jul-2005
[389]
Anton, yes, this is known issue. This will be fixed in the next version.
DideC
13-Jul-2005
[390]
Anton:

>> do http://www.lexicon.net/antonr/rebol/gui/demo-direction-pointer.r
** Script Error: direction-pointer-style has no value
** Where: do-facets
** Near: direction-pointer-style
Cyphre
13-Jul-2005
[391x2]
Shadwolf: I analyzed your SVG example with nested MATRIX command 
and found little bug in matrix calculation. Thanks for pointing this 
out! I know the solution so it will be fixed in the next Rebol View 
build.
Note: The bug is related only to MATRIX command. TRANSFORM/TRANSLATE/ROTATE/SCALE 
works ok.
Anton
13-Jul-2005
[393]
Dide, I think it failed to load direction-pointer.r file. Just try 
again until it works ! :)
DideC
13-Jul-2005
[394]
Hum, your script search for the file in our Rebsite index.r file, 
so I must see it in the Desktop, isn't it ?

If yes, I see a %direction-box.r, but no %direction-pointer.r icon.
Anton
13-Jul-2005
[395x2]
No. It is not indexed. Actually, quite a lot of my scripts are not 
indexed :-(
(but I am working on that).
DideC
13-Jul-2005
[397]
Sorry but tried 20 times and still the error
Anton
13-Jul-2005
[398x2]
foreach url [
http://www.lexicon.net/antonr/rebol/gui/demo-direction-pointer.r
http://www.lexicon.net/antonr/rebol/gui/direction-pointer.r
][print [url mold info? url]]
http://www.lexicon.net/antonr/rebol/gui/demo-direction-pointer.r
make object! [
    size: 1333
    date: 13-Jul-2005/2:01:33
    type: 'file
]

http://www.lexicon.net/antonr/rebol/gui/direction-pointer.rmake 
object! [
    size: 2033
    date: 13-Jul-2005/2:01:25
    type: 'file
]
DideC
13-Jul-2005
[400]
It works at home :)
I wonder why it didn't at work!
shadwolf
14-Jul-2005
[401]
Cyphre Great !!!! I'm happy to have found a difficult bug regarding 
MATRIX in AGG/DRAW :) I hope this will be solved as soon as possible. 
I all cases tahnk you to have take the time to scout my problems 
:)
Anton
14-Jul-2005
[402]
mmm weird :)
shadwolf
14-Jul-2005
[403x5]
instead of using matrix i can translate it into scale rotate and 
translate value so ...
????
SVG matrix (a b c d e f) -> AGG scale [a d] rotate [b c] translate 
[e f] can I do this ???
matrix is 3X3
like that :
[a c e]
[b d f]
[0 0 1]

where couple AD = scaling BC= rotating EF = translating
DideC
15-Jul-2005
[408]
Can't 'transform be used for doing all that ?
Anton
18-Jul-2005
[409]
Dide, perhaps at work you have not updated your reboltech index.r 
file for a while, and it still points to my old rebsite.
Try this at work:
	load-thru/update http://www.reboltech.com/index.r
DideC
19-Jul-2005
[410]
It was probably that ;-)
shadwolf
20-Jul-2005
[411x2]
Don't know if transform REBOL/AGG command can do this 

I not enoght skilled in AGG to answer ... I will try to use transform 
instead of matrix
it's yet a kind of miracle for me totally noob in AGG and in SVG 
to have arrived to the actual point of the svg renderer. Lot of code 
and ideas have helped me a lot Ashley is trully a idea fountain. 
Those idea only claim to be worked again and again to arrive to a 
very very good and usefull tool
DideC
21-Jul-2005
[413]
Transform does rotation, scale and translation in one command :
TRANSFORM       angle [decimal!]
                center [pair!]
                scale-x [decimal!]
                scale-y [decimal!]
                translation [pair!]
Cyphre
21-Jul-2005
[414x3]
shadwolf: you cannot use partial matrix blocks on SCALE/ROTATE/TRANSLATE 
commands.
The problem of converting back already defined transformtion matrix 
is that you don't actually know what opearations(rotate,scale,translate 
etc.)  has been applied on the matrix values. ie transformation matrix 
is ireversible.
So I think there is no method how to 'extract' translation, rotation 
and scale from matrix content(correct me if I'm wrong)
JaimeVargas
21-Jul-2005
[417]
I agree with you, there needs to be some sort of record on how the 
operations occured. I think there is big number of combinations (rotation, 
translation and scale). That could produce the same matrix, so decomposition 
is not easy if the only think know is the Matrix itself.