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
  • pixbufFromFile(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

  • pixbufFromFileAtMaxSize(filename: string, maxWidth: number, maxHeight: 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

    • maxWidth: number

      The requested max width

    • maxHeight: number

      The requested max height

    Returns Pixbuf | null

  • pixbufFromFileAtSize(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

  • pixbufFromFileAtZoom(filename: string, xZoom: number, yZoom: 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

    • xZoom: number

      The horizontal zoom factor

    • yZoom: number

      The vertical zoom factor

    Returns Pixbuf | null

  • pixbufFromFileAtZoomWithMax(filename: string, xZoom: number, yZoom: number, maxWidth: number, maxHeight: 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

    • xZoom: number

      The horizontal zoom factor

    • yZoom: number

      The vertical zoom factor

    • maxWidth: number

      The requested max width

    • maxHeight: number

      The requested max height

    Returns Pixbuf | null

  • setDefaultDpi(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

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

    Parameters

    • dpiX: number

      Dots Per Inch (aka Pixels Per Inch)

    • dpiY: 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