You've already forked Ada_Drivers_Library
mirror of
https://github.com/AdaCore/Ada_Drivers_Library.git
synced 2026-02-12 12:26:55 -08:00
There are two color formats in HAL.Bitmap, the Bitmap_Color (with Alpha, Red, Green, Blue components) and the "native" raw value of the pixel. In the current interface users select a color for each operations (Fill, Draw_Line, Draw_Circle, etc.) which means each operation has to be declared twice, one with a Bitmap_Color and one with native pixel value. Inspired by the Cairo graphics library, this patch add a Set_Source primitive which allows to specify the color that will be use. Each drawing operation then uses this color for rendering. This simplifies the interface since drawing operation only have to be declared once. It may also allow for more advanced sources in the future like gradients or textures.