Class Rsvg

java.lang.Object
org.gnome.rsvg.Rsvg

@Generated("org.javagi.JavaGI") public final class Rsvg extends Object
Constants and functions that are declared in the global Rsvg namespace.
  • Field Details

    • HAVE_CSS

      public static final boolean HAVE_CSS
      See Also:
    • HAVE_PIXBUF

      public static final int HAVE_PIXBUF
      See Also:
    • HAVE_SVGZ

      public static final boolean HAVE_SVGZ
      See Also:
    • MAJOR_VERSION

      public static final int MAJOR_VERSION

      This is a C macro that expands to a number with the major version of librsvg against which your program is compiled.

      For example, for librsvg-2.3.4, the major version is 2.

      C programs can use this as a compile-time check for the required version, but note that generally it is a better idea to do compile-time checks by calling pkg-config in your build scripts.

      Note: for a run-time check on the version of librsvg that your program is running with (e.g. the version which the linker used for your program), or for programs not written in C, use rsvg_major_version instead.

      See Also:
    • MICRO_VERSION

      public static final int MICRO_VERSION

      This is a C macro that expands to a number with the micro version of librsvg against which your program is compiled.

      For example, for librsvg-2.3.4, the micro version is 4.

      C programs can use this as a compile-time check for the required version, but note that generally it is a better idea to do compile-time checks by calling pkg-config in your build scripts.

      Note: for a run-time check on the version of librsvg that your program is running with (e.g. the version which the linker used for your program), or for programs not written in C, use rsvg_micro_version instead.

      See Also:
    • MINOR_VERSION

      public static final int MINOR_VERSION

      This is a C macro that expands to a number with the minor version of librsvg against which your program is compiled.

      For example, for librsvg-2.3.4, the minor version is 3.

      C programs can use this as a compile-time check for the required version, but note that generally it is a better idea to do compile-time checks by calling pkg-config in your build scripts.

      Note: for a run-time check on the version of librsvg that your program is running with (e.g. the version which the linker used for your program), or for programs not written in C, use rsvg_minor_version instead.

      See Also:
    • VERSION

      public static final String VERSION

      This is a C macro that expands to a string with the version of librsvg against which your program is compiled.

      For example, for librsvg-2.3.4, this macro expands to "2.3.4".

      C programs can use this as a compile-time check for the required version, but note that generally it is a better idea to do compile-time checks by calling pkg-config in your build scripts.

      Note: for a run-time check on the version of librsvg that your program is running with (e.g. the version which the linker used for your program), or for programs not written in C, use rsvg_version instead.

      See Also:
  • Constructor Details

    • Rsvg

      public Rsvg()
  • Method Details

    • javagi$ensureInitialized

      public static void javagi$ensureInitialized()
    • cleanup

      @Deprecated public static void cleanup()
      Deprecated.
      No-op. This function should not be called from normal programs.
      This function does nothing.
      Since:
      2.36
    • init

      @Deprecated public static void init()
      Deprecated.
      There is no need to initialize librsvg.
      This function does nothing.
      Since:
      2.9
    • pixbufFromFile

      @Deprecated public static @Nullable Pixbuf pixbufFromFile(String filename) throws GErrorException
      Loads a new GdkPixbuf from filename and returns it. The caller must assume the reference to the reurned pixbuf. If an error occurred, error is set and NULL is returned.
      Parameters:
      filename - A file name
      Returns:
      A pixbuf, or null on error.
      Throws:
      GErrorException - see GError
    • pixbufFromFileAtMaxSize

      @Deprecated public static @Nullable Pixbuf pixbufFromFileAtMaxSize(String filename, int maxWidth, int maxHeight) throws GErrorException
      Loads a new GdkPixbuf from filename and returns it. This pixbuf is uniformly scaled so that the it fits into a rectangle of size max_width * max_height. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set and NULL is returned.
      Parameters:
      filename - A file name
      maxWidth - The requested max width
      maxHeight - The requested max height
      Returns:
      A pixbuf, or null on error.
      Throws:
      GErrorException - see GError
    • pixbufFromFileAtSize

      @Deprecated public static @Nullable Pixbuf pixbufFromFileAtSize(String filename, int width, int height) throws GErrorException
      Loads a new GdkPixbuf from filename and returns it. This pixbuf is scaled from the size indicated to the new size indicated by width and height. If both of these are -1, then the default size of the image being loaded is used. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set and NULL is returned.
      Parameters:
      filename - A file name
      width - The new width, or -1
      height - The new height, or -1
      Returns:
      A pixbuf, or null on error.
      Throws:
      GErrorException - see GError
    • pixbufFromFileAtZoom

      @Deprecated public static @Nullable Pixbuf pixbufFromFileAtZoom(String filename, double xZoom, double yZoom) throws GErrorException
      Loads a new GdkPixbuf from filename and returns it. This pixbuf is scaled from the size indicated by the file by a factor of xZoom and yZoom. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set and NULL is returned.
      Parameters:
      filename - A file name
      xZoom - The horizontal zoom factor
      yZoom - The vertical zoom factor
      Returns:
      A pixbuf, or null on error.
      Throws:
      GErrorException - see GError
    • pixbufFromFileAtZoomWithMax

      @Deprecated public static @Nullable Pixbuf pixbufFromFileAtZoomWithMax(String filename, double xZoom, double yZoom, int maxWidth, int maxHeight) throws GErrorException
      Loads a new GdkPixbuf from filename and returns it. This pixbuf is scaled from the size indicated by the file by a factor of xZoom and yZoom. If the resulting pixbuf would be larger than max_width/max_heigh it is uniformly scaled down to fit in that rectangle. The caller must assume the reference to the returned pixbuf. If an error occurred, error is set and NULL is returned.
      Parameters:
      filename - A file name
      xZoom - The horizontal zoom factor
      yZoom - The vertical zoom factor
      maxWidth - The requested max width
      maxHeight - The requested max height
      Returns:
      A pixbuf, or null on error.
      Throws:
      GErrorException - see GError
    • setDefaultDpi

      @Deprecated public static void setDefaultDpi(double dpi)
      Deprecated.
      This function used to set a global default DPI. However, it only worked if it was called before any Handle objects had been created; it would not work after that. To avoid global mutable state, please use Handle.setDpi(double) instead.
      Do not use this function. Create an Handle and call Handle.setDpi(double) on it instead.
      Parameters:
      dpi - Dots Per Inch (aka Pixels Per Inch)
      Since:
      2.8
    • setDefaultDpiXY

      @Deprecated public static void setDefaultDpiXY(double dpiX, double dpiY)
      Deprecated.
      This function used to set a global default DPI. However, it only worked if it was called before any Handle objects had been created; it would not work after that. To avoid global mutable state, please use Handle.setDpi(double) instead.
      Do not use this function. Create an Handle and call Handle.setDpiXY(double, double) on it instead.
      Parameters:
      dpiX - Dots Per Inch (aka Pixels Per Inch)
      dpiY - Dots Per Inch (aka Pixels Per Inch)
      Since:
      2.8
    • term

      @Deprecated public static void term()
      Deprecated.
      There is no need to de-initialize librsvg.
      This function does nothing.
      Since:
      2.9