Home   Archive   Permalink



r3-gui.r3 round/rounded

In r3-gui.r3 lines 119-120 below
    
         line-cap: ['butt | 'square | 'rounded]
         line-join: ['miter | 'miter-bevel | 'round | 'bevel]
    
Is there any real logical reason why cap - rounded & join - round ? I tripped over this and wonder why it is.

posted by:   yoffset       6-Mar-2014/16:40:27-8:00



Perhaps line-join started life with a perfectly round shape, and line-cap was only slightly round-ed? Or maybe someone just had too much coffee at 4am?

posted by:   Nick       7-Mar-2014/21:33:18-8:00



ha ha.
It just seems they should both be one or the other.
Otherwise it's an annoying syntax error waiting to happen.

posted by:   yoffset       7-Mar-2014/23:15:07-8:00



I might as well use this thread for other odd things I find in r3-gui.r3
    
skew - draw command errs, and searching through I find pair! decimal!
    ... and that's probably why.

posted by:   yoffste       27-Mar-2014/1:48:36-7:00



AFAIK The only logical reason for round/rounded was a limitation of word lookup in the dialect used in early R3 alphas. So this looks like a remnant.
    
While looking at the current dialect code this can be fixed ofcourse so the keywords are unified in both commands.
But since this is quite low-pri issue (the keyword difference is precisely documented in the current official R3 DRAW dialect reference doc here: http://www.rebol.com/r3/docs/view/draw-lines.html#section-5 ) it will most probably remain until someone makes a pull request on github with related changes.


posted by:   cyphre       27-Mar-2014/12:41:49-7:00



agreed: round(ed) is low priority
    
skew: does work with a pair

posted by:   yoffset       27-Mar-2014/13:33:55-7:00



oddity:
    
/rgb -we all know what it means
        -technically should be /rgba
        -appears to be a completely undocumented hard-coded refinement
        -so if Rebol3 ever gets main stream popularity, every absolute noob
         working through the examples will trip over this nugget, and
         all ask the same question, "What's this?".

posted by:   yoffset       29-Mar-2014/12:41:26-7:00



http://www.rebol.com/r3/docs/view/draw-setup.html#section-7    
grad-pen    
grad-scale-x
grad-scale-y
    
says two decimals
    
line 444 of your updated r3-gui.r3 says different
    
combine the two as, for example, 1.2x1.7
and it works

posted by:   yoffset       31-Mar-2014/23:05:58-7:00



http://www.rebol.com/r3/docs/view/draw-lines.html#section-9
    
Line Pattern
    
...
line-pattern red 5.0 5.0 ; now it works
...


posted by:   yoffset       31-Mar-2014/23:53:34-7:00



http://www.rebol.com/r3/docs/view/draw-curves.html
    
Arc
    
arc 200x25 100x100 0 90 opened ; now it's right
arc 200x125 100x100 0 135 opened
arc 200x250 100x100 0 180 opened

posted by:   yoffset       1-Apr-2014/0:11:37-7:00



So, as I posted 3 posts earlier, on the grad-pen, grad-scale-x & grad-scale-y condense to a 1x1 pair! and work.
    
I have been able to figure all the conversions to turn
    
grad-pen type mode offset startRng stopRng rot 1x1 clrs
    
into variables and mess with them and plug them back into the expression and make them work, except that one.
    
Line 444 calls for     any [args/pair!/2 1x1]
Line 2132 calls for    pair!
    
Anyone know how to deconstruct and re-construct this?


posted by:   yoffset       5-Apr-2014/3:51:14-7:00



Scratch that last post ( can't do that in this simple forum) .
    
I just remembered you can add pairs, and that solves my problem.

posted by:   yoffset       5-Apr-2014/13:26:16-7:00



So, moving on to the shape sub-commands, I must put in my two cents complaint about shape-arc, although I suspect this is one on the list for overhaul.
    
The angle arg, you would think, would be relative to the angle created from the move/end-point pairs. But no, it seems relative to horizontal. I animated an arc through angle 0-180 on a horizontal base and it behaved as expected, like a half ball of flubbber. When I changed the points from 100x250 300x250 to 100x250 300x300 the arc did not appear until the 29th iteration, which coincides with the almost 30 degree angle created by the change. It also ended at vertical.
Those bumps-on-a-log examples are a lot harder to make than they appear.
I'm going to abandon this and move on to something else.

posted by:   yoffset       6-Apr-2014/23:40:02-7:00



So, about my previous rant, it occurred to me that possibly in theory, one could draw that bumps-on-a-log example horizontal, enclose the whole operation as a code block, and rotate the block. I haven't reboled enough from conventional langs yet to know if, or how precisely, but, a thought.


posted by:   yoffset       7-Apr-2014/1:25:35-7:00



Another graphics command that must be on the list for overhaul -
    
transform - The scale-x scale-y here differs again. Is two separate entries. If decimals are used, takes the largest of the two and scales the piece that amount in both directions. Works as advertised with integers, which is somewhat limiting - means you have to draw really small to get blown up properly proportioned.

posted by:   yoffset       9-Apr-2014/14:04:35-7:00



yoffset, you're at the point that getting onto AltME would probably be helpful. Guys like Cyphre are much more actively involved there (and he's the one who needs to see these posts).

posted by:   Nick       9-Apr-2014/22:21:12-7:00



I've got AltMe installed. Apparently I need an invite to Rebol4.

posted by:   yoffset       9-Apr-2014/23:34:56-7:00



line-pattern
    
line 113 allows logic! arg
    
line 461 dropped the logic! arg
    
That's why line-pattern off errs
( line-pattern false )
    
( I think )

posted by:   yoffset       11-Apr-2014/15:11:16-7:00



yoffset, I asked for someone on AltME to help get an account set up for you.

posted by:   Nick       11-Apr-2014/16:47:37-7:00



yoffset, I'm added you now, but I need an email address to send you login and password information.

posted by:   Henrik       11-Apr-2014/17:17:56-7:00



yoffset, I submitted your email address, and removed it from here. I added a new way here to add new users to AltME (I made a new sticky note for it).

posted by:   Nick       11-Apr-2014/18:45:54-7:00