# | User | Message | Date |
1334 | amacleod | Thanks | 11-Jan-10 15:47 |
1333 | Geomol | Another example: img: make image! 100x100 img/alpha: 255 ; making it transparent draw img [pen none fill-pen 255.0.0.128 box 10x10 60x60 fill-pen 0.255.0.128 box 40x40 90x90] save/png %box.png img Two boxes are drawn on a transparent image, one red one green and both with 50% transparency, and the result is saved as PNG. | 11-Jan-10 15:44 |
1332 | Geomol | Welcome. | 11-Jan-10 15:41 |
1331 | amacleod | ok...that looks like it worked...thanks much, Geomol | 11-Jan-10 15:39 |
1330 | amacleod | Hang on | 11-Jan-10 15:36 |
1329 | Geomol | ok, maybe we can create a simple example of that. | 11-Jan-10 15:36 |
1328 | amacleod | I asume the alpha is already in the logo...I'm trying to build a translucent box using draw (for use in a web page) and save it in png. | 11-Jan-10 15:35 |
1327 | Geomol | But try do something similar as my example and see, if you can save the alpha channel in PNG images. | 11-Jan-10 15:35 |
1326 | Geomol | Well, AGG and DRAW isn't used in my test. It's plain REBOL. It would even work with REBOL/Core, I guess. (I know, graphics in REBOL can be confusing.) | 11-Jan-10 15:33 |
1325 | amacleod | Which I thought would be appropiate | 11-Jan-10 15:32 |
1324 | amacleod | I did not see a draw group | 11-Jan-10 15:32 |
1323 | Geomol | Btw. I don't think, this belongs in this group, as it isn't directly related to AGG. Or did I misunderstood you? | 11-Jan-10 15:31 |
1322 | Geomol | Fast test show, alpha is saved. This could be a new thing in R2 2.7.7, as I seem to remember, this didn't work before!? I did this: i: copy logo.gif i/alpha: 128 save/png %logo.png i It seems, the saved alpha is 1 higher than what I set. I tested with PPC version of R2 2.7.7 under OS X. | 11-Jan-10 15:30 |
1321 | amacleod | png | 11-Jan-10 14:59 |
1320 | amacleod | Is it possible to save a ppng image with transparency (actually translucency)? | 11-Jan-10 14:59 |
1319 | Maxim | don't know really. but in any case, you don't have to use the library to do the rendering... We can always render them using AGG or OpenGL. as long as we have the coordinates. | 22-Sep-09 4:34 |
1318 | BrianH | Aren't most fonts OpenType nowadays? Those use the TrueType methods, afaik. | 22-Sep-09 4:12 |
1317 | BrianH | However, in theory you paid those license fees to Microsoft if you run Windows 7, and to a lesser extent earlier versions. The MPEG4 fees could be thought to be covered by Apple if you run OSX, which includes Quicktime. Don't know the law well enough to know whether the license requires that you use the licensed code, but patents cover the method (the idea), not the code (the implementation). | 22-Sep-09 4:09 |
1316 | Maxim | wrt freetype... only TrueType font rendering has any kind of patent issues... so if you use other type fonts you're ok. | 22-Sep-09 4:07 |
1315 | BrianH | XviD is illegal (where I live) unless you pay the license fees, as is X264 and VLC. | 22-Sep-09 4:03 |
1314 | BrianH | For that matter, DivX (the company) also holds patents that the makers of DVD players that support it have to license. | 22-Sep-09 4:02 |
1313 | BrianH | DivX (aka MPEG4) is patented too, by the MPEG group. | 22-Sep-09 4:00 |
1312 | Maxim | its only in using the byte code directly which is patented, it seems. so you can convert the font metrics and render them other ways... which is what freetype 2 does :-) | 22-Sep-09 3:59 |
1311 | BrianH | The royalties are higher for HD DVD and Bluray, and are held by the same patent holders as the MPEG group. | 22-Sep-09 3:59 |
1310 | shadwolf | not even mentionning the appearance of DivX mpeg 4 and all it's derivated which are patent free | 22-Sep-09 3:58 |
1309 | Maxim | I'm reading about it... but freetype 2 has another render which doesn't use the algorythm... actually the patent is extremely specific allowing people to ignore it properly. | 22-Sep-09 3:58 |
1308 | shadwolf | BrianH yeah mpeg2 was pattented and what it ends too ? the endustry was fed up with it and found 2 new ways to do the tast better without having to pay royal ties (HD DVD and blue ray) | 22-Sep-09 3:58 |
1307 | shadwolf | (don't forget that in vid you could do semi transparent widgets relatively easyly wich is not the case in glut for example...) | 22-Sep-09 3:56 |
1306 | BrianH | Freetype has a compile setting where the patented algorithms aren't used - and then it looks terrible. | 22-Sep-09 3:55 |
1305 | shadwolf | and simulating flat things in a 3D environement as an impact in overall performances of the 3D engine I like the idea to give the 2D task of the GUI to the appropriated 2D library and keeping 3D full ressources for the 3D content and it make the showing more beautyfull too | 22-Sep-09 3:55 |
1304 | Maxim | I know patents suck. | 22-Sep-09 3:55 |
1303 | BrianH | Most decent hinting algorithms are patented. Open source typography libraries are required to suck unless someone pays the licensing fees. Patent law does in fact prevent you from using ideas, legally - that is how patents work. | 22-Sep-09 3:54 |
1302 | shadwolf | brianH ... you know the law ... lol no laws ever forbiden people to use their brains as they wanted | 22-Sep-09 3:52 |
1301 | Maxim | what is the problem with freetype? | 22-Sep-09 3:51 |
1300 | shadwolf | (Glut task is to display and receive events but that's all) ViD has a better way to compose window content | 22-Sep-09 3:50 |
1299 | BrianH | Freetype isn't that great in countries with software patents. | 22-Sep-09 3:50 |
1298 | shadwolf | and that will go one step further than using GLUT wich is a very minimalistic windows manager | 22-Sep-09 3:50 |
1297 | shadwolf | yeah or drawing non image based texts ... most of the time in game text are all fuzzy small et because of the distance with using AGG to draw the text on top of your opengl embeded to VID layer you could at no cost get a stable way to display them | 22-Sep-09 3:49 |
1296 | Maxim | very important for games, for example. | 22-Sep-09 3:46 |
1295 | Maxim | using freetype library directly is also something which would be nice, allowing us to wrap fonts into our applications directly. | 22-Sep-09 3:45 |
1294 | Maxim | yes as you say... an 3D gob using external render should be doable, either OpenGL or other engine. | 22-Sep-09 3:44 |
1293 | shadwolf | so i'm glod to be the only freaks around ^^ | 22-Sep-09 3:42 |
1292 | shadwolf | maxim already said that about linking external grphical library result using image! data type Maxim 20-Aug [10...12] when Carl adds a few little image! enhancements to the extension API, I should be able to use a rebol image! as the interface to get the OpenGL render into rebol, using R3 view. If memcopy works, then it should be VERY fast ( a few hundred images/second AFAICT) yes Geomol did, but the limitations of R2 can't make it native... meaning, you don't have access to the binary part of the data and use it directly within normal datatypes. the goal is to have an OpenGL gob :-) | 22-Sep-09 3:41 |
1291 | shadwolf | maybe a way to solve this and introducing in the area something new could be to map directly events t o draw text idiom. the way you create one and for all a event handler you apply it to the text idiom and any time you use i t in your draw definition then the event mapping is avaible. | 22-Sep-09 3:28 |
1290 | shadwolf | on text without the size of each character you can't simulated a realistic text motionning. This works greatly with fixed font but fixed fonts are not supported on all OSes and they are pretty borring.... fixed font system forbid de coders to propose a font selector to their users in their programs one of the feature all the common text editor have. | 22-Sep-09 3:26 |
1289 | shadwolf | not having to separate the external graphical library from the main graphical library is what all the other widgets library are doing for example QT, wxWindows, TK, Gtk+ have all their own plugin and related object to embed a sub layer to their own window compositing system | 22-Sep-09 3:23 |
1288 | shadwolf | (could be video, or 3D animation etc...) AGG will be just the entring gate and link for those contents | 22-Sep-09 3:20 |
1287 | shadwolf | the idea is to allow then any kind of visual layer to get an embeded acces to a VID window and it's content. we go one stop further then. | 22-Sep-09 3:19 |
1286 | shadwolf | the idea so far is to be able to show anything using a draw pipeline and using events definition native in VID since it's the most accurate way so far to manage events. | 22-Sep-09 3:18 |
1285 | shadwolf | yeah .... events applyed directly on draw elements or draw able to "map" and show directly other graphical organised video layers who be so awsome that way from example what is rendered on sub engine external like opengl one could then be applyed to a regular vid area In one hand you will have an easy way to interface events and on the other hand you can map rendering any kind of sub rendering | 22-Sep-09 3:16 |
1284 | Pekr | CureCode it :-) | 20-Sep-09 11:03 |
1283 | Maxim | and we could extract data FROM the AGG image, like vertice points and stuff like that. | 20-Sep-09 9:53 |
1282 | Steeve | agree | 20-Sep-09 9:52 |
1281 | Maxim | I've been lobbying to have individual control over each draw element by word reference for years... it would make it so much easier to build all graphics apps. | 20-Sep-09 9:40 |
1280 | Maxim | but it should come out of the box... I agree. | 20-Sep-09 9:39 |
1279 | Maxim | so its something you can build using current engines. | 20-Sep-09 9:38 |
1278 | Maxim | my R2 Glob engine does it ;-) | 20-Sep-09 9:38 |
1277 | Steeve | From the CrossGL perspective, application demonstrates:
• Interactions with Hit Testing (buttons) at any angle and scale What is missing in our AGG implementation, capturing events from gobs (?) embedded in a draw design. | 20-Sep-09 9:37 |
1276 | Pekr | Agg spawns some interesting projects: Cross GL - slovak library allowing some interesting things - http://www.crossgl.com/index.html Fog GFX library - CPU instruction optimised AGG "add-on"? library from Czech author (author of AsmBlit and BlitJIT) http://twopixels.blogspot.com/search/label/fog-graphics | 20-Sep-09 9:07 |
1275 | shadwolf | thank you ^^ | 6-Jan-09 21:59 |
1274 | Maxim | yeah really cool :-) | 5-Jan-09 5:22 |
1273 | NickA | Nice guitar notes script :) | 5-Jan-09 4:41 |
1272 | shadwolf | that show how you can input an svg image and use it to draw on top of it using AGG (we can imagine too animation displaying too etc...) | 5-Jan-09 4:28 |
1271 | shadwolf | i done a guitare notes easy learning rebol script using that SVG engine (to save some time) http://shadwolf.free.fr/guitare-manche.zip | 5-Jan-09 4:26 |
1270 | shadwolf | what i like too is that once you get the conversion to draw dialect done you can keep simply the draw instructions instead of the SVG ones ^^ | 5-Jan-09 4:10 |
1269 | shadwolf | since someone was enough kind to write a XML2object script why not reusing it for such a purpose ^^ | 5-Jan-09 4:05 |
1268 | shadwolf | http://shadwolf.free.fr/svg-demo-shad06.r is the lastest version of my SVG engine. Well in fact parse gives me head haches only when i have to parse XML datas ... | 5-Jan-09 4:04 |
1267 | shadwolf | to tell you the truth parse gives me powerfull head haches ^^ so if i can't use it I don't use it ... I know that's bad !! | 5-Jan-09 3:57 |
1266 | shadwolf | well My svg engine is working and got trouble only with matrix calulations due to an odd bug in the adapted version. Next i don't like the way my SVG works I wish to be able to do it in plain parse way (My method in not really elegant but it works fine in most cases SVG is an XML file so the XML data is converted to REBOL objects using parse and then i process those objects to convert into draw/Agg instructions). That was the fastest way i found at that time since what was important to me was the result not the beauty of the processing way. | 5-Jan-09 3:55 |
1265 | Henrik | Sorry, it seems that you are. | 25-Nov-08 8:02 |
1264 | Henrik | Steeve, can you try it also in the public R3 release? | 25-Nov-08 8:01 |
1263 | Steeve | i have no examples, it doesn't work at all | 25-Nov-08 2:26 |
1262 | Henrik | Steeve, if you can make some examples with the matrix command, we can make an entry in the bug tracker. | 22-Nov-08 8:34 |
1261 | Steeve | another question: in the current alpha, the matrix command seems not working like anounced in the wiki, is it normal ? | 22-Nov-08 4:23 |
1260 | Steeve | a set-word! | 22-Nov-08 4:13 |
1259 | Steeve | ...the current offset) | 22-Nov-08 4:13 |
1258 | Steeve | offset: (to get the cur | 22-Nov-08 4:13 |
1257 | Steeve | in fact it would be the same feature than in parsing | 22-Nov-08 4:13 |
1256 | Steeve | i don't know if i'm clear.... | 22-Nov-08 4:06 |
1255 | Steeve | ... to get these coordinates. | 22-Nov-08 4:06 |
1254 | Steeve | ... to get th | 22-Nov-08 4:05 |
1253 | Steeve | but to intercativly move or deform a draw block, i need to construct a serie of handles (gobs) at some calculated points. and so it's currently a tragedy to have to simulate the draw engine to get th | 22-Nov-08 4:05 |
1252 | Steeve | i'm talking about that because i currently try to do a draw editor with R3 (like my old easy-drawer). | 22-Nov-08 4:01 |
1251 | Steeve | i precise: the real offset inside the gob (not the carret) | 22-Nov-08 3:58 |
1250 | Steeve | would be a fantastic feature | 22-Nov-08 3:57 |
1249 | Steeve | i give an example: draw [ text ["test" red :off "red text"]] having the variable off returning the offset between the 2 strings | 22-Nov-08 3:56 |
1248 | Steeve | i have a question related to the futur draw engine. will exist a way to capture the current offset inside a draw block ? | 22-Nov-08 3:54 |
1247 | Anton | It's got some debugging lines still in it, so console will fill up. The demo also has a problem with control of the ellipse - which turns out to be a tough math problem to solve. More difficult than the line/ellipse intersection. Maybe it will take me a week to do... but anyway the demo works well enough for now. | 10-Nov-08 16:58 |
1246 | Anton | load-thru/update http://anton.wildit.net.au/rebol/gfx/intersection-points-of-line-and-ellipse.r do-thru/update http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-line-and-ellipse.r | 10-Nov-08 16:56 |
1245 | Anton | Here's a line and ellipse intersection function: | 10-Nov-08 16:56 |
1244 | Ashley | I had a simple SVG -> Draw script which Shadwolf took and enhanced, but it barfed on more complex SVG's due to some inherent limits in draw ... Shadwolf can tell you exactly what the issues are. If they've already been solved or lessened under v3 then that's great news indeed. | 9-Nov-08 21:48 |
1243 | Henrik | I will leave it up to someone else to make the rest work. :-) It wasn't that hard to get working. | 9-Nov-08 16:12 |
1242 | Henrik | Right now: Only one path at a time and it's monochrome. I'm not sure which path types are supported. You can't load XML files with it, only pure path data. | 9-Nov-08 16:08 |
1241 | Pekr | Henrik - how complex shapes are we able to transform? My friend uses Inkscape to make business card. I wonder if I would be able to get it displayed in draw? :-) | 9-Nov-08 16:05 |
1240 | Henrik | none yet. | 9-Nov-08 16:05 |
1239 | Pekr | Is there any conclusion towards draw enhancements/options? You were discussing quite usefull additions ... | 9-Nov-08 16:01 |
1238 | Henrik | the scaling is the only tricky part. I need to simplify it. | 9-Nov-08 16:01 |
1237 | Pekr | that was easy, heh? :-) | 9-Nov-08 16:00 |
1236 | Henrik | svg-question-mark: to-shape {SVG path} draw: [ scale 0.000002 0.000002 ; for required precision shape svg-question-mark ] | 9-Nov-08 15:58 |
1235 | Henrik | i.e. I don't have to specify the paths inside the DRAW block. | 9-Nov-08 15:57 |
1234 | Henrik | not necessary. DRAW is powerful enough to handle multiple shapes in a fairly simple fashion. | 9-Nov-08 15:56 |
1233 | Pekr | ... something like make-gobs was - combining multiple separate gobs ... hmm, in such a case, we can always use separate gobs (draw type gobs) and combine them, right? | 9-Nov-08 15:56 |
1232 | Henrik | question mark is a separate shape. the background is pure DRAW. | 9-Nov-08 15:55 |
1231 | Pekr | it's all one drawing? Or is question mark separate object/draw shape, which you can e.g. move? | 9-Nov-08 15:55 |
1230 | Henrik | Not optimal, but at least we can allow a bit complicated artwork now. | 9-Nov-08 15:49 |
1229 | Henrik | The questionmark is done in Inkscape, and then I copied its path description into a small parser made in R3 as a string, which converts it to DRAW. | 9-Nov-08 15:46 |
1228 | Pekr | your latest screenshot - is it done in draw manually, or just your attempt to convert SVG? :-) | 9-Nov-08 15:32 |
1227 | Henrik | it works. :-) | 9-Nov-08 14:35 |
1226 | Henrik | I may have figured it out. | 9-Nov-08 13:54 |
1225 | Pekr | That was just an example. If you want to use some existing SVG drawing, you surely want the result to be displayed identically, don't you? But - I know nothing about it, so let's better wait for what those who tried to experiment with SVG conversion will say ... | 9-Nov-08 13:52 |
1224 | Henrik | I don't need gradients. | 9-Nov-08 13:50 |
1223 | Pekr | there were some attempts ... dunno if done by Cyphre or Ashley .... one other thing was to be able to replay Flash shapes. Unfortunately - there are some differences, e.g. in how gradients are being specified. Maybe if we could adapt, we could reuse some Flash stuff? Dunno if it would be worth the changes ... | 9-Nov-08 13:45 |
1222 | Rebolek | Ask Cyphre, he has some converter. | 9-Nov-08 13:39 |
1221 | Henrik | I need a basic function to convert a monochrome SVG drawing to SHAPE. | 9-Nov-08 12:58 |
1220 | Henrik | Did we ever get a successful SVG -> DRAW shape converter? | 9-Nov-08 12:46 |
1219 | Anton | site: http://anton.wildit.net.au/rebol/gfx/ old-file: %intersection-points-of-circle-and-line.r if exists? cache-file: path-thru site/:old-file [delete cache-file] if exists? cache-file: path-thru site/(join %demo- old-file) [delete cache-file] | 8-Nov-08 13:39 |
1218 | Anton | This should clean the old (inferior, and slightly different named) versions out of your cache: | 8-Nov-08 13:39 |
1217 | Anton | load-thru/update http://anton.wildit.net.au/rebol/gfx/intersection-points-of-line-and-circle.r do-thru/update http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-line-and-circle.r | 8-Nov-08 13:33 |
1216 | Anton | Updated and renamed to intersection-points-of-line-and-circle: | 8-Nov-08 13:32 |
1215 | DideC | I do too. But it start being painfull :-p | 30-Oct-08 10:24 |
1214 | Pekr | my search is as follows - I change the sort order, then it is easy to find out, if such group exists, or not :-) | 30-Oct-08 10:09 |
1213 | DideC | (A "Search group name" gadget is missing in this altme world :-) | 30-Oct-08 10:07 |
1212 | DideC | Oups ;-) | 30-Oct-08 10:06 |
1211 | Anton | Yes, I meant Editors group in this Altme world. | 30-Oct-08 0:41 |
1210 | Pekr | DideC: what about Editors group here? :-) | 29-Oct-08 17:28 |
1209 | DideC | I don't see "editors" folder on your rebsite. But there is plenty of folders and scripts there ! | 29-Oct-08 16:47 |
1208 | Anton | DideC, no, not this one. See Editors group. | 29-Oct-08 16:02 |
1207 | DideC | Pekr: not the area-scroll I see in Anton's rebsite (is this the last one ?) Mine does http://www.rebol.org/view-script.r?script=area-scroll-style.r | 29-Oct-08 15:04 |
1206 | Pekr | My non professional guess is, that your area code would need to be rewritten for R3 anyway ... we now have gobs, rich-text, etc. But your area style would be nice to have for R3 GUI. IIIRC your area can scroll, when you hilite text by mouse. | 29-Oct-08 11:06 |
1205 | Anton | Thanks, Pekr. The time is not quite right for me to launch into another edit-panel. I want to make some improvements to the existing one first, to bring it to "workable/useful" status. | 29-Oct-08 10:59 |
1204 | Pekr | Excellent, as always. Anton - don't you want to "volunteer" to do text handling for VID3.4? As per Henrik's words, Carl's VID so far has only basic text handling. And so far, as for REBOL GUI in overall, you text area is the best ... | 29-Oct-08 9:45 |
1203 | Anton | The circle/line intersection function could be used to help connect lines to nodes in a graph (eg. text-boxes with rounded corners, or just circles), and collision detection, both things I'm thinking of using it for. | 29-Oct-08 8:40 |
1202 | Anton | do http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-circle-and-line.r | 29-Oct-08 8:35 |
1201 | Brock | Have looked over your code Anton. There is alot of info I can use from it. Thanks for bringing it to my attention. | 28-Oct-08 4:13 |
1200 | Brock | Thanks Anton, that will be helpful. | 27-Oct-08 5:57 |
1199 | Anton | Brock: do http://anton.wildit.net.au/rebol/gfx/demo-intersection-point-of-two-lines.r | 27-Oct-08 5:50 |
1198 | Brock | Thanks for trying to find something. Maybe it will show up in the next few days. | 27-Oct-08 1:18 |
1197 | Gregg | I remember something too Brock, but can't find it now either. | 26-Oct-08 20:31 |
1196 | Brock | I'd like to see if I can't create a very small, very simple example of a vector drawing program... but would need some place to start as at the moment, I don't have a clue. | 26-Oct-08 18:14 |
1195 | Brock | Are there any demo's that show the manipulation of AGG graphics within a GUI? For example, dragging points of a bezier curve to reshape the line etc? I thought I saw some from either Cypher or the AGG demos done by others. Can anyone point me to them? | 26-Oct-08 18:13 |
1194 | Anton | No problem. | 10-Oct-08 1:01 |
1193 | amacleod | got rid of the append function and just used teh effect on hte creationof the box...no reason to append it. Good eye Anton, thanks | 9-Oct-08 18:18 |
1192 | amacleod | probe 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. | 9-Oct-08 17:59 |
1191 | amacleod | Oh...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. | 9-Oct-08 17:56 |
1190 | amacleod | SHow? 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. | 9-Oct-08 17:49 |
1189 | Anton | then 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). | 9-Oct-08 9:37 |
1188 | Anton | bx: box edge [color: red size: 2x2] with [show?: false] | 9-Oct-08 9:36 |
1187 | Anton | You only need to set the effect once. | 9-Oct-08 9:34 |
1186 | Anton | Are you doing the APPEND more than once ? (the block will grow and grow...) | 9-Oct-08 9:34 |
1185 | amacleod | Got 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... | 9-Oct-08 8:00 |
1184 | Anton | This 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. | 9-Oct-08 7:21 |
1183 | Anton | ; in its pane view layout [h1 "hello" with [pane: make face [offset: 5x5 size: 20x10 effect: [merge luma 90] edge: none]]] | 9-Oct-08 7:17 |
1182 | Anton | If 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). | 9-Oct-08 7:17 |
1181 | amacleod | Above code : ignore the second code example. I hit ctrl-v instead of cntrl-s | 9-Oct-08 7:05 |
1180 | amacleod | DidC, I thought about that but I was appending. I think I was not drawing the box properly. | 9-Oct-08 7:04 |
1179 | amacleod | Can you use alpha channel in vid or only in draw? | 9-Oct-08 7:03 |
1178 | amacleod | Actually 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] | 9-Oct-08 7:02 |
1177 | DideC | Maybe you were inserting in the draw block instead of appending (insert tail) !? | 9-Oct-08 7:02 |
1176 | Anton | Ok, no problem. | 9-Oct-08 6:45 |
1175 | amacleod | I got it working... I do not know what i was doing before but its doing what I need...Thanks | 9-Oct-08 6:45 |
1174 | Anton | That shows the red line drawn behind the face/text, "hello". | 9-Oct-08 6:45 |
1173 | Anton | view layout [box effect [draw [pen red line-width 5 line 0x0 100x100]] "hello"] | 9-Oct-08 6:44 |
1172 | Anton | But anyway, face/text always renders after the face/effect/draw dialect. | 9-Oct-08 6:44 |
1171 | Anton | Each face has an internal image buffer (that we don't have access to directly). This buffer is blanked just before the face redraws itself. | 9-Oct-08 6:42 |
1170 | Anton | You can't really "paint on a face". Faces redraw themselves from their specification every time they are shown. | 9-Oct-08 6:40 |
1169 | amacleod | I'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... | 9-Oct-08 6:31 |
1168 | Anton | So, please show us a small example of what you're doing. | 9-Oct-08 6:27 |
1167 | Anton | face/text rendering is separate to face/effect/draw rendering, and will always be on top. | 9-Oct-08 6:25 |
1166 | Anton | The above example draws the red box first, and the green kite on top of it. | 9-Oct-08 6:22 |
1165 | Anton | view layout [box effect [draw [pen red line-width 2 shape [line 0x0 10x0 10x10 0x10] pen green shape [line 5x0 10x5 5x15 0x5]]]] | 9-Oct-08 6:21 |
1164 | Anton | Can you give a small example, eg: | 9-Oct-08 6:21 |
1163 | amacleod | If 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? | 9-Oct-08 5:53 |
1162 | amacleod | I adding shape objects to a face by appending them to face/effect/draw but the appended shap is beneath the original face shapes. | 9-Oct-08 5:51 |
1161 | ICarii | The 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. | 9-Oct-08 5:08 |
1160 | Brock | In 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. | 9-Oct-08 3:38 |
1159 | amacleod | When 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.. | 9-Oct-08 3:03 |
1158 | ReViewer | I will test it soon, Thanks! | 16-Oct-07 2:26 |
1157 | ICarii | unless of course you are using rotations or scaling :) | 15-Oct-07 7:35 |
1156 | ICarii | as long as you use pen off/none with vectorial the results should still match :) | 15-Oct-07 7:34 |
1155 | Ashley | which is fine as long as you don't use vectorial ;) | 15-Oct-07 7:31 |
1154 | ICarii | all 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 |
1153 | Ashley | I 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 |
1152 | ICarii | size-text will do it. | 14-Oct-07 6:31 |
1151 | btiffin | I 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 |
1150 | ReViewer | Is there a way to know the length in pixels of a text drawn with AGG? | 14-Oct-07 2:46 |
1149 | PhilB | Draw 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.r | 11-Aug-07 5:04 |
1148 | ICarii | coming soon! New onyx styles: field, label, area, check, h1 /h2 / h3. Sample at - http://rebol.mustard.co.nz/new-onyx-styles.png | 25-Jun-07 10:07 |
1147 | Cyphre | ICarii: Cool stuff Henrik: I don't see any problem to render such isometric layout using DRAW. | 16-Jun-07 23:01 |
1146 | ICarii | the dot is me forgetting to put in an empty? check ;) | 15-Jun-07 18:29 |
1145 | Brock | By the way, very nice looking menu. | 15-Jun-07 13:30 |
1144 | Brock | wondering 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 |
1143 | ICarii | yeah - itd be nice to see how it performs on slow computers :) | 15-Jun-07 9:52 |
1142 | Graham | pretty zippy | 15-Jun-07 9:45 |
1141 | ICarii | supports radio, check, standard and menu/submenu elements at the moment. | 15-Jun-07 9:38 |
1140 | ICarii | new 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 |
1138 | Maxim | with your IQ that software should be pretty easy to grasp... if you follow one of the learning tutorials. | 12-Jun-07 2:29 |
1137 | Maxim | if 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 |
1135 | Henrik | reichart, 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 |
1133 | Henrik | ICarii: http://cocoadevcentral.com/images/articles/000086-tigerarc.png <--- is this layout possible? | 11-Jun-07 16:25 |
1132 | Gregg | Very, very cool James. | 11-Jun-07 15:39 |
1131 | Robert | Or a nice & simple ORPG done with RS ;-) | 11-Jun-07 12:02 |
1130 | DaveC | Excellent.. This type of work could be the basis for a Rebol based GIS. Inspirational - thanks! | 11-Jun-07 11:34 |
1129 | PhilB | very nice | 11-Jun-07 11:07 |
1128 | Henrik | beautiful | 11-Jun-07 10:09 |
1127 | ICarii | yet another isometric type world renderer - http://rebol.mustard.co.nz/isometric-world.r | 11-Jun-07 10:03 |
1126 | ICarii | Reb Rings Mini MGV released - see announce. Mouse gestures etc. | 10-Jun-07 6:06 |
1125 | PhilB | It is processor intensive as it is written entirely in Rebol | 10-Jun-07 1:53 |
1124 | PhilB | I haveent optimisec it ..... for smallish numbers of faces you can get good performance .... (I'm no 3D expert) | 10-Jun-07 1:50 |
1123 | ICarii | is the rotation algorithm quite intensive? | 10-Jun-07 1:47 |
1122 | ICarii | i normally use wings3D for the basic shapes then export to subdivide etc | 10-Jun-07 1:46 |
1121 | ICarii | yes - but for 3d tools like wings3D you usually have less than 10000 faces before you export to Maya/Lightwave etc | 10-Jun-07 1:46 |
1120 | PhilB | Most object do contain thousands of faces ... so you dont get great performance. | 10-Jun-07 1:45 |
1119 | PhilB | I 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 |
1118 | ICarii | although OpenGL plugin would simplify that a thousandfold | 10-Jun-07 1:42 |
1117 | ICarii | hmm.. one thing that i would like to do when R3 comes out is to make a rebol 3D model viewer with rotation | 10-Jun-07 1:42 |
1116 | PhilB | On 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 |
1115 | ICarii | :) What sort of performance are you getting Phil? | 10-Jun-07 1:38 |
1114 | PhilB | same surface rotated slightly .... http://farm2.static.flickr.com/1321/537895150_a0e70d54bd_o.png | 10-Jun-07 1:36 |
1113 | PhilB | Not 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.png | 10-Jun-07 1:33 |
1112 | ICarii | ill add scrolling in now - just finished support for non-square terrains | 9-Jun-07 14:53 |
1111 | Dockimbel | Very exciting demo, could you add some terrain scrolling to see how fast we can go with View ? | 9-Jun-07 14:39 |
1110 | ICarii | eventually i'll fix the z-order and make the resources statix rather than dynamic | 9-Jun-07 14:07 |
1109 | ICarii | updated the above links with alpine/mixed/lowland forest :) | 9-Jun-07 14:07 |
1108 | ICarii | it could be - ive got to catch up with geomol re how he wants to do the drawing :) | 9-Jun-07 12:05 |
1107 | Gabriele | is that for the golf game? :) | 9-Jun-07 11:56 |
1106 | ICarii | more 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 |
1105 | Maxim | pretty nonetheless :-) | 9-Jun-07 0:10 |
1104 | Maxim | ah... just read... not 3d rotations... I guess that is part of the reason for speed. | 9-Jun-07 0:10 |
1103 | Maxim | real time !!! wow. | 9-Jun-07 0:09 |
1102 | Gregg | Very nice indeed. | 7-Jun-07 19:44 |
1101 | Louis | Yes, really nice! | 7-Jun-07 18:24 |
1100 | Cyphre | ICarii: very nice terrain rendering ! | 7-Jun-07 12:23 |
1099 | ICarii | guess ill wait for R3 and the vector type | 7-Jun-07 8:29 |
1098 | ICarii | ideally id like to implement real 3D rotations rather than isometrics :( | 7-Jun-07 8:28 |
1097 | ICarii | its realtime on this pc but this is an AMD64 with 2gb ram etc.. | 7-Jun-07 8:28 |
1096 | Maxim | anyhow, its pretty ... is it any fast? | 7-Jun-07 8:27 |
1095 | Maxim | hehe | 7-Jun-07 8:27 |
1094 | ICarii | The alpha is just a nice bonus :) | 7-Jun-07 7:34 |
1093 | ICarii | This 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 |
1092 | ICarii | yeah - 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 |
1091 | Maxim | (terrain rendering?) | 7-Jun-07 7:19 |
1090 | Maxim | wow, did you do that? | 7-Jun-07 7:19 |
1089 | ICarii | map readers etc | 7-Jun-07 4:55 |
1088 | ICarii | heh - ive been toying with converting some old vb6 terrain stuff i did into rebol for a while | 7-Jun-07 4:54 |
1087 | Graham | Is that what your mahjong tiles look like close up?? ;) | 7-Jun-07 4:53 |
1086 | ICarii | bring on R3 and even more speed! :) | 7-Jun-07 4:35 |
1085 | ICarii | the coolness that is AGG/Draw realtime terrain rendering :) http://rebol.mustard.co.nz/terrain.jpg | 7-Jun-07 4:34 |
1084 | ICarii | translation 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 |
1083 | Maxim | yes 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 |
1082 | Cyphre | (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 |
1081 | Cyphre | oops..I meant "only translation" in the last sentence. | 6-Jun-07 12:23 |
1080 | Cyphre | ICarii...we could allow only transformation for the CLIP coords though. | 6-Jun-07 12:22 |
1079 | Cyphre | Anton: 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 |
1078 | Cyphre | transformations 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 |
1077 | Anton | I'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 |
1076 | BrianH | Gobs 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 |
1075 | ICarii | The main use of this would most probably be with translation and rotation operations | 6-Jun-07 4:37 |
1074 | ICarii | For example: draw [translate 40x100 clip 0x0 200x200] ;this actually clips 0x0 200x200 rather than the expected 40x100 240x300 | 6-Jun-07 4:36 |
1073 | ICarii | What are the odds of getting a relative rather than absolute clipping region? | 6-Jun-07 4:34 |
1072 | Pekr | I 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 |
1071 | Pekr | ah, cool! So far first/second best looking menu. Other one coming from someone from France too ... | 4-Jun-07 16:20 |
1070 | Robert | Yes, true. | 4-Jun-07 15:54 |
1069 | Geomol | Nice looking menu! I like the round corners. | 4-Jun-07 15:54 |
1068 | ICarii | size-text is my new friend - that and para/wrap?: off ;-) | 4-Jun-07 15:27 |
1067 | ICarii | A menu generator for AGG - work in progress ;-) http://rebol.mustard.co.nz/menu-wip.png | 4-Jun-07 15:23 |
1066 | ICarii | i suspect it would only be used in image greation programs anyway | 4-Jun-07 13:07 |
1065 | ICarii | but if we get rebcode eventually we can do that in the community | 4-Jun-07 13:07 |
1064 | ICarii | altho you can cheat with alpha for feather borders | 4-Jun-07 13:06 |
1063 | ICarii | very :) | 4-Jun-07 13:05 |
1062 | Gabriele | that gets a bit complicated :) | 4-Jun-07 13:05 |
1061 | ICarii | or introduce a feather border | 4-Jun-07 13:05 |
1060 | ICarii | normally you set a tolerance | 4-Jun-07 13:04 |
1059 | ICarii | paint programs have the same issue | 4-Jun-07 13:04 |
1058 | ICarii | yes | 4-Jun-07 13:04 |
1057 | Gabriele | fill-at - that's a problem with anti-alias | 4-Jun-07 13:04 |
1056 | ICarii | or just adding a fill-at command | 4-Jun-07 13:03 |
1055 | ICarii | moving fill and pen inside the shape block would also be nice to complex shapes | 4-Jun-07 13:03 |
1054 | ICarii | the | 4-Jun-07 13:02 |
1053 | Gabriele | gob/data can be integer, object, block, i think also string/binary | 4-Jun-07 13:02 |
1052 | ICarii | id rather wait a month and have to docs out :) | 4-Jun-07 13:02 |
1051 | Gabriele | :P | 4-Jun-07 13:02 |
1050 | Gabriele | wait a month (less actually... it's 4 already) | 4-Jun-07 13:02 |
1049 | Pekr | hmm, 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 |
1048 | Pekr | how that gob/data points to face/feel/on-click? is there a mezz code in gob/data? | 4-Jun-07 12:58 |
1047 | ICarii | good to know | 4-Jun-07 12:58 |
1046 | Gabriele | but 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 |
1045 | Gabriele | faces are higher level... they have a feel, other info needed for eg for vid, etc. | 4-Jun-07 12:57 |
1044 | ICarii | at 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 |
1043 | Pekr | that 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 |
1042 | Gabriele | gobs are just... graphic objects :) | 4-Jun-07 12:56 |
1041 | Gabriele | exactly. | 4-Jun-07 12:55 |
1040 | ICarii | info.. | 4-Jun-07 12:55 |
1039 | Pekr | "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 |
1038 | ICarii | great ingo on the events Gabriele - that will make networked games much more viable | 4-Jun-07 12:55 |
1037 | Gabriele | :P | 4-Jun-07 12:53 |
1036 | Pekr | it was a joke ;-) | 4-Jun-07 12:53 |
1035 | Pekr | yes, but rebservices will be slow :-) | 4-Jun-07 12:53 |