Function

Gmsvg_path_get_bounding_box

Declaration [src]

gboolean
gm_svg_path_get_bounding_box (
  const char* path,
  int* x1,
  int* x2,
  int* y1,
  int* y2,
  GError** error
)

Description [src]

Returns the bounding box of an SVG path. As this is meant for display cutouts we operate on integer (whole pixel) values. When parsing fails, FALSE is returned and error contains the error information.

Parameters

path

Type: const char*

An SVG path.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
x1

Type: int*

The lower x coordinate.

The data is owned by the caller of the function.
x2

Type: int*

The upper x coordinate.

The data is owned by the caller of the function.
y1

Type: int*

The lower y coordinate.

The data is owned by the caller of the function.
y2

Type: int*

The upper x coordinate.

The data is owned by the caller of the function.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will left initialized to NULL by the function if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE when parsing was successful, FALSE otherwise.

See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths for path syntax introduction.