REBOL3 - AGG (to discus new Rebol/View with AGG [web-public])

Return to Index Page
Most recent messages (300 max) are listed first.

#UserMessageDate
1194AntonNo problem.Fri 1:01
1193amacleodgot rid of the append function and just used teh effect on hte creationof the box...no reason to append it. Good eye Anton, thanksThu 18:18
1192amacleodprobe on head bx/effect but I only get a single occurance of the effect block. But teh code looks like it would do what you suggest.Thu 17:59
1191amacleodOh...You mean the effect append...Yeah I've been appending every time I do the search. But I probed bx/effect but it does not look like its growing unless i"m only seeing the tail in the probe I got an out of memory crash before that I've been trying to track down. This might be it.Thu 17:56
1190amacleodSHow? false...good idea! I've abandoned the append draw idea as it would take some parsing code to remove it again when I move to the next face... Moving a box around is alot easier.Thu 17:49
1189Antonthen you only need to set the offset and size. The above also shows how to make the face initially invisible. (An alternative to size: 0x0).Thu 9:37
1188Antonbx: box edge [color: red size: 2x2] with [show?: false]Thu 9:36
1187AntonYou only need to set the effect once.Thu 9:34
1186AntonAre you doing the APPEND more than once ? (the block will grow and grow...)Thu 9:34
1185amacleodGot it! I draw a box with 0 size at the end of the panel: bx: box 0x0 edge [color: red size: 2x2] Then I size it , move it to where I need it , and append an effect: bx/offset: face/offset + khead - 0x3 bx/size: as-pair (ktail/x - khead/x) 21 bx/effect: append [merge][multiply 100.0.0] Works great. I'm using it to highlight a search word as I step through all the text faces in a panel.

Thanks for the help...

Thu 8:00
1184AntonThis will affect how events are handled, unfortunately. As far as I know, there is no way to make a face "event transparent" at this time. I spent a lot of time looking at this already.Thu 7:21
1183Anton; in its pane view layout [h1 "hello" with [pane: make face [offset: 5x5 size: 20x10 effect: [merge luma 90] edge: none]]]Thu 7:17
1182AntonIf you want to process face/text rendered text, then you're going to have to put a (semi-transparent) face on top of it (or in its pane).Thu 7:17
1181amacleodAbove code : ignore the second code example. I hit ctrl-v instead of cntrl-sThu 7:05
1180amacleodDidC, I thought about that but I was appending. I think I was not drawing the box properly.Thu 7:04
1179amacleodCan you use alpha channel in vid or only in draw?Thu 7:03
1178amacleodActually I don't like this behavior...its too complicated to remove it again.Back to my original plan of moving and resizing a box form face to face...

view layout [ bx: box 100.100.255 0x0 b: box effect [draw [pen red fill-pen red line-width 2 shape [line 0x0 40x0 40x40 0x40]]] at 40x40 text "Hello World" btn "append draw" [append b/effect/draw compose ['pen green 'fill-pen green 'shape ['line 5x0 30x5 5x25 0x20]]show b] btn "Moving box" [bx/offset: 20x20 bx/size: 90x90 show bx] ] for example.

Now if I draw the box after the face it covers the textt which I want to avoid too.view layout [ bx: box 100.100.255 0x0 b: box effect [draw [pen red fill-pen red line-width 2 shape [line 0x0 40x0 40x40 0x40]]] at 40x40 text "Hello World" btn "append draw" [append b/effect/draw compose ['pen green 'fill-pen green 'shape ['line 5x0 30x5 5x25 0x20]]show b] btn "Moving box" [bx/offset: 20x20 bx/size: 90x90 show bx]

Thu 7:02
1177DideCMaybe you were inserting in the draw block instead of appending (insert tail) !?Thu 7:02
1176AntonOk, no problem.Thu 6:45
1175amacleodI got it working... I do not know what i was doing before but its doing what I need...ThanksThu 6:45
1174AntonThat shows the red line drawn behind the face/text, "hello".Thu 6:45
1173Antonview layout [box effect [draw [pen red line-width 5 line 0x0 100x100]] "hello"]Thu 6:44
1172AntonBut anyway, face/text always renders after the face/effect/draw dialect.Thu 6:44
1171AntonEach face has an internal image buffer (that we don't have access to directly). This buffer is blanked just before the face redraws itself.Thu 6:42
1170AntonYou can't really "paint on a face". Faces redraw themselves from their specification every time they are shown.Thu 6:40
1169amacleodI'm doing something like this:

view layout [ b: box effect [draw [pen red fill-pen red line-width 2 shape [line 0x0 40x0 40x40 0x40] ] ] btn "append draw" [append b/effect/draw compose ['pen green 'fill-pen green 'shape ['line 5x0 30x5 5x25 0x20]]show b] ] Its much more complicated as I'm painting highlights on a series of faces in a panel. I go back and highlight in another color where a specified word is found. The hi-lite shows if its on a section of text not yet painted but not if it falls on painted text.

The above example works!

so it must be some where else in my app...

Thanks. I'll look it over...

Thu 6:31
1168AntonSo, please show us a small example of what you're doing.Thu 6:27
1167Antonface/text rendering is separate to face/effect/draw rendering, and will always be on top.Thu 6:25
1166AntonThe above example draws the red box first, and the green kite on top of it.Thu 6:22
1165Antonview layout [box effect [draw [pen red line-width 2 shape [line 0x0 10x0 10x10 0x10] pen green shape [line 5x0 10x5 5x15 0x5]]]]Thu 6:21
1164AntonCan you give a small example, eg:Thu 6:21
1163amacleodIf you draw onto a text field the text is on top. ..even if you 'paint' a box affter the text has been rendered. I do not understand what is going onthere?Thu 5:53
1162amacleodI adding shape objects to a face by appending them to face/effect/draw but the appended shap is beneath the original face shapes.Thu 5:51
1161ICariiThe AGG/Draw dialect will process and render things in the order they are specified inside the draw block for the face. There is no z-index for AGG.Thu 5:08
1160BrockIn most graphics programs there is something called the z-index or something to that effect, that controls the depth of the objects in a view. Usually range in value from 256 (top) to -256 (furthest away). I can't speak for AGG though as I have not played with it yet.Thu 3:38
1159amacleodWhen drawing an object onto a face is there a way to insure that hte next object drawn is layed on top. I'm drawing boxes on a face but when I try to draw addional boxes (different colors) they are hidden behind the first drwn objects..Thu 3:03
1158ReViewerI will test it soon, Thanks!16-Oct-07 2:26
1157ICariiunless of course you are using rotations or scaling :)15-Oct-07 7:35
1156ICariias long as you use pen off/none with vectorial the results should still match :)15-Oct-07 7:34
1155Ashleywhich is fine as long as you don't use vectorial ;)15-Oct-07 7:31
1154ICariiall of which you can change to expected agg fonts etc before calling size-text s: size-text make face compose [text: (t) font/name: "arial" para/wrap?: off] ;etc..15-Oct-07 6:50
1153AshleyI doubt it. size-text expects a face argument and computes size based on face/text, face/font, face/edge and face/para values.15-Oct-07 5:41
1152ICariisize-text will do it.14-Oct-07 6:31
1151btiffinI was just about to try view layout [b: box effect [draw [text "test"]]] planning to poke around with help b to see, then I remembered that REBOL Linux doesn't have draw text :( Sorry. But that's were I would start....poking around in the objects. May well be a waste of time... Then I'd fire up anamonitor and view through some of the system objects for that key ...size-text... kinda function. If that didn't work I'd give up and wait for Cyphre :) Excuse the babbling...14-Oct-07 2:54
1150ReViewerIs there a way to know the length in pixels of a text drawn with AGG?14-Oct-07 2:46
1149PhilBDraw a surface with 3-D Perspective and allow roation - http://peoplecards.ca/rebol/philb/utils/3D-surface.r & in the Rebol Library http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=surface.r11-Aug-07 5:04
1148ICariicoming soon! New onyx styles: field, label, area, check, h1 /h2 / h3. Sample at - http://rebol.mustard.co.nz/new-onyx-styles.png25-Jun-07 10:07
1147CyphreICarii: Cool stuff Henrik: I don't see any problem to render such isometric layout using DRAW.16-Jun-07 23:01
1146ICariithe dot is me forgetting to put in an empty? check ;)15-Jun-07 18:29
1145BrockBy the way, very nice looking menu.15-Jun-07 13:30
1144Brockwondering what the 'dot' is that appears on the right side of the divider over the menu item "File > Recent Files"?15-Jun-07 13:30
1143ICariiyeah - itd be nice to see how it performs on slow computers :)15-Jun-07 9:52
1142Grahampretty zippy15-Jun-07 9:45
1141ICariisupports radio, check, standard and menu/submenu elements at the moment.15-Jun-07 9:38
1140ICariinew draw based menu system released (demo). http://rebol.mustard.co.nz/onyx-demo.r new Onyx grop created regarding it.15-Jun-07 9:36
1139?Actually, I have played with Houdini, will look again though for this application of it.12-Jun-07 6:13
1138Maximwith your IQ that software should be pretty easy to grasp... if you follow one of the learning tutorials.12-Jun-07 2:29
1137Maximif you want to you can easily use the free version of houdini (http://www.sidefx.com/)12-Jun-07 2:28
1136?Thanks!11-Jun-07 16:54
1135Henrikreichart, I sent him an email with the question.11-Jun-07 16:54
1134?Henrik, funny you should post that.............I'm in need of a way to take a 2D diagram, and turn into exactly that (which is called an isometric view).

A cool feature would be that the colour of a 2D rectangle, and perhaps even the line weight and colour would dictate the 3D height, colour, and treatment.

The reason I want this is that I'm building a diagram of the architecture of Qtask, and want to make it easy to see and understand.

What I'm planning to do right now is draw it in 2D first. Then pick a good angle (in my mind). Then build all the 3D objects on an isometric field (sort of like old video games like Zaxxon).

Then scale them into place. Then add the text words in front of them.

I like the words on top vs side as well of the image you posted.

If you know what was used to generate that I would like to know.

11-Jun-07 16:50
1133HenrikICarii: http://cocoadevcentral.com/images/articles/000086-tigerarc.png <--- is this layout possible?11-Jun-07 16:25
1132GreggVery, very cool James.11-Jun-07 15:39
1131RobertOr a nice & simple ORPG done with RS ;-)11-Jun-07 12:02
1130DaveCExcellent.. This type of work could be the basis for a Rebol based GIS. Inspirational - thanks!11-Jun-07 11:34
1129PhilBvery nice11-Jun-07 11:07
1128Henrikbeautiful11-Jun-07 10:09
1127ICariiyet another isometric type world renderer - http://rebol.mustard.co.nz/isometric-world.r11-Jun-07 10:03
1126ICariiReb Rings Mini MGV released - see announce. Mouse gestures etc.10-Jun-07 6:06
1125PhilBIt is processor intensive as it is written entirely in Rebol10-Jun-07 1:53
1124PhilBI haveent optimisec it ..... for smallish numbers of faces you can get good performance .... (I'm no 3D expert)10-Jun-07 1:50
1123ICariiis the rotation algorithm quite intensive?10-Jun-07 1:47
1122ICariii normally use wings3D for the basic shapes then export to subdivide etc10-Jun-07 1:46
1121ICariiyes - but for 3d tools like wings3D you usually have less than 10000 faces before you export to Maya/Lightwave etc10-Jun-07 1:46
1120PhilBMost object do contain thousands of faces ... so you dont get great performance.10-Jun-07 1:45
1119PhilBI did make a start on a 3D object viewer ... it would draw wireframes on 3D objects in the .obj format.10-Jun-07 1:44
1118ICariialthough OpenGL plugin would simplify that a thousandfold10-Jun-07 1:42
1117ICariihmm.. one thing that i would like to do when R3 comes out is to make a rebol 3D model viewer with rotation10-Jun-07 1:42
1116PhilBOn my laptop .... I would gues about 5 frames a second ..... depending on how near the surface is to the camera.10-Jun-07 1:40
1115ICarii:) What sort of performance are you getting Phil?10-Jun-07 1:38
1114PhilBsame surface rotated slightly .... http://farm2.static.flickr.com/1321/537895150_a0e70d54bd_o.png10-Jun-07 1:36
1113PhilBNot exactly terrain rendering ..... This screenshot is from a 3D surface drawing program. Surface can be rotated in 3D .... http://farm2.static.flickr.com/1294/537895152_cf3312af08_o.png10-Jun-07 1:33
1112ICariiill add scrolling in now - just finished support for non-square terrains9-Jun-07 14:53
1111DockimbelVery exciting demo, could you add some terrain scrolling to see how fast we can go with View ?9-Jun-07 14:39
1110ICariieventually i'll fix the z-order and make the resources statix rather than dynamic9-Jun-07 14:07
1109ICariiupdated the above links with alpine/mixed/lowland forest :)9-Jun-07 14:07
1108ICariiit could be - ive got to catch up with geomol re how he wants to do the drawing :)9-Jun-07 12:05
1107Gabrieleis that for the golf game? :)9-Jun-07 11:56
1106ICariimore playing with AGG/Draw - Comic Terrain - http://rebol.mustard.co.nz/comic-terrain.png or for the script - http://rebol.mustard.co.nz/comic-terrain.r Admittedly I am not an artist ;-)9-Jun-07 11:26
1105Maximpretty nonetheless :-)9-Jun-07 0:10
1104Maximah... just read... not 3d rotations... I guess that is part of the reason for speed.9-Jun-07 0:10
1103Maximreal time !!! wow.9-Jun-07 0:09
1102GreggVery nice indeed.7-Jun-07 19:44
1101LouisYes, really nice!7-Jun-07 18:24
1100CyphreICarii: very nice terrain rendering !7-Jun-07 12:23
1099ICariiguess ill wait for R3 and the vector type7-Jun-07 8:29
1098ICariiideally id like to implement real 3D rotations rather than isometrics :(7-Jun-07 8:28
1097ICariiits realtime on this pc but this is an AMD64 with 2gb ram etc..7-Jun-07 8:28
1096Maximanyhow, its pretty ... is it any fast?7-Jun-07 8:27
1095Maximhehe7-Jun-07 8:27
1094ICariiThe alpha is just a nice bonus :)7-Jun-07 7:34
1093ICariiThis latest rendering was just a test to see what the triangle speed limits were using a height map and a colour map.7-Jun-07 7:34
1092ICariiyeah - a while back i used to toy a lot with terrain rendering. Back in 2001 I downloaded a large set of NASA data (1GB+ maps) and was using them for different rendering tasks. Back then I had to use VB6 and C++ as REBOL didnt have a binary skip :)7-Jun-07 7:33
1091Maxim(terrain rendering?)7-Jun-07 7:19
1090Maximwow, did you do that?7-Jun-07 7:19
1089ICariimap readers etc7-Jun-07 4:55
1088ICariiheh - ive been toying with converting some old vb6 terrain stuff i did into rebol for a while7-Jun-07 4:54
1087GrahamIs that what your mahjong tiles look like close up?? ;)7-Jun-07 4:53
1086ICariibring on R3 and even more speed! :)7-Jun-07 4:35
1085ICariithe coolness that is AGG/Draw realtime terrain rendering :) http://rebol.mustard.co.nz/terrain.jpg7-Jun-07 4:34
1084ICariitranslation for clip would be nice. I was making a custom card game where clipping was being used repetitively and constantly resetting the clip coords as well as translating the draw commands was rather clunky :)6-Jun-07 20:16
1083Maximyes please do :-) it will make it very easy to build cliping shapes which are often the easiest way to achieve advanced (multipass) fill effects in complex shapes.6-Jun-07 15:43
1082Cyphre(BTW I'm thinking to add boolean operations on polygons (at the scanline level) in the R3 so this way you should be able make 'viewport' of any shape.)6-Jun-07 12:30
1081Cyphreoops..I meant "only translation" in the last sentence.6-Jun-07 12:23
1080CyphreICarii...we could allow only transformation for the CLIP coords though.6-Jun-07 12:22
1079CyphreAnton: ofcourse you can do nested transformations. You don't CLIP for that. I had no problem to make 'robot arms' etc. in current DRAW.6-Jun-07 12:21
1078Cyphretransformations on CLIP region coordinates aren't applied at the moment. The problem is that clip can be rectangular so you cannot rotate it.6-Jun-07 12:19
1077AntonI'm hoping the transform matrices will work recursively, properly, so we can build a hierarchical object, eg. a body with connected arms free to rotate around the shoulder, forearm free to rotate at the elbow, and hand free to rotate at the wrist. For this to be drawn correctly, clipping regions etc. must work locally to the current matrix.6-Jun-07 9:18
1076BrianHGobs can be nested. Each gob's children are located and clipped relative to their parent. That may not help with rotation.6-Jun-07 5:41
1075ICariiThe main use of this would most probably be with translation and rotation operations6-Jun-07 4:37
1074ICariiFor example: draw [translate 40x100 clip 0x0 200x200] ;this actually clips 0x0 200x200 rather than the expected 40x100 240x3006-Jun-07 4:36
1073ICariiWhat are the odds of getting a relative rather than absolute clipping region?6-Jun-07 4:34
1072PekrI wonder, if it would be possible to later start some competition for REBOL unified mock-ups propositions? We could ask some amiga/beos gfx to help us ...4-Jun-07 16:21
1071Pekrah, cool! So far first/second best looking menu. Other one coming from someone from France too ...4-Jun-07 16:20
1070RobertYes, true.4-Jun-07 15:54
1069GeomolNice looking menu! I like the round corners.4-Jun-07 15:54
1068ICariisize-text is my new friend - that and para/wrap?: off ;-)4-Jun-07 15:27
1067ICariiA menu generator for AGG - work in progress ;-) http://rebol.mustard.co.nz/menu-wip.png4-Jun-07 15:23
1066ICariii suspect it would only be used in image greation programs anyway4-Jun-07 13:07
1065ICariibut if we get rebcode eventually we can do that in the community4-Jun-07 13:07
1064ICariialtho you can cheat with alpha for feather borders4-Jun-07 13:06
1063ICariivery :)4-Jun-07 13:05
1062Gabrielethat gets a bit complicated :)4-Jun-07 13:05
1061ICariior introduce a feather border4-Jun-07 13:05
1060ICariinormally you set a tolerance4-Jun-07 13:04
1059ICariipaint programs have the same issue4-Jun-07 13:04
1058ICariiyes4-Jun-07 13:04
1057Gabrielefill-at - that's a problem with anti-alias4-Jun-07 13:04
1056ICariior just adding a fill-at command4-Jun-07 13:03
1055ICariimoving fill and pen inside the shape block would also be nice to complex shapes4-Jun-07 13:03
1054ICariithe4-Jun-07 13:02
1053Gabrielegob/data can be integer, object, block, i think also string/binary4-Jun-07 13:02
1052ICariiid rather wait a month and have to docs out :)4-Jun-07 13:02
1051Gabriele:P4-Jun-07 13:02
1050Gabrielewait a month (less actually... it's 4 already)4-Jun-07 13:02
1049Pekrhmm, it would be coold, if you could post any simple actual code as a spoiler - we can already learn from studying :-)4-Jun-07 12:59
1048Pekrhow that gob/data points to face/feel/on-click? is there a mezz code in gob/data?4-Jun-07 12:58
1047ICariigood to know4-Jun-07 12:58
1046Gabrielebut you don't need to use "faces" at all, you can just use gobs in a game for eg. and handle events your own way... maybe gob/data maps to the player object :)4-Jun-07 12:57
1045Gabrielefaces are higher level... they have a feel, other info needed for eg for vid, etc.4-Jun-07 12:57
1044ICariiat present I am re-writing all controls in draw only mode so that when we eventually get access to OpenGL surfaces I have less pain :)4-Jun-07 12:56
1043Pekrthat seems to be nicely flexible ... most of the time, at least for static things, you maybe will not need higher level complex structures, so it will save resources ...4-Jun-07 12:56
1042Gabrielegobs are just... graphic objects :)4-Jun-07 12:56
1041Gabrieleexactly.4-Jun-07 12:55
1040ICariiinfo..4-Jun-07 12:55
1039Pekr"event > window + offset > gob at that offset > use gob/data to get to face object > face/feel/on-click etc." - that sentence might actually help me to better understand the concept. So gob is not necessarily child of face. It is completly separate concept - kind of gfx node. And that node points to higher concept - your face, or whatever you want, so you can do anything ....4-Jun-07 12:55
1038ICariigreat ingo on the events Gabriele - that will make networked games much more viable4-Jun-07 12:55
1037Gabriele:P4-Jun-07 12:53
1036Pekrit was a joke ;-)4-Jun-07 12:53
1035Pekryes, but rebservices will be slow :-)4-Jun-07 12:53
1034Gabrielesince you can make event! in R3... you could get event on one PC and then send it over to another PC and handle it there. :)4-Jun-07 12:52
1033Pekrgob being elsewhere - I remember one cool thing about QNX, back in 1998, when they were supposed to be new AmigaOS - their Photon environment allowed you to insert "face" (gob) across the network - two machines were linked via some nodes, so for the GUI it was transparent. Window received the event, and that event in fact was transfered to another PC's window ... was cool :-)4-Jun-07 12:51
1032Gabrieleor you don't map the offset to the gob at all, but use a bitmap to map the offset to something else, like max does in elixir etc.4-Jun-07 12:50
1031Gabrieleor you put an id in gob/data and then use that to do whatever you want4-Jun-07 12:49
1030Gabriele(map to same feel as gob c)4-Jun-07 12:49
1029Gabrielesince 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.4-Jun-07 12:48
1028Gabrieleevent > window + offset > gob at that offset > use gob/data to get to face object > face/feel/on-click etc.4-Jun-07 12:48
1027Gabrieleif 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 R24-Jun-07 12:47
1026Pekrwell, 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?4-Jun-07 12:46
1025Gabrieleso it's not much different from what R2 does, except that you have full control over it.4-Jun-07 12:46
1024Gabrielebasically... 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)4-Jun-07 12:46
1023Pekrwell, if mezz code can be rebcoded :-)4-Jun-07 12:44
1022Pekrah, you were faster, so actually it might be fast :-)4-Jun-07 12:44
1021Gabrieleno it isn't ;)4-Jun-07 12:44
1020Pekrmezz code? slow :-)4-Jun-07 12:44
1019Gabrieleand, it's fast, don't worry :)4-Jun-07 12:44
1018Gabrielepetr: by mezz code :)4-Jun-07 12:44
1017Gabrieleor even have a single event function as event awake (you can do this in R2 too)4-Jun-07 12:43
1016Pekrhmm, how are events tied to gobs then? With face, we had 'feel for that ...4-Jun-07 12:43
1015Gabrieleso you can have hundreds of gobs all sharing the same feel functions.4-Jun-07 12:43
1014Gabrieleeg one face in micro vid has many gobs... and all the events for those gobs go to that face.4-Jun-07 12:43
1013Gabrieleevents - how events are detected depends completely on you in R34-Jun-07 12:42
1012ICariiyeah - but im worried about event hit detection - or is it a pre-composited?4-Jun-07 12:40
1011Gabrielehowever... what you need is done best by just using multiple gobs. feel free to use hundreds of them ;)4-Jun-07 12:39
1010ICariiit would be a nice effect4-Jun-07 12:39
1009Gabrielei think AGG can probably handle non-rect clipping too.4-Jun-07 12:39
1008ICariire clipping non rectangular that would be too expensive in processing terms.4-Jun-07 12:23
1007ICariii/it4-Jun-07 12:20
1006ICariialtho i can be munged with a translate after teh clip i suppose4-Jun-07 12:20
1005ICariiso I guess after all that I still do want a viewport ;P4-Jun-07 12:19
1004ICariiexactly what clip does now :) except clip doesnt set an origin4-Jun-07 12:19
1003ICariiviewport was for virtual bounded regions of the drawing screen4-Jun-07 12:18
1002Pekrwhat 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?4-Jun-07 12:18
1001ICariiwas too busy looking for region / viewport / zone..4-Jun-07 12:18
1000ICarii*slaps self*4-Jun-07 12:17
999ICariii cant believe i missed that4-Jun-07 12:16
998ICariihahaha clip4-Jun-07 12:16
997ICariino for clipping on retangular regions.. there is a command for that already and ive missed it havent I? ;)4-Jun-07 12:16
996Gabrieleyou mean for clipping on non-rectangular areas?4-Jun-07 12:08
995ICariiif viewport was to be done like shape - but contain the full AGG dialect we could do nesting.4-Jun-07 11:18
994ICariieg: i might have an effect: [draw [viewport [any agg commands.. text etc....] .. viewport [...] viewport [ .. viewport []]]]4-Jun-07 11:17
993ICariiis it possible to add viewport rendering into AGG? eg virtual boundary limits - this would save using additional gobs/faces and simplify things a lot4-Jun-07 11:16
992PekrI 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 ...2-Jun-07 11:37
991CyphreYes, the ARC shape command is a bit confusing....we need to improve the syntax or make at least clear docs on it.2-Jun-07 11:17
990AntonI found ARC very difficult to use. The parameters are not very helpful.1-Jun-07 3:28
989GreggFrom 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

31-May-07 16:12
988GeomolMaybe 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]]31-May-07 10:24
987ICariihmm.. well 60 - 100 for the outer ring, 40 - 70 for the inner ring31-May-07 10:08
986ICariilol - i tried values from 40 - 100 - all the same result :)31-May-07 10:07
985GeomolI guess, Cyphre is the one to ask.31-May-07 10:06
984ICariiive experimented with various values and don't have a clue - please enlighten me :)31-May-07 10:05
983ICariishape [move 0x0 arc 200x200 90 false true]31-May-07 10:04
982ICariiin the following example what does the 90 refer to??31-May-07 10:04
981ICariihmm thanks - i often find issues between the docs and the actual builds with argument order31-May-07 8:16
980Geomolview 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.

31-May-07 8:15
979ICariiIs the AGG implementation capable of drawing filled donuts such as the third example in - http://www.w3.org/TR/SVG/painting.html#FillProperties31-May-07 3:56
978DockimbelThat's good news21-May-07 14:50
977Gabrielebug has been fixed for 2.7.6 (will be released shortly)21-May-07 14:45
976RebolekThis is known bug, it's already in RAMBO - http://www.rebol.net/cgi-bin/rambo.r?id=4040&21-May-07 13:40
975DockimbelLook similar, seems that the 2nd argument for PEN triggers the crash.21-May-07 13:30
974Henrikhttp://www.rebol.net/cgi-bin/rambo.r?id=4086&21-May-07 13:27
973Henrikoops, wrong link21-May-07 13:26
972Henrikdockimbel: http://usb.brando.com.hk/prod_detail.php?prod_id=00286 <--- related?21-May-07 13:26
971DockimbelI'm posting it to RAMBO.21-May-07 13:26
970DockimbelIf you comment the 'red argument, it behaves normally.21-May-07 13:26
969Dockimbelview layout [ box effect [ draw [ pen black red push [shape [move 0x0 line 50x50]] ] ] ]21-May-07 13:25
968DockimbelThe following code crashes View 2.7.5.3.1 :21-May-07 13:25
967CyphreYes, the example is a bit confusing :) I hope we will have better DRAW docs for R3.21-May-07 10:29
966DockimbelThanks Cyphre, I was hoping I missed something ! You're right your example is working ok. The example in the doc was really confusing.21-May-07 10:21
965CyphreThe same is for the PUSH variant. Let me know if you have any other questions regarding this.21-May-07 9:41
964CyphreTo 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 ] ] ]

21-May-07 9:39
963Cyphre(ie the third box 'offset' starts at 100x100 so after reset-matrix it is at 150x150)21-May-07 9:35
962CyphreDockimbel: the examples you are refering to are working OK. Notice the beginnign coordinate of third box. I think this is what confused you.21-May-07 9:32
961DockimbelPUSH is used the 3rd example I was refering to and doesn't work too, TRANSLATE still cumulates.21-May-07 8:34
960AntonOldes, ContextFreeArt is nice.21-May-07 4:07
959Steeveuse PUSH command instead20-May-07 22:09
958DockimbelBTW, 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).20-May-07 22:04
957DockimbelWhatever method I use in my DRAW code, I keep having the cumulative effect on TRANSLATE (and also on MATRIX).20-May-07 21:56
956DockimbelIn 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.3320-May-07 21:55
955CyphreYep, 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 :)11-Apr-07 19:28
954Jean-FrançoisContextfreeart. I always thought it wouldn't be that hard for one of you guys to implement it in Rebol/AGG.11-Apr-07 17:42
953Jean-FrançoisOldes, I also love that app.11-Apr-07 17:41
952MaximSteve, I am about to release in the next few weeks a dataflow draw engine called glob. its allows selectable layers of assembled draw blocks, can VERY easily animate too.7-Mar-07 14:47
951Sunanda90+% of what you need to do that, Steeve, is already in the Library: [1] we could (in minutes) add extra valid domains or types so a script could be categorised as draw-snippet

[2] the LIbrary doesn't use rebservices for an API. It has an API called LDS that predates rebservices (basically, the library team got there first). You can use it to download any script (among other things too) http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=lds-local.r#toc-50

[3] using LS to download a snippet every time it is needed would be slow and wasteful.....But you could easily write get-draw-snippet that caches results locally. **** That would not be perfect as it would be good to have a page/pages showing the images the snippets produce. But if there were enough snippets, we could add that.....And, before we do someone else could beat us to it on their own website -- they could use LDS to get all the snippets and display the images. It'd be a neat bit of Community interaction.

====> Perhaps switch to Library for any detailed discussion.

7-Mar-07 7:03
950Steeveyes we should...7-Mar-07 0:41
949Steevewe could think too about a standardized form for draw animations7-Mar-07 0:39
948Steeveso we could download them into draw tools using rebservices7-Mar-07 0:35
947Steevethey could be indexed like scripts, with keywords and other usefull tricks7-Mar-07 0:33
946Steevewhat about a library of draw snipsets handled by rebol.org ?7-Mar-07 0:32
945OldesI was just looking for some Rebol/draw (agg) manual and found this interesting project made using AGG (not Rebol related) http://www.contextfreeart.org/gallery/6-Mar-07 14:52
944Rebolekthat's what I wrote :)5-Mar-07 18:19
943OldesAch... ok my fault - the center point is in zero - that's why it was not visible - so it's probably not a bug5-Mar-07 17:08
942Oldesnever mind, I already used my rebol/flash dialect to make the chart. I just wanted to say, that there is probably a bug, because this is working: view layout [ box 400x400 effect [draw [ rotate 15 fill-pen red arc 200x200 90x90 0 108 closed fill-pen green arc 200x200 90x90 108 252 closed ]] ]5-Mar-07 17:05
941Rebolekuse 'transform instead. you need center point woith rotation and it's not clear where it is with 'rotate keyword (0x0 probably?)5-Mar-07 16:47
940Oldesthis code draws nothing: view layout [ box 400x400 effect [draw [ rotate -90 fill-pen red arc 200x200 90x90 0 108 closed fill-pen green arc 200x200 90x90 108 252 closed ]] ]5-Mar-07 15:33
939OldesHow to rotate ARC?5-Mar-07 15:31
938CyphreGraham: I think the linux SDK will have agg enabled once we solve the font path identification thing.28-Feb-07 12:02
937Grahamagg font support ie.27-Feb-07 18:30
936Grahambefore R3 comes out ?27-Feb-07 18:30
935GrahamIs carl going to release a linux sdk with agg enabled?27-Feb-07 18:29
934Oldesand if I can use such a image http://box.lebeda.ws/~hmm/rebol/projects/font-tools/latest/fonts/idea.png to create glyphs which I can use in flash: http://box.lebeda.ws/~hmm/rebol/projects/font-tools/latest/fonts/idea.html it would be nice to have a chance to use such a bitmap (or the vectorized glyphs) in Rebol as well27-Feb-07 18:19
933OldesThe AA is the reason, why I want bitmap fonts. With such a bitmap it would be very easy to create pixel fonts. If you take a look at Flash you can see, that most of the sites is using pixel precision fonts, which are made for fixed height but anyway are much more smaller. http://fontsforflash.com/27-Feb-07 18:17
932MaximI also know that apple, quantel, adobe, MS and others have patents in font, and AA algorythms, which might actually prevent people from performing proper AA or Font rendering... even if they know how.27-Feb-07 17:28
931Maximso I guess a similar operation is needed for fonts (I have no concrete bg in fonts, only view a similarity)27-Feb-07 17:27
930Maximfor example, if you want to slide a picture of a stars, you must first boost the gamma of the picture by 2, do the move and then apply a .5 gamma. then, the AA will have spread out according to energy rather than color. which means that the 2 side-by-side pixels will be at much more than 0.5 of the original 1.0 single pixel brightness.27-Feb-07 17:25
929MaximI find the issue is mostly with thin lines where the aa will be quite spectacular in its variations especially if you look at the difference from 45 angle and near 0 or 90 degre angles. I know that AA should be an energy based repartition, which is not linear. (gamma) such that two pixels at 0.5 are actually a quarter as bright as one full 1.0 brightness pixel to our vision (obviously subjective to user response, applied monitor gamma and superwhite levels, etc).27-Feb-07 17:23
928HenrikMaxim, I don't know. The output seems pretty similar to what is output with Freetype 2, but the AA is a little uneven, yes.27-Feb-07 17:12
927MaximAGG wouldn't have this effect since it does not seem to use clear text. in fact, in general I find AGG font AA pretty ugly... is there a way to improve this? even if its slow? there are some situations which do not mind speed (generating HQ output graphics, for example) or small GUIs or when converting face looks to bitmaps before display.. (trades speed for ram)27-Feb-07 16:44
926Maximmy guess is that REBOL builds its glyphs once and then any PIXEL that has one of the channels to on is set as all on... so we get bad aliasing and some dots here and there.27-Feb-07 16:42
925MaximI've only noticed the artifact in rebol when text is bold... don't know why.27-Feb-07 16:41
924Maximthe downside is that this is optimised for working on white BG in all I can see, and is obviously useless unless you have an LCD monitor.27-Feb-07 16:41
923Maximclear type is very different in how it treats pixels... it actually addresses each individual R G B channel of each pixel individually, so what happens is that on many faces, the anti-aliasing actually turns the edges as shades of colors, and not gray.27-Feb-07 16:39
922CyphreHmm, iteresting. I have the cleartype turned off so I didn't know that. That looks like something is going wrong with the cached glyph bitmaps when BOLD text is used with cleartype enabled. I don't know the guts of old text renederer so this is just my guess.27-Feb-07 13:14
921Henrikyep, those27-Feb-07 13:05
920Rebolekhttp://bolek.techno.cz/pix/view-artifacts.png27-Feb-07 13:04
919HenrikI think it's only visible with clear type enabled27-Feb-07 12:55
918HenrikXP27-Feb-07 12:55
917CyphreUnder what OS?27-Feb-07 12:55
916HenrikI noticed that View produces pixel artifacts on some letters on my PC, but I think that's RAMBO'ed. Those artifacts are not visible in DRAW text.27-Feb-07 12:51
915HenrikI'm curious, what kind of font rendering does View use?27-Feb-07 12:48
914CyphreAGG based DRAW is platform independent so it doesn't need X-Win or any other API framework. The only dependent part is TEXT rendering(which is not included in the AGG). Currently it supports Win32API and FreeType2 library to be able render text. So even if you have rebol on Linux you only need freetype2 lib, not Xserver in your setup. (the X-win dependecies are in the older Text rendering engine of R2 used for text in faces which will be eliminated in R3).27-Feb-07 12:25
913Pekryes, that is also my understanding. So /draw will be module, which you will be able to "include" (pack) into your exe. But that alone does not probably answer, when/where X-Win is needed?27-Feb-07 12:20
912CyphrePekr: I have no clue about the R3 product line/strategy, yo need to ask Carl about this. (I guess from Carl's blogs there will be more flexible aproach to build your 'own Rebol' than in R2)27-Feb-07 12:18
911Pekrwell, it is just that we talk about R3 as of a beast, not being compatible more than from 30% to R2. If it is going to be nearly 100% compatible, than continued development of R2 after R3 release is total vaste of resources .....27-Feb-07 12:17
910CyphrePekr, the reason for backporting is that: 1) there will be high demand from R2 userbase for such feature 2) it would be easy to do it. So my note above is very hypothetical ;)27-Feb-07 12:16
909PekrCyphre - how Carl's decision of where he wants to put draw can be valid for R3? Or are you talking about R2 here? I thought that with R3 the rather stupid product segmentation vanishes once and for all ...27-Feb-07 12:13
908Pekreeh, that debate indicates, R3 is at least one year from being findished. Other than that - what would be the reason to backport anything to R2?27-Feb-07 12:12
907OldesCyphre probably remember I still would like to have bitmap fonts (use specified parts of image as font glyphs:-)27-Feb-07 12:09
906CyphreDoc: the FONT rendering in R2 DRAW should handle all TTF fonts. (at least I havent heard about any problems from anyone). The persistent text mode can be added IMO even in R2. Text formating won't be probablay enhaced as this would take too much effort. But in R3 there will be rich-text dialect for that purposes. (Maybe the new rich-text dialect could be backported into R2 later but it all depends...)27-Feb-07 12:09
905DockimbelWell...after doing some more testing on fonts, looks like it works correctly with all TT fonts I've just tested. I used to never set the rendering mode for TEXT, maybe that was the cause of my issues.27-Feb-07 12:04
904CyphreI believe this will be improved in R3 with better modularity.27-Feb-07 12:04
903Cyphrerunning DRAW without Xserver. This is quite possible but it all depends on Carl's decission in which product he want to have it. AFAIK the DRAW native command is in Rebol/Command(which can be run without Xserver) at the moment.27-Feb-07 12:03
902OldesI cannot. As I have only Pro licence. Cyphre - if it's not working on server - it's useless for me. At home I can use image magic. But I know, that's not your fault.27-Feb-07 12:00
901CyphreOldes: I meant image filter with resampling so when you downscale image the result is much better(but costs more CPU time) than using bilinear filtering.27-Feb-07 11:58
900DockimbelOldes: you could make a REBOL wrapper around the GD library (used by PHP for image processing).27-Feb-07 11:57
899DockimbelI'd like to have better font support (most of Windows TT fonts seems to not work), better font objet support (things like 'offset and 'valign doesn't seem to work), persistent Draw settings (like Text rendering mode). These font issues may be due to my lack of experience with the new Draw/AGG, did other ppl had the same issues on windows ?27-Feb-07 11:55
898Oldeswithout that I'm still forced to use PHP for image uploads27-Feb-07 11:54
897OldesI would like to be able to work with images on linux server without X server running27-Feb-07 11:53
896OldesWhat filter?27-Feb-07 11:51
895Henrikyes!27-Feb-07 11:48

Return to Index Page