Module: Rsvg
- Defined in:
- lib/rsvg2/handle.rb,
lib/rsvg2.rb,
lib/rsvg2/loader.rb,
lib/rsvg2/version.rb,
lib/rsvg2/dimension-data.rb
Overview
Copyright (C) 2017 Ruby-GNOME2 Project Team
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Defined Under Namespace
Modules: Error, HandleFlags, Unit, Version Classes: DimensionData, Handle, Loader
Constant Summary collapse
- 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_versioninstead. 2- 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_versioninstead. 0- 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_versioninstead. 58- 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_versioninstead. 2.58.0
- LOG_DOMAIN =
"librsvg"
Instance Method Summary collapse
-
#cleanup ⇒ nil
This function does nothing.
-
#default_dpi=(dpi) ⇒ nil
Do not use this function.
-
#error_quark ⇒ GLib::Quark
The error domain for RSVG.
-
#init ⇒ nil
This function does nothing.
-
#pixbuf_from_file(filename) ⇒ GdkPixbuf::Pixbuf
Loads a new
GdkPixbuffrom filename and returns it. -
#pixbuf_from_file_at_max_size(filename, max_width, max_height) ⇒ GdkPixbuf::Pixbuf
Loads a new
GdkPixbuffrom filename and returns it. -
#pixbuf_from_file_at_size(filename, width, height) ⇒ GdkPixbuf::Pixbuf
Loads a new
GdkPixbuffrom filename and returns it. -
#pixbuf_from_file_at_zoom(filename, x_zoom, y_zoom) ⇒ GdkPixbuf::Pixbuf
Loads a new
GdkPixbuffrom filename and returns it. -
#pixbuf_from_file_at_zoom_with_max(filename, x_zoom, y_zoom, max_width, max_height) ⇒ GdkPixbuf::Pixbuf
Loads a new
GdkPixbuffrom filename and returns it. -
#set_default_dpi_x_y(dpi_x, dpi_y) ⇒ nil
Do not use this function.
-
#term ⇒ nil
This function does nothing.
Instance Method Details
#cleanup ⇒ nil
This function does nothing.
#default_dpi=(dpi) ⇒ nil
Do not use this function. Create an [classRsvg.Handle] and call [methodRsvg.Handle.set_dpi] on it instead.
#error_quark ⇒ GLib::Quark
The error domain for RSVG
#init ⇒ nil
This function does nothing.
#pixbuf_from_file(filename) ⇒ GdkPixbuf::Pixbuf
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.
#pixbuf_from_file_at_max_size(filename, max_width, max_height) ⇒ GdkPixbuf::Pixbuf
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.
#pixbuf_from_file_at_size(filename, width, height) ⇒ GdkPixbuf::Pixbuf
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.
#pixbuf_from_file_at_zoom(filename, x_zoom, y_zoom) ⇒ GdkPixbuf::Pixbuf
Loads a new GdkPixbuf from filename and returns it. This pixbuf is scaled
from the size indicated by the file by a factor of x_zoom and y_zoom. The
caller must assume the reference to the returned pixbuf. If an error
occurred, error is set and NULL is returned.
#pixbuf_from_file_at_zoom_with_max(filename, x_zoom, y_zoom, max_width, max_height) ⇒ GdkPixbuf::Pixbuf
Loads a new GdkPixbuf from filename and returns it. This pixbuf is scaled
from the size indicated by the file by a factor of x_zoom and y_zoom. 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.
#set_default_dpi_x_y(dpi_x, dpi_y) ⇒ nil
Do not use this function. Create an [classRsvg.Handle] and call [methodRsvg.Handle.set_dpi_x_y] on it instead.
#term ⇒ nil
This function does nothing.