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

Pekr
22-Jun-2005
[279]
so are rebol modules reconsidered?
Graham
22-Jun-2005
[280]
So, modules would be like forth vocabularies ?
Carl
22-Jun-2005
[281x2]
Not exactly.
Forth vocabularies are heaps of word definitions (code and data).
Graham
22-Jun-2005
[283]
I meant in use.
Carl
22-Jun-2005
[284]
It has been too long since I used Forth to know precisely!
Graham
22-Jun-2005
[285]
Would you be able to switch easily from working with one module to 
another?
Carl
22-Jun-2005
[286]
we should move out of this group!
Volker
22-Jun-2005
[287x3]
to me it sounds comparable. a "search-order" root system user etc. 
and modules can be extended after creation.
but here is more control about what you use from other modules. if 
you search "forth" in big systems, thats 1k words. here we can say 
"want only drop dup swap".
moving out - too late.. ;) new group?
Graham
22-Jun-2005
[290x2]
rename this group :)
Future Directions
Carl
22-Jun-2005
[292]
TechTalk
Ashley
22-Jun-2005
[293]
Back to AGG ... "add a move to the end to keep the shape open" ... 
thanks Gabriele, that solves the problem nicely.
shadwolf
23-Jun-2005
[294x2]
I'm actually working on svg-demo.r code in order to extend it translation 
support
so actually I'm working on <G></G> block  and I yet support in <g> 
block path definition but I need to be able to support the transform 
matrix how can i do this in DRAW AGG ?
Vincent
23-Jun-2005
[296]
shadwolf: there's the 'matrix command for 2x3 matrix in draw/AGG 
: the syntax is
  matrix [a b c d e f]
where the equivalent 3x3 matrix is:
  | a c e |
  | b d f |
  | 0 0 1 |

if I'm correct , "matrix(2.082761,0.529757,-0.491943,1.944909,4.543758,-12.39301)" 
translates to
matrix [2.082761 0.529757 -0.491943 1.944909 4.543758 -12.39301]
Cyphre
23-Jun-2005
[297]
exactly
shadwolf
23-Jun-2005
[298x5]
done bu t I still have jaggies ...
and my ftp account is out of line ...
but I'm near the solution ;)
then I need to suport gradientLinear
see new group SVG RENDERER for my actual source code ;)
[unknown: 5]
23-Jun-2005
[303]
We gonna have some docs on agg useage or is it not included in view 
1.3?
Vincent
23-Jun-2005
[304]
AGG docs / infos :
http://www.rebol.net/notes/draw-commands.txt
http://www.rebol.net/draw/index.html
[unknown: 5]
25-Jun-2005
[305]
I don't quite understand the notes on how to do draw text can someone 
post an example
ChristianE
25-Jun-2005
[306]
my-font: make face/font [name: "Arial Black" size: 24] view layout 
[box effect [draw [font my-font pen black fill-pen yellow text "Text" 
vectorial]]]
[unknown: 5]
26-Jun-2005
[307x4]
That is sweet!  Thanks ChristianE
That is a lot different method than I thought from the notes
I noticed that it doesn't work for 'btn no matter what size I choose
Also would be nice to input text like that into a field so that its 
already formatted and then when one types in the field its AGG style 
text
ChristianE
26-Jun-2005
[311x3]
AGG rendered *editable* text, you mean? I guess that would require 
some reasonable work, and it would probably be very slow, since you'd 
have to write your own OFFSET-TO-CARET and CARET-TO-OFFSET.
For BTN, which already has an EFFECT block, you'd have to append 
the DRAW block:
font-a: make face/font [name: "Arial Black" size: 24]
font-b: make face/font [name: "Arial" size: 12]
view center-face layout [
    btn 120x48 with [
        append init [

            append effect compose [draw [font font-a pen black fill-pen yellow 
            text 16x8 "Button" vectorial]]
        ]
    ]
    btn 20x120 with [
        append init [

            append effect compose [draw [transform -90 0x0 0x90 1 1 font font-b 
            pen none fill-pen black text 0x2 "vertical text" vectorial]]
        ]
    ]
]
[unknown: 5]
26-Jun-2005
[314]
Wow that looks good!  This AGG stuff dramatically improves the type 
of GUI's were capable of.  I really need to dive into this stuff 
more.  I do think they should look for ways to add that capability 
to fields and text-lists etc..
shadwolf
27-Jun-2005
[315x14]
I don't really understand how to use matrix (global ones and local 
ones) I'm try to make a SVG renderer so matrix are some times declared 
first globally for all the content of a group <g></g> and into the 
primitives of those block so how to add the matrix in the AGG code
for example actually I use push [ matrix [] Matrix [] shape[] reset-matrix 
shape [] shape [] shape [] ] I pass on the declaration of the fill 
pen line width and other settup calls to easier resum what I'm doing 
:)
So in my mind this means first matrix in the pile is the global one 
second matrix apply to the following shape then reset-matrix disable 
this second matrix for all the remainning shapes that follow this 
reset -matrix call and o they are affected only by the global one.
but maybe the good implementation is more like this push [matrix 
[] push [matrix [] shape [] ] shape [] shape [] shape [] ] or push 
[ matrix [] push [ matrix [] shape [] reset-matrix ] shape [] shape[] 
shape[] ]
with my actual implementation I see on screen the group well renderer 
(all the elements of the groupe are coherent) but the group items 
are not well positionned there is a gap betwin the not gouped part 
of the image and the grouped one (I'm working with the file blender.SVG)
the orange part of this draw is over the dark one but not in the 
good place ...
so I yet  don't have problems with draw layers but only with the 
position of the grouped part :)
matrix in SVG are in this format matrix [a b c d e f ] (decimal!) 
and this represent a transform  matrix of this from 
[ a c e]
[ b d f ] 

[ 0 0 1] so I really don't know if this is the same for a matrix 
in draw AGG.  As the gap is not very  hudge this means for me that 
the AGG matrix i close to be handled the same as the SVG ones ...
according to the SVG documentation a = scale X b =  skew X c = skew 
Y d = scale Y e = translate X f =  translate Y. For example in blender.svg 
file the group global matrix is  matrix [1.462522 0.0 0.0 1.462522 
-11.43136 -22.46338] (this is made with raw datas from the file no 
more compute than retrieving and converting the datas from dtring! 
to decimal!) So according to the informations I read in the SVG doc 
this matrix represent a scale X/Y of 1.46  and a translation X/Y 
of -11.43 and -22.46.  I'm working with a premaid scaling environnement 
applyed to the coord of the shapes maybe I need to apply this scale 
to the a b and e f value of the SVG matrix when I build the matrix 
 in AGG.
scalling that is applyed to shapes coordinates is scale-x: size/x 
/ svg-size/x  scale-y: size/y / svg-size/y ( this allow resize handling)
I hope that I give anought inforamtion to allow you to help me regarding 
to my positionning problem.
to help you figure out my rendering problem I make a little composition 
image that shows on left the SVG image well rendered by inkscape 
and on the right part the svg-demo-shadwolf.r rendering ....
http://shadwolf.free.fr/SVG-rend-compare.jpg
I'm made to be so close to the goos implementation and not being 
able to solve by my own those problems ...