type Cairo_Context is private;
type Cairo_Surface is private;
type Cairo_Matrix is record Xx : aliased Gdouble; Yx : aliased Gdouble; Xy : aliased Gdouble; Yy : aliased Gdouble; X0 : aliased Gdouble; Y0 : aliased Gdouble; end record;
type Cairo_Matrix_Access is access Cairo_Matrix;
type Cairo_Pattern is private;
type Cairo_Destroy_Func is access procedure (Arg1 : System.Address);
type Cairo_User_Data_Key is record Unused : aliased Gint; end record;
type Cairo_Status is ( Cairo_Status_Success, -- no error has occurred Cairo_Status_No_Memory, -- out of memory Cairo_Status_Invalid_Restore, -- Cairo_Restore called without matching Cairo_Save Cairo_Status_Invalid_Pop_Group, -- no saved group to pop Cairo_Status_No_Current_Point, -- no current point defined Cairo_Status_Invalid_Matrix, -- invalid matrix (not invertible) Cairo_Status_Invalid_Status, -- invalid value for an input Cairo_status Cairo_Status_Null_Pointer, -- NULL pointer Cairo_Status_Invalid_String, -- input string not valid UTF-8 Cairo_Status_Invalid_Path_Data, -- input path data not valid Cairo_Status_Read_Error, -- error while reading from input stream Cairo_Status_Write_Error, -- error while writing to output stream Cairo_Status_Surface_Finished, -- target surface has been finished Cairo_Status_Surface_Type_Mismatch, -- the surface type is not appropriate for the operation Cairo_Status_Pattern_Type_Mismatch, -- the pattern type is not appropriate for the operation Cairo_Status_Invalid_Content, -- invalid value for an input Cairo_content Cairo_Status_Invalid_Format, -- invalid value for an input Cairo_format Cairo_Status_Invalid_Visual, -- invalid value for an input Visual* Cairo_Status_File_Not_Found, -- file not found Cairo_Status_Invalid_Dash, -- invalid value for a dash setting Cairo_Status_Invalid_Dsc_Comment, -- invalid value for a DSC comment (Since 1.2) Cairo_Status_Invalid_Index, -- invalid index passed to getter (Since 1.4) Cairo_Status_Clip_Not_Representable, -- clip region not representable in desired format (Since 1.4) Cairo_Status_Temp_File_Error, -- error creating or writing to a temporary file (Since 1.6) Cairo_Status_Invalid_Stride, -- invalid value for stride (Since 1.6) Cairo_Status_Font_Type_Mismatch, -- the font type is not appropriate for the operation (Since 1.8) Cairo_Status_User_Font_Immutable, -- the user-font is immutable (Since 1.8) Cairo_Status_User_Font_Error, -- error occurred in a user-font callback function (Since 1.8) Cairo_Status_Negative_Count, -- negative number used where it is not allowed (Since 1.8) Cairo_Status_Invalid_Clusters, -- input clusters do not represent the accompanying text and glyph -- array (Since 1.8) Cairo_Status_Invalid_Slant, -- invalid value for an input Cairo_Font_Slant (Since 1.8) Cairo_Status_Invalid_Weight -- invalid value for an input Cairo_Font_Weight (Since 1.8) );
subtype Cairo_Content is Guint;
type Cairo_Operator is (Cairo_Operator_Clear, -- clear destination layer (bounded) Cairo_Operator_Source, -- replace destination layer (bounded) Cairo_Operator_Over, -- draw source layer on top of destination layer (bounded) Cairo_Operator_In, -- draw source where there was destination content (unbounded) Cairo_Operator_Out, -- draw source where there was no destination content (unbounded) Cairo_Operator_Atop, -- draw source on top of destination content and only there Cairo_Operator_Dest, -- ignore the source Cairo_Operator_Dest_Over, -- draw destination on top of source Cairo_Operator_Dest_In, -- leave destination only where there was source content (unbounded) Cairo_Operator_Dest_Out, -- leave destination only where there was no source content Cairo_Operator_Dest_Atop, -- leave destination on top of source content and only there (unbounded) Cairo_Operator_Xor, -- source and destination are shown where there is only one of them Cairo_Operator_Add, -- source and destination layers are accumulated Cairo_Operator_Saturate -- like over, but assuming source and dest are disjoint geometries );
type Cairo_Antialias is ( Cairo_Antialias_Default, -- Use the default antialiasing for the subsystem and target device Cairo_Antialias_None, -- Use a bilevel alpha mask Cairo_Antialias_Gray, -- Perform single-color antialiasing (using shades of gray for black -- text on a white background, for example). Cairo_Antialias_Subpixel -- Perform antialiasing by taking advantage of the order of subpixel -- elements on devices such as LCD panels );
type Cairo_Fill_Rule is (Cairo_Fill_Rule_Winding, -- If the path crosses the ray from left-to-right, counts +1. If the -- path crosses the ray from right to left, counts -1. (Left and right -- are determined from the perspective of looking along the ray from -- the starting point). If the total count is non-zero, the point will -- be filled. Cairo_Fill_Rule_Even_Odd -- Counts the total number of -- intersections, without regard to the orientation of the contour. If -- the total number of intersections is odd, the point will be filled. );
type Cairo_Line_Cap is (Cairo_Line_Cap_Butt, -- start(stop) the line exactly at the start(end) point Cairo_Line_Cap_Round, -- use a round ending, the center of the circle is the end point Cairo_Line_Cap_Square -- use squared ending, the center of the square is the end point );
type Cairo_Line_Join is (Cairo_Line_Join_Miter, -- use a sharp (angled) corner, see Set_Miter_Limit Cairo_Line_Join_Round, -- use a rounded join, the center of the circle is the joint point Cairo_Line_Join_Bevel -- use a cut-off join, the join is cut off at half the line width from -- the joint point );
type Dash_Array is array (Natural range <>) of Gdouble;
type Cairo_Rectangle is record X : aliased Gdouble; Y : aliased Gdouble; Width : aliased Gdouble; Height : aliased Gdouble; end record;
type Cairo_Rectangle_Array is array (Natural) of Cairo_Rectangle;
type Cairo_Rectangle_Array_Access is access all Cairo_Rectangle_Array;
type Cairo_Rectangle_List is record Status : aliased Cairo_Status; Rectangles : Cairo_Rectangle_Array_Access; -- Warning: for efficiency reasons, Rectangles is a direct mapping to -- the C structure. Therefore, there is no bounds checking on this -- array, user needs to make sure only to access data between indexes 0 -- and Num_Rectanges-1. Num_Rectangles : aliased Gint; end record;
type Cairo_Rectangle_List_Access is access all Cairo_Rectangle_List;
type Cairo_Scaled_Font is private;
type Cairo_Font_Face is private;
type Cairo_Glyph is record Index : aliased Gulong; -- Glyph Index in the font. The exact interpretation of the -- glyph index depends on the font technology being used. X : aliased Gdouble; -- The offset in the X direction between the origin used for -- drawing or measuring the string and the origin of this glyph. Y : aliased Gdouble; -- The offset in the Y direction between the origin used for drawing or -- measuring the string and the origin of this glyph. end record;
type Cairo_Text_Cluster is record Num_Bytes : aliased Gint; -- The number of bytes of UTF-8 text covered by cluster Num_Glyphs : aliased Gint; -- The number of glyphs covered by cluster end record;
subtype Cairo_Text_Cluster_Flags is Guint;
type Cairo_Text_Extents is record X_Bearing : aliased Gdouble; -- The horizontal distance from the origin to the -- leftmost part of the glyphs as drawn. Positive if the -- glyphs lie entirely to the right of the origin. Y_Bearing : aliased Gdouble; -- The vertical distance from the origin to the -- topmost part of the glyphs as drawn. Positive only if the -- glyphs lie completely below the origin; will usually be -- negative. Width : aliased Gdouble; -- Width of the glyphs as drawn Height : aliased Gdouble; -- Height of the glyphs as drawn X_Advance : aliased Gdouble; -- Distance to advance in the X direction after drawing these glyphs Y_Advance : aliased Gdouble; -- Distance to advance in the Y direction -- after drawing these glyphs. Will typically be zero except -- for vertical text layout as found in East-Asian languages. end record;
type Cairo_Font_Extents is record Ascent : aliased Gdouble; -- The distance that the font extends above the baseline. -- Note that this is not always exactly equal to the maximum -- of the extents of all the glyphs in the font, but rather -- is picked to express the font designer's intent as to -- how the font should align with elements above it. Descent : aliased Gdouble; -- The distance that the font extends below the baseline. -- This value is positive for typical fonts that include -- portions below the baseline. Note that this is not always -- exactly equal to the maximum of the extents of all the -- glyphs in the font, but rather is picked to express the -- font designer's intent as to how the the font should -- align with elements below it. Height : aliased Gdouble; -- The recommended vertical distance between baselines when -- setting consecutive lines of text with the font. This -- is greater than ascent+descent by a -- quantity known as the line spacing or external leading. When space is -- at a premium, most fonts can be set with only a distance of -- ascent+descent between lines. Max_X_Advance : aliased Gdouble; -- The maximum distance in the X direction that -- the the origin is advanced for any glyph in the font. Max_Y_Advance : aliased Gdouble; -- The maximum distance in the Y direction that -- the the origin is advanced for any glyph in the font. -- this will be zero for normal fonts used for horizontal -- writing. (The scripts of East Asia are sometimes written -- vertically.) end record;
type Cairo_Font_Slant is ( Cairo_Font_Slant_Normal, Cairo_Font_Slant_Italic, Cairo_Font_Slant_Oblique);
type Cairo_Font_Weight is ( Cairo_Font_Weight_Normal, Cairo_Font_Weight_Bold);
type Cairo_Subpixel_Order is (Cairo_Subpixel_Order_Default, -- Use the default subpixel order for the target device Cairo_Subpixel_Order_Rgb, -- Subpixel elements are arranged horizontally with red at the left Cairo_Subpixel_Order_Bgr, -- Subpixel elements are arranged horizontally with blue at the left Cairo_Subpixel_Order_Vrgb, -- Subpixel elements are arranged vertically with red at the top Cairo_Subpixel_Order_Vbgr -- Subpixel elements are arranged vertically with blue at the top );
type Cairo_Hint_Style is (Cairo_Hint_Style_Default, -- Use the default hint style for font backend and target device Cairo_Hint_Style_None, -- Do not hint outlines Cairo_Hint_Style_Slight, -- Hint outlines slightly to improve contrast while retaining good -- fidelity to the original shapes. Cairo_Hint_Style_Medium, -- Hint outlines with medium strength giving a compromise between -- fidelity to the original shapes and contrast Cairo_Hint_Style_Full -- Hint outlines to maximize contrast );
type Cairo_Hint_Metrics is (Cairo_Hint_Metrics_Default, -- Hint metrics in the default manner for the font backend and target -- device Cairo_Hint_Metrics_Off, -- Do not hint font metrics Cairo_Hint_Metrics_On -- Hint font metrics );
type Cairo_Font_Options is private;
type Cairo_Font_Type is (Cairo_Font_Type_Toy, -- The font was created using cairo's toy font api (Since: 1.8) Cairo_Font_Type_Ft, -- The font is of type FreeType Cairo_Font_Type_Win32, -- The font is of type Win32 Cairo_Font_Type_Quartz, -- The font is of type Quartz (Since: 1.6) Cairo_Font_Type_User -- The font was create using cairo's user font api );
type Dash_Array_Access is access all Dash_Array;
type Cairo_Path_Data_Type is (Cairo_Path_Move_To, -- A move-to operation Cairo_Path_Line_To, -- A line-to operation Cairo_Path_Curve_To, -- A curve-to operation Cairo_Path_Close_Path -- A close-path operation );
type Header_Type is record Path_Type : aliased Cairo_Path_Data_Type; Length : aliased Gint; end record;
type Cairo_Path_Data (Discr : Guint := 0) is record case Discr is when 0 => Header : aliased Header_Type; when others => Point : aliased Point_Type; end case; end record;
type Path_Data_Array is array (Natural) of Cairo_Path_Data;
type Path_Data_Array_Access is access all Path_Data_Array;
type Cairo_Path is record Status : aliased Cairo_Status; Data : Path_Data_Array_Access; -- Warning: for efficiency reasons, Data is a direct mapping to the C -- structure. Therefore, there is no bounds checking on this array, -- the user needs to make sure only to access data between indexes -- 0 and Num_Data-1. Num_Data : aliased Gint; end record;
type Cairo_Path_Access is access all Cairo_Path;
Cairo_Content_Color : constant Cairo_Content := 4096;
Cairo_Content_Alpha : constant Cairo_Content := 8192;
Cairo_Content_Color_Alpha : constant Cairo_Content := 12288;
No_Dashes : constant Dash_Array (1 .. 0) := (others => 0.0);
Cairo_Text_Cluster_Flag_Backward : constant Cairo_Text_Cluster_Flags := 1;
Null_Context : constant Cairo_Context;
Null_Surface : constant Cairo_Surface;
Null_Pattern : constant Cairo_Pattern;
Null_Scaled_Font : constant Cairo_Scaled_Font;
Null_Font_Face : constant Cairo_Font_Face;
Null_Font_Options : constant Cairo_Font_Options;
procedure Unchecked_Free is new Ada.Unchecked_Deallocation
| ( | Cairo_Matrix, Cairo_Matrix_Access); |
function Create
| ( | Target | : Cairo_Surface) return Cairo_Context; |
function Reference
| ( | Cr | : Cairo_Context) return Cairo_Context; |
procedure Destroy
| ( | Cr | : Cairo_Context); |
function Get_Reference_Count
| ( | Cr | : Cairo_Context) return Guint; |
function Get_User_Data
| ( | Cr | : Cairo_Context; |
| Key | : access Cairo_User_Data_Key) return System.Address; |
function Set_User_Data
| ( | Cr | : Cairo_Context; |
| Key | : access Cairo_User_Data_Key; | |
| User_Data | : System.Address; | |
| Destroy | : Cairo_Destroy_Func) return Cairo_Status; |
procedure Save
| ( | Cr | : Cairo_Context); |
procedure Restore
| ( | Cr | : Cairo_Context); |
procedure Push_Group
| ( | Cr | : Cairo_Context); |
procedure Push_Group_With_Content
| ( | Cr | : Cairo_Context; |
| Content | : Cairo_Content); |
function Pop_Group
| ( | Cr | : Cairo_Context) return Cairo_Pattern; |
procedure Pop_Group_To_Source
| ( | Cr | : Cairo_Context); |
procedure Set_Operator
| ( | Cr | : Cairo_Context; |
| Op | : Cairo_Operator); |
procedure Set_Source
| ( | Cr | : Cairo_Context; |
| Source | : Cairo_Pattern); |
procedure Set_Source_Rgb
| ( | Cr | : Cairo_Context; |
| Red | : Gdouble; | |
| Green | : Gdouble; | |
| Blue | : Gdouble); |
procedure Set_Source_Rgba
| ( | Cr | : Cairo_Context; |
| Red | : Gdouble; | |
| Green | : Gdouble; | |
| Blue | : Gdouble; | |
| Alpha | : Gdouble); |
procedure Set_Source_Surface
| ( | Cr | : Cairo_Context; |
| Surface | : Cairo_Surface; | |
| X | : Gdouble; | |
| Y | : Gdouble); |
procedure Set_Tolerance
| ( | Cr | : Cairo_Context; |
| Tolerance | : Gdouble); |
procedure Set_Antialias
| ( | Cr | : Cairo_Context; |
| Antialias | : Cairo_Antialias); |
procedure Set_Fill_Rule
| ( | Cr | : Cairo_Context; |
| Fill_Rule | : Cairo_Fill_Rule); |
procedure Set_Line_Width
| ( | Cr | : Cairo_Context; |
| Width | : Gdouble); |
procedure Set_Line_Cap
| ( | Cr | : Cairo_Context; |
| Line_Cap | : Cairo_Line_Cap); |
procedure Set_Line_Join
| ( | Cr | : Cairo_Context; |
| Line_Join | : Cairo_Line_Join); |
procedure Set_Dash
| ( | Cr | : Cairo_Context; |
| Dashes | : Dash_Array; | |
| Offset | : Gdouble); |
procedure Set_Miter_Limit
| ( | Cr | : Cairo_Context; |
| Limit | : Gdouble); |
procedure Translate
| ( | Cr | : Cairo_Context; |
| Tx | : Gdouble; | |
| Ty | : Gdouble); |
procedure Scale
| ( | Cr | : Cairo_Context; |
| Sx | : Gdouble; | |
| Sy | : Gdouble); |
procedure Rotate
| ( | Cr | : Cairo_Context; |
| Angle | : Gdouble); |
procedure Transform
| ( | Cr | : Cairo_Context; |
| Matrix | : access Cairo_Matrix); |
procedure Set_Matrix
| ( | Cr | : Cairo_Context; |
| Matrix | : access Cairo_Matrix); |
procedure Identity_Matrix
| ( | Cr | : Cairo_Context); |
procedure User_To_Device
| ( | Cr | : Cairo_Context; |
| X | : access Gdouble; | |
| Y | : access Gdouble); |
procedure User_To_Device_Distance
| ( | Cr | : Cairo_Context; |
| Dx | : access Gdouble; | |
| Dy | : access Gdouble); |
procedure Device_To_User
| ( | Cr | : Cairo_Context; |
| X | : access Gdouble; | |
| Y | : access Gdouble); |
procedure Device_To_User_Distance
| ( | Cr | : Cairo_Context; |
| Dx | : access Gdouble; | |
| Dy | : access Gdouble); |
procedure New_Path
| ( | Cr | : Cairo_Context); |
procedure Move_To
| ( | Cr | : Cairo_Context; |
| X | : Gdouble; | |
| Y | : Gdouble); |
procedure New_Sub_Path
| ( | Cr | : Cairo_Context); |
procedure Line_To
| ( | Cr | : Cairo_Context; |
| X | : Gdouble; | |
| Y | : Gdouble); |
procedure Curve_To
| ( | Cr | : Cairo_Context; |
| X1 | : Gdouble; | |
| Y1 | : Gdouble; | |
| X2 | : Gdouble; | |
| Y2 | : Gdouble; | |
| X3 | : Gdouble; | |
| Y3 | : Gdouble); |
procedure Arc
| ( | Cr | : Cairo_Context; |
| Xc | : Gdouble; | |
| Yc | : Gdouble; | |
| Radius | : Gdouble; | |
| Angle1 | : Gdouble; | |
| Angle2 | : Gdouble); |
procedure Arc_Negative
| ( | Cr | : Cairo_Context; |
| Xc | : Gdouble; | |
| Yc | : Gdouble; | |
| Radius | : Gdouble; | |
| Angle1 | : Gdouble; | |
| Angle2 | : Gdouble); |
procedure Rel_Move_To
| ( | Cr | : Cairo_Context; |
| Dx | : Gdouble; | |
| Dy | : Gdouble); |
procedure Rel_Line_To
| ( | Cr | : Cairo_Context; |
| Dx | : Gdouble; | |
| Dy | : Gdouble); |
procedure Rel_Curve_To
| ( | Cr | : Cairo_Context; |
| Dx1 | : Gdouble; | |
| Dy1 | : Gdouble; | |
| Dx2 | : Gdouble; | |
| Dy2 | : Gdouble; | |
| Dx3 | : Gdouble; | |
| Dy3 | : Gdouble); |
procedure Rectangle
| ( | Cr | : Cairo_Context; |
| X | : Gdouble; | |
| Y | : Gdouble; | |
| Width | : Gdouble; | |
| Height | : Gdouble); |
procedure Close_Path
| ( | Cr | : Cairo_Context); |
procedure Path_Extents
| ( | Cr | : Cairo_Context; |
| X1 | : access Gdouble; | |
| Y1 | : access Gdouble; | |
| X2 | : access Gdouble; | |
| Y2 | : access Gdouble); |
procedure Paint
| ( | Cr | : Cairo_Context); |
procedure Paint_With_Alpha
| ( | Cr | : Cairo_Context; |
| Alpha | : Gdouble); |
procedure Mask
| ( | Cr | : Cairo_Context; |
| Pattern | : Cairo_Pattern); |
procedure Mask_Surface
| ( | Cr | : Cairo_Context; |
| Surface | : Cairo_Surface; | |
| Surface_X | : Gdouble; | |
| Surface_Y | : Gdouble); |
procedure Stroke
| ( | Cr | : Cairo_Context); |
procedure Stroke_Preserve
| ( | Cr | : Cairo_Context); |
procedure Fill
| ( | Cr | : Cairo_Context); |
procedure Fill_Preserve
| ( | Cr | : Cairo_Context); |
procedure Copy_Page
| ( | Cr | : Cairo_Context); |
procedure Show_Page
| ( | Cr | : Cairo_Context); |
function In_Stroke
| ( | Cr | : Cairo_Context; |
| X | : Gdouble; | |
| Y | : Gdouble) return Cairo_Bool; |
function In_Fill
| ( | Cr | : Cairo_Context; |
| X | : Gdouble; | |
| Y | : Gdouble) return Cairo_Bool; |
procedure Stroke_Extents
| ( | Cr | : Cairo_Context; |
| X1 | : access Gdouble; | |
| Y1 | : access Gdouble; | |
| X2 | : access Gdouble; | |
| Y2 | : access Gdouble); |
procedure Fill_Extents
| ( | Cr | : Cairo_Context; |
| X1 | : access Gdouble; | |
| Y1 | : access Gdouble; | |
| X2 | : access Gdouble; | |
| Y2 | : access Gdouble); |
procedure Reset_Clip
| ( | Cr | : Cairo_Context); |
procedure Clip
| ( | Cr | : Cairo_Context); |
procedure Clip_Preserve
| ( | Cr | : Cairo_Context); |
procedure Clip_Extents
| ( | Cr | : Cairo_Context; |
| X1 | : access Gdouble; | |
| Y1 | : access Gdouble; | |
| X2 | : access Gdouble; | |
| Y2 | : access Gdouble); |
function Copy_Clip_Rectangle_List
| ( | Cr | : Cairo_Context) return Cairo_Rectangle_List_Access; |
procedure Rectangle_List_Destroy
| ( | Rectangle_List | : access Cairo_Rectangle_List); |
procedure Select_Font_Face
| ( | Cr | : Cairo_Context; |
| Family | : String; | |
| Slant | : Cairo_Font_Slant; | |
| Weight | : Cairo_Font_Weight); |
procedure Set_Font_Size
| ( | Cr | : Cairo_Context; |
| Size | : Gdouble); |
procedure Set_Font_Matrix
| ( | Cr | : Cairo_Context; |
| Matrix | : access Cairo_Matrix); |
procedure Get_Font_Matrix
| ( | Cr | : Cairo_Context; |
| Matrix | : access Cairo_Matrix); |
procedure Set_Font_Options
| ( | Cr | : Cairo_Context; |
| Options | : Cairo_Font_Options); |
procedure Get_Font_Options
| ( | Cr | : Cairo_Context; |
| Options | : Cairo_Font_Options); |
procedure Set_Font_Face
| ( | Cr | : Cairo_Context; |
| Font_Face | : Cairo_Font_Face); |
function Get_Font_Face
| ( | Cr | : Cairo_Context) return Cairo_Font_Face; |
procedure Set_Scaled_Font
| ( | Cr | : Cairo_Context; |
| Scaled_Font | : access Cairo_Scaled_Font); |
function Get_Scaled_Font
| ( | Cr | : Cairo_Context) return Cairo_Scaled_Font; |
procedure Show_Text
| ( | Cr | : Cairo_Context; |
| Utf8 | : String); |
procedure Show_Glyphs
| ( | Cr | : Cairo_Context; |
| Glyphs | : access Cairo_Glyph; | |
| Num_Glyphs | : Gint); |
procedure Text_Path
| ( | Cr | : Cairo_Context; |
| Utf8 | : String); |
procedure Text_Extents
| ( | Cr | : Cairo_Context; |
| Utf8 | : Interfaces.C.Strings.chars_ptr; | |
| Extents | : access Cairo_Text_Extents); |
procedure Glyph_Extents
| ( | Cr | : Cairo_Context; |
| Glyphs | : access Cairo_Glyph; | |
| Num_Glyphs | : Gint; | |
| Extents | : access Cairo_Text_Extents); |
procedure Font_Extents
| ( | Cr | : Cairo_Context; |
| Extents | : access Cairo_Font_Extents); |
function Get_Operator
| ( | Cr | : Cairo_Context) return Cairo_Operator; |
function Get_Source
| ( | Cr | : Cairo_Context) return Cairo_Pattern; |
function Get_Tolerance
| ( | Cr | : Cairo_Context) return Gdouble; |
function Get_Antialias
| ( | Cr | : Cairo_Context) return Cairo_Antialias; |
function Has_Current_Point
| ( | Cr | : Cairo_Context) return Cairo_Bool; |
procedure Get_Current_Point
| ( | Cr | : Cairo_Context; |
| X | : access Gdouble; | |
| Y | : access Gdouble); |
function Get_Fill_Rule
| ( | Cr | : Cairo_Context) return Cairo_Fill_Rule; |
function Get_Line_Width
| ( | Cr | : Cairo_Context) return Gdouble; |
function Get_Line_Cap
| ( | Cr | : Cairo_Context) return Cairo_Line_Cap; |
function Get_Line_Join
| ( | Cr | : Cairo_Context) return Cairo_Line_Join; |
function Get_Miter_Limit
| ( | Cr | : Cairo_Context) return Gdouble; |
function Get_Dash_Count
| ( | Cr | : Cairo_Context) return Gint; |
procedure Get_Dash
| ( | Cr | : Cairo_Context; |
| Dashes | : out Dash_Array_Access; | |
| Offset | : out Gdouble); |
procedure Get_Matrix
| ( | Cr | : Cairo_Context; |
| Matrix | : access Cairo_Matrix); |
function Get_Target
| ( | Cr | : Cairo_Context) return Cairo_Surface; |
function Get_Group_Target
| ( | Cr | : Cairo_Context) return Cairo_Surface; |
function Copy_Path
| ( | Cr | : Cairo_Context) return Cairo_Path_Access; |
function Copy_Path_Flat
| ( | Cr | : Cairo_Context) return Cairo_Path_Access; |
procedure Append_Path
| ( | Cr | : Cairo_Context; |
| Path | : access Cairo_Path); |
procedure Path_Destroy
| ( | Path | : access Cairo_Path); |
function Status
| ( | Cr | : Cairo_Context) return Cairo_Status; |
Bindings to the Cairo 2D graphics library.
The Cairo_Context is the main object used when drawing with cairo. To draw with Cairo, you create a Context, set the target surface, and drawing options for the Cairo_Context, create shapes with functions like Move_To and Line_To, and then draw shapes with Stroke or Fill.
All drawing in Cairo is done on a Cairo_Context.
Drawing on on-screen Gtk widgets should be done in a callback to the "expose" event: When the widget has been created, connect a drawing function:
In addition to drawing on on-screen widgets, drawing can also be done using the same Cairo calls to pixbufs (see Gdk.Cairo) to memory (see Cairo.Image_Surface), and to PNG files (see Cairo.Png).
Code samples demonstrating how to use various functionalities of Cairo can be found in the testcairo example, shipped with GtkAda.
Binding from C File version 1.8.8