Windows alatt már teszteltem is:
...
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls, cairo, cairowin32;
...
TForm1 = class(TForm)
PaintBox1: TPaintBox;
procedure PaintBox1Paint(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
...
procedure TForm1.PaintBox1Paint(Sender: TObject);
var
cs: Pcairo_surface_t;
ct: Pcairo_t;
begin
cs:= cairo_win32_surface_create(PaintBox1.Canvas.Handle);
ct:= cairo_create(cs);
cairo_move_to (ct, 128.0, 25.6);
cairo_line_to (ct, 230.4, 230.4);
cairo_rel_line_to (ct, -102.4, 0.0);
cairo_curve_to (ct, 51.2, 230.4, 51.2, 128.0, 128.0, 128.0);
cairo_close_path (ct);
cairo_move_to (ct, 64.0, 25.6);
cairo_rel_line_to (ct, 51.2, 51.2);
cairo_rel_line_to (ct, -51.2, 51.2);
cairo_rel_line_to (ct, -51.2, -51.2);
cairo_close_path (ct);
cairo_set_line_width (ct, 10.0);
cairo_set_source_rgb (ct, 0, 0, 1);
cairo_fill_preserve (ct);
cairo_set_source_rgb (ct, 0, 0, 0);
cairo_stroke (ct);
cairo_destroy(ct);
cairo_surface_destroy(cs);
end;
Enyenlőre, Linux alatt később.