I know how to adjust the size of the border within r3gui:
view [
b: box 800x400 red options [
box-model: 'frame border-size: [4x2 2x4]
]
]
But how can I make an ibevel border/edge effect known from R2/View with r3gui?
Rebol2/View example:
view [
box 800x400 red edge [size: 4x4 effect: 'ibevel color: gray]
]
The 'ibevel effect is not directly supported in Rebol3. But you should be able to achieve it using R3-GUI widget style customization using draw 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]
]
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With