HAL.Bitmap: Simplify interface with notion of source color
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.
Soft_Drawing_Bitmap: Avoid unnecessary dispatching calls in Fill_Circle
HAL.Bitmap: Simplify interface with notion of source color
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.