CairoSVG の API リファレンス
CairoSVG (Kozea/CairoSVG) の公開 API 54 件 —— クラス 9、関数 40、メソッド 5。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: Kozea/CairoSVG
| 種別 | 件数 |
|---|---|
| クラス | 9 |
| 関数 | 40 |
| メソッド | 5 |
API 一覧
func
cairosvg.__main__.main(argv=None, stdout=None, stdin=None)Entry-point of the executable.
func
cairosvg.bounding_box.calculate_bounding_box(surface, node)Calculate ``node``'s bounding box.
func
cairosvg.css.find_stylesheets(tree)Find the stylesheets included in ``tree``.
func
cairosvg.css.find_stylesheets_rules(tree, stylesheet_rules, url)Find the rules in a stylesheet.
func
cairosvg.css.get_declarations(rule)Get the declarations in ``rule``.
func
cairosvg.defs.clip_path(surface, node)Store a clip path definition.
func
cairosvg.defs.draw_gradient(surface, node, name, opacity)Gradients colors.
func
cairosvg.defs.draw_pattern(surface, node, name, opacity)Draw a pattern image.
func
cairosvg.defs.filter_(surface, node)Store a filter definition.
func
cairosvg.defs.gradient_or_pattern(surface, node, name, opacity)Gradient or pattern color.
func
cairosvg.defs.linear_gradient(surface, node)Store a linear gradient definition.
func
cairosvg.defs.marker(surface, node)Store a marker definition.
func
cairosvg.defs.mask(surface, node)Store a mask definition.
func
cairosvg.defs.paint_mask(surface, node, name, opacity)Paint the mask of the current surface.
func
cairosvg.defs.parse_def(surface, node)Parse the SVG definitions.
func
cairosvg.defs.pattern(surface, node)Store a pattern definition.
func
cairosvg.defs.prepare_filter(surface, node, name)Apply a filter transforming the context.
func
cairosvg.defs.radial_gradient(surface, node)Store a radial gradient definition.
func
cairosvg.defs.use(surface, node)Draw the content of another SVG node.
class
cairosvg.helpers.PointErrorException raised when parsing a point fails.
func
cairosvg.helpers.clip_rect(string)Parse the rect value of a clip.
func
cairosvg.helpers.distance(x1, y1, x2, y2)Get the distance between two points.
func
cairosvg.helpers.flatten(node)Flatten the text of a node and its children.
func
cairosvg.helpers.paint(value)Extract from value an uri and a color.
func
cairosvg.helpers.preserve_ratio(surface, node, width=None, height=None)Manage the ratio preservation.
func
cairosvg.helpers.size(surface, string, reference='xy')Replace a ``string`` with units by a float value.
func
cairosvg.image.image(surface, node)Draw an image ``node``.
func
cairosvg.image.invert_image(img)Invert the colors of an image.
class
cairosvg.parser.NodeSVG node with dict-like properties and children.
method
cairosvg.parser.Node.text_children(element, trailing_space, text_root=False)Create children and return them.
class
cairosvg.parser.TreeSVG tree.
func
cairosvg.parser.handle_white_spaces(string, preserve)Handle white spaces in text nodes.
func
cairosvg.path.path(surface, node)Draw a path ``node``.
func
cairosvg.shapes.circle(surface, node)Draw a circle ``node`` on ``surface``.
func
cairosvg.shapes.ellipse(surface, node)Draw an ellipse ``node`` on ``surface``.
func
cairosvg.shapes.line(surface, node)Draw a line ``node``.
func
cairosvg.shapes.polygon(surface, node)Draw a polygon ``node`` on ``surface``.
func
cairosvg.shapes.polyline(surface, node)Draw a polyline ``node``.
func
cairosvg.shapes.rect(surface, node)Draw a rect ``node`` on ``surface``.
class
cairosvg.surface.EPSSurfaceA surface that writes in Encapsulated PostScript format.
class
cairosvg.surface.PDFSurfaceA surface that writes in PDF format.
class
cairosvg.surface.PNGSurfaceA surface that writes in PNG format.
method
cairosvg.surface.PNGSurface.finish()Read the PNG surface content.
class
cairosvg.surface.PSSurfaceA surface that writes in PostScript format.
class
cairosvg.surface.SVGSurfaceA surface that writes in SVG format.
class
cairosvg.surface.SurfaceAbstract base class for CairoSVG surfaces.
method
cairosvg.surface.Surface.draw(node)Draw ``node`` and its children.
method
cairosvg.surface.Surface.finish()Read the surface content.
method
cairosvg.surface.Surface.points_per_pixel()Surface resolution.
func
cairosvg.svg.svg(surface, node)Draw a svg ``node``.
func
cairosvg.text.path_length(path)Get the length of ``path``.
func
cairosvg.text.text(surface, node, draw_as_text=False)Draw a text ``node``.
func
cairosvg.url.fetch(url, resource_type)Fetch the content of ``url``.
func
cairosvg.url.parse_url(url, base=None)Parse an URL.
この情報について
掲載しているシグネチャは Kozea/CairoSVG の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。