Rebol 3 What are the available border effects for r3gui?

I know how to adjust border size inside r3gui:

view [ b: box 800x400 red options [ box-model: 'frame border-size: [4x2 2x4] ] ] 

But how can I create a known border / edge effect from R2 / View using r3gui?

Rebol2 / View example:

 view [ box 800x400 red edge [size: 4x4 effect: 'ibevel color: gray] ] 
+5
source share
1 answer

The ibevel effect is not directly supported in Rebol3. But you can achieve this using the R3-GUI widget style setting using a hand-drawn dialect:

 stylize [ my-box: box [ facets: [ border-colors: [ 65.65.65 191.191.191 ] ] draw: [ line-width 1 fixed pen border-colors/1 fill-pen border-colors/1; polygon border-box/top-left border-box/top-right (as-pair border-box/top-right/x - border-size/2/1 border-box/top-right/y + border-size/1/2) (border-box/top-left + border-size/1) (as-pair border-box/bottom-left/x + border-size/1/1 border-box/bottom-left/y - border-size/2/2) border-box/bottom-left pen border-colors/2 ; fill-pen border-colors/2 polygon border-box/bottom-right border-box/top-right (as-pair border-box/top-right/x - border-size/2/1 border-box/top-right/y + border-size/1/2) (as-pair border-box/bottom-right/x - border-size/2/1 border-box/bottom-right/y - border-size/2/2) (as-pair border-box/bottom-left/x + border-size/1/1 border-box/bottom-left/y - border-size/2/2) border-box/bottom-left ] ] ] view [ my-box 300x300 red options [ border-size: [4x2 2x4] ] my-box 300x300 red options [ border-size: [4x8 12x24] border-colors: [0.0.255 0.255.0] ] ] 
+1
source

All Articles