sdkagent

CairoSVG API reference

54 public APIs from CairoSVG (Kozea/CairoSVG) — 9 classes, 40 functions, 5 methods. Signatures extracted by static analysis of the actual source.

Repository: Kozea/CairoSVG

KindCount
Classes9
Functions40
Methods5

API list

funccairosvg.__main__.main(argv=None, stdout=None, stdin=None)
Entry-point of the executable.
funccairosvg.bounding_box.calculate_bounding_box(surface, node)
Calculate ``node``'s bounding box.
funccairosvg.css.find_stylesheets(tree)
Find the stylesheets included in ``tree``.
funccairosvg.css.find_stylesheets_rules(tree, stylesheet_rules, url)
Find the rules in a stylesheet.
funccairosvg.css.get_declarations(rule)
Get the declarations in ``rule``.
funccairosvg.defs.clip_path(surface, node)
Store a clip path definition.
funccairosvg.defs.draw_gradient(surface, node, name, opacity)
Gradients colors.
funccairosvg.defs.draw_pattern(surface, node, name, opacity)
Draw a pattern image.
funccairosvg.defs.filter_(surface, node)
Store a filter definition.
funccairosvg.defs.gradient_or_pattern(surface, node, name, opacity)
Gradient or pattern color.
funccairosvg.defs.linear_gradient(surface, node)
Store a linear gradient definition.
funccairosvg.defs.marker(surface, node)
Store a marker definition.
funccairosvg.defs.mask(surface, node)
Store a mask definition.
funccairosvg.defs.paint_mask(surface, node, name, opacity)
Paint the mask of the current surface.
funccairosvg.defs.parse_def(surface, node)
Parse the SVG definitions.
funccairosvg.defs.pattern(surface, node)
Store a pattern definition.
funccairosvg.defs.prepare_filter(surface, node, name)
Apply a filter transforming the context.
funccairosvg.defs.radial_gradient(surface, node)
Store a radial gradient definition.
funccairosvg.defs.use(surface, node)
Draw the content of another SVG node.
classcairosvg.helpers.PointError
Exception raised when parsing a point fails.
funccairosvg.helpers.clip_rect(string)
Parse the rect value of a clip.
funccairosvg.helpers.distance(x1, y1, x2, y2)
Get the distance between two points.
funccairosvg.helpers.flatten(node)
Flatten the text of a node and its children.
funccairosvg.helpers.paint(value)
Extract from value an uri and a color.
funccairosvg.helpers.preserve_ratio(surface, node, width=None, height=None)
Manage the ratio preservation.
funccairosvg.helpers.size(surface, string, reference='xy')
Replace a ``string`` with units by a float value.
funccairosvg.image.image(surface, node)
Draw an image ``node``.
funccairosvg.image.invert_image(img)
Invert the colors of an image.
classcairosvg.parser.Node
SVG node with dict-like properties and children.
methodcairosvg.parser.Node.text_children(element, trailing_space, text_root=False)
Create children and return them.
classcairosvg.parser.Tree
SVG tree.
funccairosvg.parser.handle_white_spaces(string, preserve)
Handle white spaces in text nodes.
funccairosvg.path.path(surface, node)
Draw a path ``node``.
funccairosvg.shapes.circle(surface, node)
Draw a circle ``node`` on ``surface``.
funccairosvg.shapes.ellipse(surface, node)
Draw an ellipse ``node`` on ``surface``.
funccairosvg.shapes.line(surface, node)
Draw a line ``node``.
funccairosvg.shapes.polygon(surface, node)
Draw a polygon ``node`` on ``surface``.
funccairosvg.shapes.polyline(surface, node)
Draw a polyline ``node``.
funccairosvg.shapes.rect(surface, node)
Draw a rect ``node`` on ``surface``.
classcairosvg.surface.EPSSurface
A surface that writes in Encapsulated PostScript format.
classcairosvg.surface.PDFSurface
A surface that writes in PDF format.
classcairosvg.surface.PNGSurface
A surface that writes in PNG format.
methodcairosvg.surface.PNGSurface.finish()
Read the PNG surface content.
classcairosvg.surface.PSSurface
A surface that writes in PostScript format.
classcairosvg.surface.SVGSurface
A surface that writes in SVG format.
classcairosvg.surface.Surface
Abstract base class for CairoSVG surfaces.
methodcairosvg.surface.Surface.draw(node)
Draw ``node`` and its children.
methodcairosvg.surface.Surface.finish()
Read the surface content.
methodcairosvg.surface.Surface.points_per_pixel()
Surface resolution.
funccairosvg.svg.svg(surface, node)
Draw a svg ``node``.
funccairosvg.text.path_length(path)
Get the length of ``path``.
funccairosvg.text.text(surface, node, draw_as_text=False)
Draw a text ``node``.
funccairosvg.url.fetch(url, resource_type)
Fetch the content of ``url``.
funccairosvg.url.parse_url(url, base=None)
Parse an URL.

About this data

These signatures were extracted from the public source of Kozea/CairoSVG using Python's ast module. Argument names, default values, type annotations and return types are taken verbatim from the code. Implementation bodies are never stored. See how it works for details.

Back to all 805 libraries