TimLariviere / Fabulous-new

Fabulous v2 - Work in progress
https://timothelariviere.com/Fabulous-new/
Other
41 stars 3 forks source link

Geometries + Shapes + Widgets + Extensions #82

Closed edgarfgp closed 2 years ago

edgarfgp commented 2 years ago

Geometries + Shapes + Widgets + Extensions This PR add support for :

edgarfgp commented 2 years ago

@TimLariviere This is ready for review

TimLariviere commented 2 years ago

Awesome job! I've tried your changes, and it works perfectly.

Just redefined the builders for the various shapes in order to make them useful and consistent. Now they all take the stroke thickness and stroke brush as mandatory parameters.

Ellipse(10., Brush.Red)
    .size(50., 25.)
    .fill(Brush.Yellow)

Line(Point.Zero, Point(100., 75.), 10., Brush.Aqua)
    .fill(Brush.Yellow)

Polygon([Point.Zero; Point(100., 75.); Point(75., 100.)],  10., Brush.Green)
    .fill(Brush.Yellow)

Rectangle(10., Brush.Chocolate)
    .size(100., 200.)
    .fill(Brush.Yellow)