AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 4382 |
r3wp | 44224 |
total: | 48606 |
results window for this page: [start: 17701 end: 17800]
world-name: r3wp
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public] | ||
Pekr: 3-May-2009 | mhinson: there is simple rule to how to read TO: skip everything, unless you find the target. This is not what you wanted in your original example, because e.g. TO "b" might also mean, that "b" might be the last char of your string. So if you are looking for FIRST occurance of [a | b | c], you really have to forget TO and use skip based parsing by one char. Hence some [a break | b break | c break | skip] is your friend ... | |
mhinson: 3-May-2009 | assuming the only reference points are "B" and "." | |
Pekr: 3-May-2009 | Look at my explanation above, and try to understand it. After here:, there is going to be "B" matched. So it means, that index is moved past "B". But you want to have your string copied including "B". So by issuing :here, you put parser to the saved position. | |
mhinson: 3-May-2009 | I am not sure why the BREAK is needed in the example from Ladislav above. Is it to force the rule to return true when the "B" and "." matches are found to prevent it carrying on looking for a second match further down the string? | |
Pekr: 4-May-2009 | 'break is needed in Ladislav's code imo because after first match of "B" you want to escape (break from) repetitive 'any block, and continue your processing with furhter rules (which is not the case with Ladislav's example, but is the case with your example, where 'copy followed. If there would be no break, after matching "B", the rule would still succeed, because if there is no "B", then there is always "skip option, which is always valid until the end of the script. So actually without the 'break, this 'any block would 'skip till the end of input string is reached ... | |
Oldes: 4-May-2009 | and or you can use: get-ips2: func[str /local ips ip][ str: parse str none ips: copy [] while [not tail? str] [ error? try [ ip: to-tuple str/1 if 4 = length? ip [append ips ip] ] str: next str ] ips ] | |
Henrik: 7-May-2009 | It's very easy to create prototypes and VID is excellent for that: view layout [ across space 2 box blue 300x300 "List View" box yellow 100x300 "Buttons" return box red 402x24 "OK/Cancel Panel" ] | |
Henrik: 7-May-2009 | Here's some learning by doing: With the above line of code, activate the console and press escape. The event handler is returned to the console. Now you can control the window interactively. Type UNVIEW. | |
Henrik: 7-May-2009 | Then try this line: view layout [b: box green 400x400 f: field] Go back to console and escape. b/color: yellow show b set-face f "hello" get-face f hide f show f That's how you access UI parts. | |
Henrik: 7-May-2009 | If you want to show a window and return to console immediately, use VIEW/NEW instead. | |
mhinson: 7-May-2009 | I have been looking at the library examples & noticed that some of them start off with something like navigator: make object! [ The ones like this dont do anything so I am guessing I need to use this code in a way I have not come across yet. I have been madley trying things like make a: navigator and looking up make in the documentation, but not understanding the answers. | |
Henrik: 7-May-2009 | Try this: context [ a: 2 set 'b 3 set 'c does [return a] ] >> a >> b >> c A simple way to control what's private and public. | |
Sunanda: 7-May-2009 | On the other hand, if you want 'a, 'b, 'c to be local to the context -- so other parts of your application can also have their own 'a. 'b and 'c without overwriting each other: my-api: context [ a: 2 b: 3 c: does [return a + b] ] my-api/a: 5 ;; override default value print my-api/c ;; executes function in context | |
Sunanda: 7-May-2009 | That's the way I do it, using 'context / make object! Some people prefer using blocks rather than objects: blk: [a 4 b 5 c 6] blk/b == 5 blk/b: 99 probe blk == [a 4 b 99 c 6] There are advantages and disadvantages to each approach. | |
Sunanda: 7-May-2009 | And unexpected pot holes :-) | |
Henrik: 7-May-2009 | large parts of the GUI system was written in a very short time by Carl alone back early in this decade and has not been officially upgraded. | |
mhinson: 7-May-2009 | I added an extra string for the title and now get this similar failure >> filenames: request-file/title/filter/path {Select all files to read} {x} [*.txt] %/D/Rebol/X/!conf/ ** Script Error: Invalid argument: *.txt * *.r *.reb *.rip *.txt *.jpg *.gif *.bmp *.png ** Where: request-file ** Near: done: local-request-file data: reduce [tt/text ob/text clean-path where picked filt-names filt-values found? any [only]... | |
Gregg: 11-May-2009 | Large message coming, with examples of showing progress. Note that it uses INCLUDE and FILE-LIST, so adapt accordingly, and let me know if I left any other dependencies in it that cause it not to work. It was quickly hacked from existing code. | |
Gregg: 11-May-2009 | REBOL [] do %include.r include %file-list.r flash-wnd: flash "Finding test files..." if file: request-file/only [ files: read first split-path file ] if none? file [halt] items: collect/only item [ foreach file files [item: reduce [file none]] ] unview/only flash-wnd ;------------------------------------------------------------------------------- ;-- Generic functions call*: func [cmd] [ either find first :call /show [call/show cmd] [call cmd] ] change-each: func [ [throw] "Change each value in the series by applying a function to it" 'word [word!] "Word or block of words to set each time (will be local)" series [series!] "The series to traverse" body [block!] "Block to evaluate. Return value to change current item to." /local do-body ][ do-body: func reduce [[throw] word] body forall series [change/only series do-body series/1] ; The newer FORALL doesn't return the series at the tail like the old one ; did, but it will return the result of the block, which is CHANGE's result, ; so we need to explicitly return the series here. series ] collect: func [ "Collects block evaluations." [throw] 'word block [block!] "Block to evaluate." /into dest [block!] "Where to append results" /only "Insert series results as series" /local fn code marker at-marker? marker* mark replace-marker rules ][ block: copy/deep block dest: any [dest make block! []] fn: func [val] compose [(pick [insert insert/only] not only) tail dest get/any 'val get/any 'val ] code: 'fn marker: to set-word! word at-marker?: does [mark/1 = marker] replace-marker: does [change/part mark code 1] marker*: [mark: set-word! (if at-marker? [replace-marker])] parse block rules: [any [marker* | into rules | skip]] do block head :dest ] edit-file: func [file] [ ;print mold file call* join "notepad.exe " to-local-file file ;join test-file-dir file ] flatten: func [block [any-block!]][ parse block [ any [block: any-block! (change/part block first block 1) :block | skip] ] head block ] logic-to-words: func [block] [ change-each val block [either logic? val [to word! form val] [:val]] ] standardize: func [ "Make sure a block contains standard key-value pairs, using a template block" block [block!] "Block to standardize" template [block!] "Key value template pairs" ][ foreach [key val] template [ if not found? find/skip block key 2 [ repend block [key val] ] ] ] tally: func [ "Counts values in the series; returns a block of [value count] sub-blocks." series [series!] /local result blk ][ result: make block! length? unique series foreach value unique series [repend result [value reduce [value 0]]] foreach value series [ blk: first next find/skip result value 2 blk/2: blk/2 + 1 ] extract next result 2 ] ;------------------------------------------------------------------------------- counts: none refresh: has [i] [ reset-counts i: 0 foreach item items [ i: i + 1 set-status reform ["Testing" mold item/1] item/2: random/only reduce [true false] show main-lst set-face f-prog i / length? items wait .25 ] update-counts set-status mold counts ] reset-counts: does [counts: copy [total 0 passed 0 failed 0]] set-status: func [value] [set-face status form value] update-counts: has [pass-fail] [ counts/total: length? items pass-fail: logic-to-words flatten tally collect res [foreach item items [res: item/2]] ;result (e.g.): [true 2012 false 232] standardize pass-fail [true 0 false 0] counts/passed: pass-fail/true counts/failed: pass-fail/false ] ;--------------------------------------------------------------- main-lst: sld: ; The list and slider faces c-1: ; A face we use for some sizing calculations none ml-cnt: ; Used to track the result list slider value. visible-rows: ; How many result items are visible at one time. 0 lay: layout [ origin 5x5 space 1x0 across style col-hdr text 100 center black mint - 20 text 600 navy bold { This is a sample using file-list and updating progress as files are processed. } return pad 0x10 col-hdr "Result" col-hdr 400 "File" col-hdr 100 return pad -2x0 ; The first block for a LIST specifies the sub-layout of a "row", ; which can be any valid layout, not just a simple "line" of data. ; The SUPPLY block for a list is the code that gets called to display ; data, in this case as the list is scrolled. Here COUNT tells us ; which ~visible~ row data is being requested for. We add that to the ; offset (ML-CNT) set as the slider is moved. INDEX tells us which ; ~face~ in the sub-layout the data is going to. ; COUNT is defined in the list style itself, as a local variable in ; the 'pane function. main-lst: list 607x300 [ across space 1x0 origin 0x0 style cell text 100x20 black mint + 25 center middle c-1: cell cell 400 left cell [edit-file item/1] ] supply [ count: count + ml-cnt item: pick items count face/text: either item [ switch index [ 1 [ face/color: switch item/2 reduce [none [gray] false [red] true [green]] item/2 ] 2 [mold item/1] 3 ["Edit"] ] ] [none] ] sld: scroller 16x298 [ ; use SLIDER for older versions of View if ml-cnt <> (val: to-integer value * subtract length? items visible-rows) [ ml-cnt: val show main-lst ] ] return pad 0x20 f-prog: progress 600x16 return status: text 500 return button 200 "Run" [refresh show lay] pad 200 button "Quit" #"^q" [quit] ] visible-rows: to integer! (main-lst/size/y / c-1/size/y) either visible-rows >= length? items [ sld/step: 0 sld/redrag 1 ][ sld/step: 1 / ((length? items) - visible-rows) sld/redrag (max 1 visible-rows) / length? items ] view lay | |
BrianH: 12-May-2009 | If you need the names, create an object and return that like Henrik says. If you need the values, my method will work. | |
Henrik: 12-May-2009 | when using objects, you will have less maintenance and you have one place where your object contents is defined. imagine if you have 10 different functions that would return blocks (10 block definitions) versus 10 functions that return objects (1 object definition). | |
Janko: 14-May-2009 | aha, that is easier to learn .. I also don't the advanced parsing that oldes gave you example, and I wrote a couple of finished programs that used "normal" parsing as a main featurea | |
Janko: 14-May-2009 | start with easy examples and go forward from that | |
Janko: 14-May-2009 | or if only comma is the problem slap it at the end and be done with it | |
Group: AGG ... to discus new Rebol/View with AGG [web-public] | ||
Cyphre: 18-May-2006 | Another solution is to apply own translation function on the dialect block or generate the dialect block with translated coords from scratch. (this shouldn't be a rocket science and would work with text too) | |
Volker: 18-May-2006 | Regarding text, maybe Graham is right and a graphics-only reverse would help? for diagrams. The current way is a bit complicated, until one gets the trick. | |
Volker: 18-May-2006 | means "apply own translation function on the dialect block". And now that little reversion-math, y: high - y . | |
Henrik: 5-Jun-2006 | which is what I figured you wanted to do. you need to make the text at 0x0, rotate it and then translate it to the position you want | |
Henrik: 5-Jun-2006 | then I got an Amiga and was exposed to the horror that was Amiga Basic. | |
Graham: 5-Jun-2006 | and there's no way to save a graphic state in AGG. | |
Anton: 5-Jun-2006 | What you want to do is set the origin to the centre of your object, then change the angle and translate as you wish. | |
Cyphre: 5-Jun-2006 | The transformation handling is more simmilar to OpenGL in that way. See some OGL docs to get the idea and you will see the benefits. | |
Cyphre: 5-Dec-2006 | Geomol: the SPLINE has currently 3 and more points allowed as it was meant to use more as spline not line but we can change this. | |
Geomol: 5-Dec-2006 | Cyphre, it makes sense to have spline draw a line with only two points in a gfx application, where the user start a line with two points and may continue with more points or may just end the line after only two points. | |
Maxim: 8-Dec-2006 | Cyphre, was has to be done for R3 IMHO is a way for us to probe values, just like a 3d package allows you to get point, edge, curvature info out of transforming and deforming geometry. | |
Maxim: 8-Dec-2006 | although some will argue this is slow, its actually VERY fast, since the slow part is usually the calculation and drawing. once that is resolved, probing is insignificant. | |
Maxim: 8-Dec-2006 | using liquid I am already able to build a draw network, which recycles values and allows multiple elements to cooperate. but I can't get that within each element itself. | |
Cyphre: 11-Dec-2006 | Maxim, there will be some possibility to access/modify the internal representation of DRAW shapes in R3 so you can 'bypass' the DRAW parser and just rerender what is already in the 'pipeline'. This could be handy especially when reusing big and/or complex DRAW shapes etc. | |
Pekr: 11-Dec-2006 | We can assume, Cairo is distributed under LGPL, right? If so, it becomes really incompatible with the GPL. For now I'd suggest you to keep using AGG 2.4, at least until we can come up with a better legal solution. Basically, I want to prevent some commercial monster corporations" from free use of AGG. But I do want the Linux world to keep using it for free. I'm not quite sure how well LGPL protects from uncontrolled free commercial use; if it does, I may re-think and switch to the LGPL. But I'm not willing to keep using totally free, BSD-like licences in future versions. Ideally, I'd like to come up with some kind of a QT-like licensing scheme." | |
Pekr: 11-Dec-2006 | but he also adds: We are working on a legal solution that allows us to prepare special releases of AGG under a commercial license along with GPL. Currently you can keep using AGG 2.4 for free, but I'll stop supporting it soon. We are also working on different fee plans, to make it as flexible as possible. It's hard to tell you concrete values right now, but there won't be anything extraordinary. Depending on the projects and your revenue we can even provide you a free commercial license". We will inform you soon about possible options. McSeem" | |
Volker: 20-Dec-2006 | Does someone have a demo-script with agg-fonts on debian? I have no deep clue how to use 'draws deper features and dont want to spend some hours figuring that out^^ | |
Henrik: 20-Dec-2006 | there is the AGG Draw test in the viewtop. it uses both VID and AGG fonts | |
Cyphre: 27-Feb-2007 | Dockimbel: You have to always specify the TEXT rendering mode. Maybe the text mode could be set by separate command in later versions? The ANTI-ALIAS command works for all vectorial shapes and doesn't affect TEXT in other than vectorial mode. (the docs needs to be fixed in this case) | |
Cyphre: 27-Feb-2007 | Once the Rebol/View code merge will be at the level of View1.3.2 we can add some bugfixes from RAMBO. I'm not sure how much new features would Carl like to add to R2 DRAW but I believe there will be at least improved and enhaced gradient support. What else DRAW changes/features would you like to see in the upcomming R2 releases? | |
Dockimbel: 27-Feb-2007 | I'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 ? | |
Pekr: 27-Feb-2007 | Cyphre - 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 ... | |
Cyphre: 27-Feb-2007 | AGG 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). | |
Maxim: 27-Feb-2007 | clear 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. | |
Maxim: 27-Feb-2007 | the 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. | |
Maxim: 27-Feb-2007 | my 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. | |
Maxim: 27-Feb-2007 | I 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). | |
Maxim: 27-Feb-2007 | for 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. | |
Maxim: 27-Feb-2007 | I 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. | |
Oldes: 27-Feb-2007 | and 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 well | |
Rebolek: 5-Mar-2007 | use 'transform instead. you need center point woith rotation and it's not clear where it is with 'rotate keyword (0x0 probably?) | |
Oldes: 6-Mar-2007 | I 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/ | |
Steeve: 6-Mar-2007 | they could be indexed like scripts, with keywords and other usefull tricks | |
Sunanda: 7-Mar-2007 | 90+% 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. | |
Dockimbel: 20-May-2007 | In 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.33 | |
Dockimbel: 20-May-2007 | Whatever method I use in my DRAW code, I keep having the cumulative effect on TRANSLATE (and also on MATRIX). | |
Dockimbel: 21-May-2007 | PUSH is used the 3rd example I was refering to and doesn't work too, TRANSLATE still cumulates. | |
ICarii: 31-May-2007 | hmm thanks - i often find issues between the docs and the actual builds with argument order | |
ICarii: 31-May-2007 | ive experimented with various values and don't have a clue - please enlighten me :) | |
Gregg: 31-May-2007 | From Cyphre: Yes, the DRAW dialect has FILL-RULE keyword which should work the same as described in the svg documentation. And yes, we need to improve the documentation and maybe even change the arc syntax. Any feedback on this is welcome. BTW the ARC shape command should work according the http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands | |
Pekr: 2-Jun-2007 | I would like our agg command structure to concentrate upon compatibility with SVG, if possible and if it would be benefical to us. E.g. I remember we could not produce compatible gradients ... | |
ICarii: 4-Jun-2007 | is it possible to add viewport rendering into AGG? eg virtual boundary limits - this would save using additional gobs/faces and simplify things a lot | |
ICarii: 4-Jun-2007 | no for clipping on retangular regions.. there is a command for that already and ive missed it havent I? ;) | |
Gabriele: 4-Jun-2007 | eg one face in micro vid has many gobs... and all the events for those gobs go to that face. | |
Gabriele: 4-Jun-2007 | and, it's fast, don't worry :) | |
Gabriele: 4-Jun-2007 | basically... the event gives you the window gob and the offset in it. then there's a native that can map an offset inside the window to the gob it belongs too. so the mezz code just uses that, then maps the gob to the feel, eg via gob/data (user data field) | |
Pekr: 4-Jun-2007 | well, how is feel tied to gob? Is it automatically done, according to gob offset, and even offset? What if there is many gobs under the event offset? Hierarchy applies? Can we have event-transparent gobs? | |
Gabriele: 4-Jun-2007 | or you put an id in gob/data and then use that to do whatever you want | |
Pekr: 4-Jun-2007 | gob 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 :-) | |
Gabriele: 4-Jun-2007 | since 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. :) | |
Pekr: 4-Jun-2007 | 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 .... | |
Gabriele: 4-Jun-2007 | 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 :) | |
ICarii: 4-Jun-2007 | id rather wait a month and have to docs out :) | |
ICarii: 4-Jun-2007 | moving fill and pen inside the shape block would also be nice to complex shapes | |
ICarii: 4-Jun-2007 | size-text is my new friend - that and para/wrap?: off ;-) | |
ICarii: 6-Jun-2007 | The main use of this would most probably be with translation and rotation operations | |
BrianH: 6-Jun-2007 | Gobs can be nested. Each gob's children are located and clipped relative to their parent. That may not help with rotation. | |
Anton: 6-Jun-2007 | 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. | |
ICarii: 6-Jun-2007 | 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 :) | |
ICarii: 7-Jun-2007 | bring on R3 and even more speed! :) | |
ICarii: 7-Jun-2007 | 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 :) | |
ICarii: 7-Jun-2007 | This latest rendering was just a test to see what the triangle speed limits were using a height map and a colour map. | |
ICarii: 7-Jun-2007 | guess ill wait for R3 and the vector type | |
ICarii: 9-Jun-2007 | eventually i'll fix the z-order and make the resources statix rather than dynamic | |
[unknown: 9]: 11-Jun-2007 | 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. | |
ICarii: 15-Jun-2007 | supports radio, check, standard and menu/submenu elements at the moment. | |
PhilB: 11-Aug-2007 | 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 | |
btiffin: 13-Oct-2007 | 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... | |
Ashley: 15-Oct-2007 | I doubt it. size-text expects a face argument and computes size based on face/text, face/font, face/edge and face/para values. | |
ICarii: 9-Oct-2008 | 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. | |
Anton: 9-Oct-2008 | The above example draws the red box first, and the green kite on top of it. | |
Anton: 9-Oct-2008 | face/text rendering is separate to face/effect/draw rendering, and will always be on top. | |
amacleod: 9-Oct-2008 | 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... | |
amacleod: 9-Oct-2008 | 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] | |
amacleod: 9-Oct-2008 | 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... | |
Anton: 9-Oct-2008 | Are you doing the APPEND more than once ? (the block will grow and grow...) |
17701 / 48606 | 1 | 2 | 3 | 4 | 5 | ... | 176 | 177 | [178] | 179 | 180 | ... | 483 | 484 | 485 | 486 | 487 |