pharo-graphics / Bloc

Low-level UI infrastructure & framework for Pharo
MIT License
83 stars 40 forks source link

570 does bl line geometry works #607

Closed rvillemeur closed 1 month ago

rvillemeur commented 1 month ago

Fix missing logic. This script shows it's working well

| box element1 element2 |
box := BlElement new
           size: 100 @ 100;
           geometry: BlRectangleGeometry new;
           margin: (BlInsets all: 3);
           padding: (BlInsets all: 3);
           background: Color lightYellow;
           border: (BlBorder paint: Color yellow width: 5).
element1 := BlElement new
                geometry: (BlLineGeometry from: 10 @ 10 to: 90 @ 90);
                size: 100 @ 100;
                background: Color yellow;
                outskirts: BlOutskirts outside;
                border: (BlBorder paint: Color orange width: 5).
element2 := BlElement new
                geometry: (BlLineGeometry from: 10 @ 10 to: 90 @ 90);
                size: 100 @ 100;
                border: (BlBorder builder
                         paint: Color black;
                         width: 2;
                         dashOffset: 0;
                         dashArray: #( 6 4 2 );
                         capButt;
                         build);
                background: Color transparent.

box addChildren: {
        element1.
        element2 }.
^ box

image