diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2024-02-25 20:00:47 +1300 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2024-02-25 20:00:47 +1300 |
commit | de0f3b8bbb85d9c5d5a226e761f658ee2e0d697b (patch) | |
tree | fecfd0531034728171a03759171786e31cde4a02 /src/fltk-draw.ads | |
parent | 488a3e149307d09b76e954a4d60e19c5d300cbf1 (diff) |
A few more Fl_Draw functions bound
Diffstat (limited to 'src/fltk-draw.ads')
-rw-r--r-- | src/fltk-draw.ads | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/src/fltk-draw.ads b/src/fltk-draw.ads index 004463a..b4e14ee 100644 --- a/src/fltk-draw.ads +++ b/src/fltk-draw.ads @@ -43,13 +43,17 @@ package FLTK.Draw is Empty_Dashes : constant Dash_Gap_Array (1 .. 0) := (others => (1, 1)); - type Text_Draw_Function is access procedure - (X, Y : in Integer; - Text : in String); + type Image_Draw_Function is access procedure + (X, Y : in Natural; + Data : out Color_Component_Array); type Symbol_Draw_Function is access procedure (Hue : in Color); + type Text_Draw_Function is access procedure + (X, Y : in Integer; + Text : in String); + type Area_Draw_Function is access procedure (X, Y, W, H : in Integer); @@ -255,6 +259,48 @@ package FLTK.Draw is + --------------------- + -- Image Drawing -- + --------------------- + + procedure Draw_Image + (X, Y, W, H : in Integer; + Data : in Color_Component_Array; + Depth : in Positive := 3; + Line_Data : in Natural := 0; + Flip_Horizontal : in Boolean := False; + Flip_Vertical : in Boolean := False); + + procedure Draw_Image + (X, Y, W, H : in Integer; + Callback : in Image_Draw_Function; + Depth : in Positive := 3); + + procedure Draw_Image_Mono + (X, Y, W, H : in Integer; + Data : in Color_Component_Array; + Depth : in Positive := 1; + Line_Data : in Natural := 0; + Flip_Horizontal : Boolean := False; + Flip_Vertical : Boolean := False); + + procedure Draw_Image_Mono + (X, Y, W, H : in Integer; + Callback : in Image_Draw_Function; + Depth : in Positive := 1); + + function Read_Image + (X, Y, W, H : in Integer; + Alpha : in Integer := 0) + return Color_Component_Array + with Post => + (if Alpha = 0 + then Read_Image'Result'Length = W * H * 3 + else Read_Image'Result'Length = W * H * 4); + + + + ----------------------- -- Special Drawing -- ----------------------- |