1. ------------------------------------------------------------------------------ 
  2. --                  GtkAda - Ada95 binding for Gtk+/Gnome                   -- 
  3. --                                                                          -- 
  4. --                     Copyright (C) 2011-2014, 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.  
  24. package Cairo.SVG is 
  25.  
  26.    function Create 
  27.      (Filename        : String; 
  28.       Width_In_Point  : Gdouble; 
  29.       Height_In_Point : Gdouble) return Cairo_Surface; 
  30.    --  Creates a SVG surface of the specified size in points to be written to 
  31.    --  filename. 
  32.    -- 
  33.    --  The SVG surface backend recognizes the following MIME types for the data 
  34.    --  attached to a surface (see Cairo.Surface.Set_Mime_Data) when it is 
  35.    --  used as a source pattern for drawing on this surface: 
  36.    --  CAIRO_MIME_TYPE_JPEG, CAIRO_MIME_TYPE_PNG, CAIRO_MIME_TYPE_URI. If any 
  37.    --  of them is specified, the SVG backend emits a href with the content of 
  38.    --  MIME data instead of a surface snapshot (PNG, Base64-encoded) in the 
  39.    --  corresponding image tag. 
  40.    -- 
  41.    --  The unofficial MIME type CAIRO_MIME_TYPE_URI is examined first. If 
  42.    --  present, the URI is emitted as is: assuring the correctness of URI is 
  43.    --  left to the client code. 
  44.    --  If CAIRO_MIME_TYPE_URI is not present, but CAIRO_MIME_TYPE_JPEG or 
  45.    --  CAIRO_MIME_TYPE_PNG is specified, the corresponding data is 
  46.    --  Base64-encoded and emitted. 
  47.    -- 
  48.    --  filename : 
  49.    --   a filename for the SVG output (must be writable), NULL may be used to 
  50.    --   specify no output. This will generate a SVG surface that may be queried 
  51.    --   and used as a source, without generating a temporary file. 
  52.    --  width_in_points : 
  53.    --   width of the surface, in points (1 point == 1/72.0 inch) 
  54.    --  height_in_points : 
  55.    --   height of the surface, in points (1 point == 1/72.0 inch) 
  56.    --  Returns : 
  57.    --   a pointer to the newly created surface. The caller owns the surface and 
  58.    --   should call Cairo.Surface.Destroy when done with it. This function 
  59.    --   always returns a valid pointer, but it will return a pointer to a "nil" 
  60.    --   surface if an error such as out of memory occurs. You can use 
  61.    --   Cairo.Surface.Status to check for this. 
  62.    -- 
  63.    --  Since 1.2 
  64.  
  65. end Cairo.SVG;