Gjsify LogoGjsify Logo

Index

Variables

MAJOR_VERSION: number

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.

MICRO_VERSION: number

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.

MINOR_VERSION: number

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.

VERSION: string

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.

Functions

  • cleanup(): void
  • init(): void
  • pixbuf_from_file(filename: string): Pixbuf | null
  • 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: string

      A file name

    Returns Pixbuf | null

  • pixbuf_from_file_at_max_size(filename: string, max_width: number, max_height: number): Pixbuf | null
  • 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: string

      A file name

    • max_width: number

      The requested max width

    • max_height: number

      The requested max height

    Returns Pixbuf | null

  • pixbuf_from_file_at_size(filename: string, width: number, height: number): Pixbuf | null
  • 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: string

      A file name

    • width: number

      The new width, or -1

    • height: number

      The new height, or -1

    Returns Pixbuf | null

  • pixbuf_from_file_at_zoom(filename: string, x_zoom: number, y_zoom: number): Pixbuf | null
  • 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.

    Parameters

    • filename: string

      A file name

    • x_zoom: number

      The horizontal zoom factor

    • y_zoom: number

      The vertical zoom factor

    Returns Pixbuf | null

  • pixbuf_from_file_at_zoom_with_max(filename: string, x_zoom: number, y_zoom: number, max_width: number, max_height: number): Pixbuf | null
  • 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.

    Parameters

    • filename: string

      A file name

    • x_zoom: number

      The horizontal zoom factor

    • y_zoom: number

      The vertical zoom factor

    • max_width: number

      The requested max width

    • max_height: number

      The requested max height

    Returns Pixbuf | null

  • set_default_dpi(dpi: number): void
  • Do not use this function. Create an [classRsvg.Handle] and call [methodRsvg.Handle.set_dpi] on it instead.

    Parameters

    • dpi: number

      Dots Per Inch (aka Pixels Per Inch)

    Returns void

  • set_default_dpi_x_y(dpi_x: number, dpi_y: number): void
  • Do not use this function. Create an [classRsvg.Handle] and call [methodRsvg.Handle.set_dpi_x_y] on it instead.

    Parameters

    • dpi_x: number

      Dots Per Inch (aka Pixels Per Inch)

    • dpi_y: number

      Dots Per Inch (aka Pixels Per Inch)

    Returns void

  • term(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method