World: r3wp
[AGG] to discus new Rebol/View with AGG
older newer | first last |
amacleod 9-Oct-2008 [1185] | 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 [1186x4] | Are you doing the APPEND more than once ? (the block will grow and grow...) |
You only need to set the effect once. | |
bx: box edge [color: red size: 2x2] with [show?: false] | |
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). | |
amacleod 9-Oct-2008 [1190x4] | 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. |
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. | |
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. | |
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 | |
Anton 9-Oct-2008 [1194] | No problem. |
Brock 26-Oct-2008 [1195x2] | 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? |
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. | |
Gregg 26-Oct-2008 [1197] | I remember something too Brock, but can't find it now either. |
Brock 26-Oct-2008 [1198] | Thanks for trying to find something. Maybe it will show up in the next few days. |
Anton 27-Oct-2008 [1199] | Brock: do http://anton.wildit.net.au/rebol/gfx/demo-intersection-point-of-two-lines.r |
Brock 27-Oct-2008 [1200] | Thanks Anton, that will be helpful. |
Brock 28-Oct-2008 [1201] | Have looked over your code Anton. There is alot of info I can use from it. Thanks for bringing it to my attention. |
Anton 29-Oct-2008 [1202x2] | do http://anton.wildit.net.au/rebol/gfx/demo-intersection-points-of-circle-and-line.r |
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. | |
Pekr 29-Oct-2008 [1204] | 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 ... |
Anton 29-Oct-2008 [1205] | 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. |
Pekr 29-Oct-2008 [1206] | 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. |
DideC 29-Oct-2008 [1207] | 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 |
Anton 29-Oct-2008 [1208] | DideC, no, not this one. See Editors group. |
DideC 29-Oct-2008 [1209] | I don't see "editors" folder on your rebsite. But there is plenty of folders and scripts there ! |
Pekr 29-Oct-2008 [1210] | DideC: what about Editors group here? :-) |
Anton 29-Oct-2008 [1211] | Yes, I meant Editors group in this Altme world. |
DideC 30-Oct-2008 [1212x2] | Oups ;-) |
(A "Search group name" gadget is missing in this altme world :-) | |
Pekr 30-Oct-2008 [1214] | my search is as follows - I change the sort order, then it is easy to find out, if such group exists, or not :-) |
DideC 30-Oct-2008 [1215] | I do too. But it start being painfull :-p |
Anton 8-Nov-2008 [1216x4] | Updated and renamed to intersection-points-of-line-and-circle: |
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 | |
This should clean the old (inferior, and slightly different named) versions out of your cache: | |
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] | |
Henrik 9-Nov-2008 [1220x2] | Did we ever get a successful SVG -> DRAW shape converter? |
I need a basic function to convert a monochrome SVG drawing to SHAPE. | |
Rebolek 9-Nov-2008 [1222] | Ask Cyphre, he has some converter. |
Pekr 9-Nov-2008 [1223] | 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 ... |
Henrik 9-Nov-2008 [1224] | I don't need gradients. |
Pekr 9-Nov-2008 [1225] | 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 ... |
Henrik 9-Nov-2008 [1226x2] | I may have figured it out. |
it works. :-) | |
Pekr 9-Nov-2008 [1228] | your latest screenshot - is it done in draw manually, or just your attempt to convert SVG? :-) |
Henrik 9-Nov-2008 [1229x2] | 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. |
Not optimal, but at least we can allow a bit complicated artwork now. | |
Pekr 9-Nov-2008 [1231] | it's all one drawing? Or is question mark separate object/draw shape, which you can e.g. move? |
Henrik 9-Nov-2008 [1232] | question mark is a separate shape. the background is pure DRAW. |
Pekr 9-Nov-2008 [1233] | ... 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? |
Henrik 9-Nov-2008 [1234] | not necessary. DRAW is powerful enough to handle multiple shapes in a fairly simple fashion. |
older newer | first last |