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.SVG is 25 26 ------------ 27 -- Create -- 28 ------------ 29 30 function Create 31 (Filename : String; 32 Width_In_Point : Gdouble; 33 Height_In_Point : Gdouble) 34 return Cairo_Surface 35 is 36 function C_Internal 37 (Filename : System.Address; 38 W, H : Gdouble) return Cairo_Surface; 39 pragma Import (C, C_Internal, "cairo_svg_surface_create"); 40 41 S : constant String := Filename & ASCII.NUL; 42 begin 43 return C_Internal (S (S'First)'Address, Width_In_Point, Height_In_Point); 44 end Create; 45 46end Cairo.SVG; 47