Package: gtk
Class gtk:svg
SuperclassesDocumented Subclasses
None
Direct SlotsDetails
A paintable implementation that renders SVG, with animations. The gtk:svg object is created by parsing a subset of SVG, including
SVG animations. The gtk:svg object fills or strokes paths with symbolic or fixed colors. It can have multiple states, and paths can be included in a subset of the states. States can have animations, and the transition between different states can also be animated. To show a static SVG image, it is enough to load the the SVG and use it like any other paintable. To play an SVG animation, use the gtk:svg-set-frame-clock function to connect the paintable to a frame clock, and call the gtk:svg-play function after loading the SVG. The animation can be paused using the gtk:svg-pause function. To set the current state, use the gtk:svg-state function. Signal DetailsThe "error" signallambda (svg error) :run-lastSignals that an error occurred. Errors can occur both during parsing and during rendering. The expected error values are in the GtkSvgError enumeration, context information about the location of parsing errors can be obtained with the various gtk_svg_error() functions. Parsing errors are never fatal, so the parsing will resume after the error. Errors may however cause parts of the given data or even all of it to not be parsed at all. So it is a useful idea to check that the parsing succeeds by connecting to this signal. | Returned bySlot Access Functions
Inherited Slot Access FunctionsSee also |
2026-11-05