1------------------------------------------------------------------------------ 2-- GtkAda - Ada95 binding for Gtk+/Gnome -- 3-- -- 4-- Copyright (C) 2011-2015, AdaCore -- 5-- -- 6-- This library is free software; you can redistribute it and/or modify it -- 7-- under terms of the GNU General Public License as published by the Free -- 8-- Software Foundation; either version 3, or (at your option) any later -- 9-- version. This library is distributed in the hope that it will be useful, -- 10-- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- 11-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- 12-- -- 13-- As a special exception under Section 7 of GPL version 3, you are granted -- 14-- additional permissions described in the GCC Runtime Library Exception, -- 15-- version 3.1, as published by the Free Software Foundation. -- 16-- -- 17-- You should have received a copy of the GNU General Public License and -- 18-- a copy of the GCC Runtime Library Exception along with this program; -- 19-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- 20-- <http://www.gnu.org/licenses/>. -- 21-- -- 22------------------------------------------------------------------------------ 23 24package body Cairo.PDF is 25 26 ------------ 27 -- Create -- 28 ------------ 29 30 function Create 31 (Filename : String; 32 Width_In_Points : Gdouble; 33 Height_In_Points : Gdouble) 34 return Cairo_Surface 35 is 36 function Internal 37 (Filename : System.Address; W, H : Gdouble) return Cairo_Surface; 38 pragma Import (C, Internal, "cairo_pdf_surface_create"); 39 C_Str : constant String := Filename & ASCII.NUL; 40 begin 41 return Internal 42 (C_Str (C_Str'First)'Address, Width_In_Points, Height_In_Points); 43 end Create; 44 45end Cairo.PDF; 46