This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
drawing_rounded_rectangles [2021/01/26 23:45] richardrussell |
drawing_rounded_rectangles [2021/01/26 23:46] (current) richardrussell |
||
---|---|---|---|
Line 3: | Line 3: | ||
//by Richard Russell, January 2021// | //by Richard Russell, January 2021// | ||
- | Neither //BBC BASIC for Windows// nor //BBC BASIC for SDL 2.0// supports drawing anti-aliased **rounded rectangles** (that is, boxes with radiused corners). Fortunately it is easy enough to decompose that shape into simpler components (straight lines and 90° arcs) which can be drawn using the respective anti-aliased graphics libraries (**gdiplib.bbc** or **aagfxlib.bbc** respectively). | + | Neither //BBC BASIC for Windows// nor //BBC BASIC for SDL 2.0// supports drawing anti-aliased **rounded rectangles** (that is, boxes with radiused corners). Fortunately it is easy enough to decompose that shape into simpler components (straight lines and 90° arcs) which can be drawn using the supplied anti-aliased graphics libraries (**gdiplib.bbc** or **aagfxlib.bbc** respectively). |
- | Here are the two routines. The parameters are the **x and y coordinates** of the bottom left-hand corner, the **width and height**, the corner radius (all in BBC BASIC graphics units), the line **thickness** (pixels) and the **colour**. Note that the colour value has a different format depending on the library, &AARRGGBB for **gdiplib** and &AABBGGRR for **aagfxlib**. | + | Here are the two routines. The parameters are the **x and y coordinates** of the bottom left-hand corner, the **width and height**, the corner **radius** (all in BBC BASIC graphics units), the line **thickness** (pixels) and the **colour**. Note that the colour value has a different format depending on the library, &AARRGGBB for **gdiplib** and &AABBGGRR for **aagfxlib**. |
BB4W version: | BB4W version: |