Class Rsvg
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final intstatic final booleanstatic final intThis is a C macro that expands to a number with the major version of librsvg against which your program is compiled.static final intThis is a C macro that expands to a number with the micro version of librsvg against which your program is compiled.static final intThis is a C macro that expands to a number with the minor version of librsvg against which your program is compiled.static final StringThis is a C macro that expands to a string with the version of librsvg against which your program is compiled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanup()Deprecated.No-op.static voidinit()Deprecated.There is no need to initialize librsvg.static voidstatic @Nullable PixbufpixbufFromFile(String filename) Deprecated.static @Nullable PixbufpixbufFromFileAtMaxSize(String filename, int maxWidth, int maxHeight) Deprecated.static @Nullable PixbufpixbufFromFileAtSize(String filename, int width, int height) Deprecated.static @Nullable PixbufpixbufFromFileAtZoom(String filename, double xZoom, double yZoom) Deprecated.static @Nullable PixbufpixbufFromFileAtZoomWithMax(String filename, double xZoom, double yZoom, int maxWidth, int maxHeight) Deprecated.static voidsetDefaultDpi(double dpi) Deprecated.This function used to set a global default DPI.static voidsetDefaultDpiXY(double dpiX, double dpiY) Deprecated.This function used to set a global default DPI.static voidterm()Deprecated.There is no need to de-initialize librsvg.
-
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_VERSIONThis 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.- See Also:
-
MICRO_VERSION
public static final int MICRO_VERSIONThis 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.- See Also:
-
MINOR_VERSION
public static final int MINOR_VERSIONThis 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.- See Also:
-
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.- See Also:
-
-
Constructor Details
-
Rsvg
public Rsvg()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
cleanup
Deprecated.No-op. This function should not be called from normal programs.This function does nothing.- Since:
- 2.36
-
init
Deprecated.There is no need to initialize librsvg.This function does nothing.- Since:
- 2.9
-
pixbufFromFile
Deprecated.Loads a newGdkPixbuffromfilenameand returns it. The caller must assume the reference to the reurned pixbuf. If an error occurred,erroris set andNULLis returned.- Parameters:
filename- A file name- Returns:
- A pixbuf, or
nullon error. - Throws:
GErrorException- seeGError
-
pixbufFromFileAtMaxSize
@Deprecated public static @Nullable Pixbuf pixbufFromFileAtMaxSize(String filename, int maxWidth, int maxHeight) throws GErrorException Deprecated.Loads a newGdkPixbuffromfilenameand returns it. This pixbuf is uniformly scaled so that the it fits into a rectangle of sizemax_width * max_height. The caller must assume the reference to the returned pixbuf. If an error occurred,erroris set andNULLis returned.- Parameters:
filename- A file namemaxWidth- The requested max widthmaxHeight- The requested max height- Returns:
- A pixbuf, or
nullon error. - Throws:
GErrorException- seeGError
-
pixbufFromFileAtSize
@Deprecated public static @Nullable Pixbuf pixbufFromFileAtSize(String filename, int width, int height) throws GErrorException Deprecated.Loads a newGdkPixbuffromfilenameand returns it. This pixbuf is scaled from the size indicated to the new size indicated bywidthandheight.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,erroris set andNULLis returned.- Parameters:
filename- A file namewidth- The new width, or -1height- The new height, or -1- Returns:
- A pixbuf, or
nullon error. - Throws:
GErrorException- seeGError
-
pixbufFromFileAtZoom
@Deprecated public static @Nullable Pixbuf pixbufFromFileAtZoom(String filename, double xZoom, double yZoom) throws GErrorException Deprecated.Loads a newGdkPixbuffromfilenameand returns it. This pixbuf is scaled from the size indicated by the file by a factor ofxZoomandyZoom.The caller must assume the reference to the returned pixbuf. If an error occurred,erroris set andNULLis returned.- Parameters:
filename- A file namexZoom- The horizontal zoom factoryZoom- The vertical zoom factor- Returns:
- A pixbuf, or
nullon error. - Throws:
GErrorException- seeGError
-
pixbufFromFileAtZoomWithMax
@Deprecated public static @Nullable Pixbuf pixbufFromFileAtZoomWithMax(String filename, double xZoom, double yZoom, int maxWidth, int maxHeight) throws GErrorException Deprecated.Loads a newGdkPixbuffromfilenameand returns it. This pixbuf is scaled from the size indicated by the file by a factor ofxZoomandyZoom.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,erroris set andNULLis returned.- Parameters:
filename- A file namexZoom- The horizontal zoom factoryZoom- The vertical zoom factormaxWidth- The requested max widthmaxHeight- The requested max height- Returns:
- A pixbuf, or
nullon error. - Throws:
GErrorException- seeGError
-
setDefaultDpi
Deprecated.This function used to set a global default DPI. However, it only worked if it was called before anyHandleobjects had been created; it would not work after that. To avoid global mutable state, please useHandle.setDpi(double)instead.Do not use this function. Create anHandleand callHandle.setDpi(double)on it instead.- Parameters:
dpi- Dots Per Inch (aka Pixels Per Inch)- Since:
- 2.8
-
setDefaultDpiXY
Deprecated.This function used to set a global default DPI. However, it only worked if it was called before anyHandleobjects had been created; it would not work after that. To avoid global mutable state, please useHandle.setDpi(double)instead.Do not use this function. Create anHandleand callHandle.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.There is no need to de-initialize librsvg.This function does nothing.- Since:
- 2.9
-