structure

Module: structure

Inheritance diagram for pysvg.structure:

This module includes the elements found in http://www.w3.org/TR/SVG/struct.html

(C) 2008, 2009 Kerim Mansour For licensing information please refer to license.txt

Classes

ClipPath

class pysvg.structure.ClipPath(id=None, transform=None, clipPathUnits=None, **kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.ConditionalAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ExternalAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib

Class representing the clipPath element of an svg doc.

__init__(id=None, transform=None, clipPathUnits=None, **kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clipPathUnits()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_visibility()
get_word_spacing()
get_writing_mode()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clipPathUnits(clipPathUnits)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_visibility(visibility)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Defs

class pysvg.structure.Defs(**kwargs)

Bases: pysvg.structure.G

Class representing the defs element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_visibility()
get_word_spacing()
get_writing_mode()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_visibility(visibility)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Desc

class pysvg.structure.Desc(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.StyleAttrib

Class representing the desc element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_class()
get_id()
get_style()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_class(aClass)
set_id(id)
set_style(style)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

G

class pysvg.structure.G(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.ConditionalAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ExternalAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib

Class representing the g element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_visibility()
get_word_spacing()
get_writing_mode()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_visibility(visibility)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Image

class pysvg.structure.Image(x=None, y=None, width=None, height=None, preserveAspectRatio=None, **kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.ConditionalAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ViewportAttrib, pysvg.attributes.PaintAttrib, pysvg.attributes.OpacityAttrib, pysvg.attributes.GraphicsAttrib, pysvg.attributes.ClipAttrib, pysvg.attributes.MaskAttrib, pysvg.attributes.FilterAttrib, pysvg.attributes.GraphicalEventsAttrib, pysvg.attributes.CursorAttrib, pysvg.attributes.XLinkAttrib, pysvg.attributes.ExternalAttrib, pysvg.core.PointAttrib, pysvg.core.DimensionAttrib

Class representing the image element of an svg doc.

__init__(x=None, y=None, width=None, height=None, preserveAspectRatio=None, **kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_rendering()
get_cursor()
get_display()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_height()
get_id()
get_image_rendering()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_preserveAspectRatio()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_rendering()
get_transform()
get_visibility()
get_width()
get_x()
get_xml_base()
get_xml_lang()
get_xml_space()
get_y()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_display(display)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_height(height)
set_id(id)
set_image_rendering(image_rendering)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_preserveAspectRatio(preserveAspectRatio)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_rendering(text_rendering)
set_transform(transform)
set_visibility(visibility)
set_width(width)
set_x(x)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
set_y(y)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Metadata

class pysvg.structure.Metadata(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib

Class representing the metadata element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_id()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_id(id)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Svg

class pysvg.structure.Svg(x=None, y=None, width=None, height=None, **kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ConditionalAttrib, pysvg.core.PointAttrib, pysvg.core.DimensionAttrib, pysvg.attributes.XLinkAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib, pysvg.attributes.DocumentEventsAttrib

Class representing the svg element of an svg doc.

__init__(x=None, y=None, width=None, height=None, **kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseProfile()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_contentScriptType()
get_contentStyleType()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_height()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onabort()
get_onactivate()
get_onclick()
get_onerror()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_onresize()
get_onscroll()
get_onunload()
get_onzoom()
get_opacity()
get_overflow()
get_pointer_events()
get_preserveAspectRatio()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_version()
get_viewBox()
get_visibility()
get_width()
get_word_spacing()
get_writing_mode()
get_x()
get_xml_base()
get_xml_lang()
get_xml_space()
get_xmlns()
get_y()
get_zoomAndPan()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseProfile(baseProfile)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_contentScriptType(contentScriptType)
set_contentStyleType(contentStyleType)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_height(height)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onabort(onabort)
set_onactivate(onactivate)
set_onclick(onclick)
set_onerror(onerror)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_onresize(onresize)
set_onscroll(onscroll)
set_onunload(onunload)
set_onzoom(onzoom)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_preserveAspectRatio(preserveAspectRatio)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_version(version)
set_viewBox(viewBox)
set_visibility(visibility)
set_width(width)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_x(x)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
set_xmlns(xmlns)
set_y(y)
set_zoomAndPan(zoomAndPan)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Switch

class pysvg.structure.Switch(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.ConditionalAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib, pysvg.attributes.ExternalAttrib

Class representing the switch element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_visibility()
get_word_spacing()
get_writing_mode()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_visibility(visibility)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Symbol

class pysvg.structure.Symbol(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ExternalAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib

Class representing the symbol element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_externalResourcesRequired()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_preserveAspectRatio()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_unicode_bidi()
get_viewBox()
get_visibility()
get_word_spacing()
get_writing_mode()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_externalResourcesRequired(externalResourcesRequired)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_preserveAspectRatio(preserveAspectRatio)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_unicode_bidi(unicode_bidi)
set_viewBox(viewBox)
set_visibility(visibility)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Title

class pysvg.structure.Title(**kwargs)

Bases: pysvg.structure.Desc

Class representing the title element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_class()
get_id()
get_style()
get_xml_base()
get_xml_lang()
get_xml_space()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_class(aClass)
set_id(id)
set_style(style)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Use

class pysvg.structure.Use(**kwargs)

Bases: pysvg.core.BaseElement, pysvg.attributes.CoreAttrib, pysvg.attributes.StyleAttrib, pysvg.attributes.ConditionalAttrib, pysvg.core.PointAttrib, pysvg.core.DimensionAttrib, pysvg.attributes.XLinkAttrib, pysvg.attributes.PresentationAttributes_All, pysvg.attributes.GraphicalEventsAttrib

Class representing the use element of an svg doc.

__init__(**kwargs)
addElement(element)
appendTextContent(text)
getAllElements()

returns all elements contained within the top level element list of this element

getAllElementsOfHirarchy()

returns ALL elements of the complete hirarchy as a flat list

getAttribute(attribute_name)
getAttributes()

get all atributes of the element

getElementAt(pos)

returns the element at a specific position within this svg

getElementByID(id)

returns an element with the specific id and the position of that element within the svg elements array

getElementsByType(type)

retrieves all Elements that are of type type @type type: class @param type: type of the element

getXML()

Return a XML representation of the current element. This function can be used for debugging purposes. It is also used by getXML in SVG

@return: the representation of the current element as an xml string

get_alignment_baseline()
get_baseline_shift()
get_class()
get_clip()
get_clip_path()
get_clip_rule()
get_color()
get_color_interpolation()
get_color_interpolation_filters()
get_color_profile()
get_color_rendering()
get_cursor()
get_direction()
get_display()
get_dominant_baseline()
get_enable_background()
get_fill()
get_fill_opacity()
get_fill_rule()
get_filter()
get_flood_color()
get_flood_opacity()
get_font_family()
get_font_size()
get_font_size_adjust()
get_font_stretch()
get_font_style()
get_font_variant()
get_font_weight()
get_glyph_orientation_horizontal()
get_glyph_orientation_vertical()
get_height()
get_id()
get_image_rendering()
get_kerning()
get_letter_spacing()
get_lighting_color()
get_marker_end()
get_marker_mid()
get_marker_start()
get_mask()
get_onactivate()
get_onclick()
get_onfocusin()
get_onfocusout()
get_onload()
get_onmousedown()
get_onmousemove()
get_onmouseout()
get_onmouseover()
get_onmouseup()
get_opacity()
get_overflow()
get_pointer_events()
get_requiredExtensions()
get_requiredFeatures()
get_shape_rendering()
get_stop_color()
get_stop_opacity()
get_stroke()
get_stroke_dasharray()
get_stroke_dashoffset()
get_stroke_linecap()
get_stroke_linejoin()
get_stroke_miterlimit()
get_stroke_opacity()
get_stroke_width()
get_style()
get_systemLanguage()
get_text_anchor()
get_text_decoration()
get_text_rendering()
get_transform()
get_unicode_bidi()
get_visibility()
get_width()
get_word_spacing()
get_writing_mode()
get_x()
get_xml_base()
get_xml_lang()
get_xml_space()
get_y()
insertElementAt(element, pos)
quote_attrib(inStr)

Transforms characters between xml notation and python notation.

save(filename, encoding='ISO-8859-1', standalone='no')

Stores any element in a svg file (including header). Calling this method only makes sense if the root element is an svg elemnt

setAttribute(attribute_name, attribute_value)
setKWARGS(**kwargs)

Used to set all attributes given in a **kwargs parameter. Might throw an Exception if attribute was not found. #TODO: check if we should fix this using “setAttribute”

set_alignment_baseline(alignment_baseline)
set_baseline_shift(baseline_shift)
set_class(aClass)
set_clip(clip)
set_clip_path(clip_path)
set_clip_rule(clip_rule)
set_color(color)
set_color_interpolation(color_interpolation)
set_color_interpolation_filters(color_interpolation_filters)
set_color_profile(color_profile)
set_color_rendering(color_rendering)
set_cursor(cursor)
set_direction(direction)
set_display(display)
set_dominant_baseline(dominant_baseline)
set_enable_background(enableBackground)
set_fill(fill)
set_fill_opacity(fill_opacity)
set_fill_rule(fill_rule)
set_filter(filter)
set_flood_color(flood_color)
set_flood_opacity(flood_opacity)
set_font_family(font_family)
set_font_size(font_size)
set_font_size_adjust(font_size_adjust)
set_font_stretch(font_stretch)
set_font_style(font_style)
set_font_variant(font_variant)
set_font_weight(font_weight)
set_glyph_orientation_horizontal(glyph_orientation_horizontal)
set_glyph_orientation_vertical(glyph_orientation_vertical)
set_height(height)
set_id(id)
set_image_rendering(image_rendering)
set_kerning(kerning)
set_letter_spacing(letter_spacing)
set_lighting_color(lighting_color)
set_marker_end(marker_end)
set_marker_mid(marker_mid)
set_marker_start(marker_start)
set_mask(mask)
set_onactivate(onactivate)
set_onclick(onclick)
set_onfocusin(onfocusin)
set_onfocusout(onfocusout)
set_onload(onload)
set_onmousedown(onmousedown)
set_onmousemove(onmousemove)
set_onmouseout(onmouseout)
set_onmouseover(onmouseover)
set_onmouseup(onmouseup)
set_opacity(opacity)
set_overflow(overflow)
set_pointer_events(pointer_events)
set_requiredExtensions(requiredExtensions)
set_requiredFeatures(requiredFeatures)
set_shape_rendering(shape_rendering)
set_stop_color(stop_color)
set_stop_opacity(stop_opacity)
set_stroke(stroke)
set_stroke_dasharray(stroke_dasharray)
set_stroke_dashoffset(stroke_dashoffset)
set_stroke_linecap(stroke_linecap)
set_stroke_linejoin(stroke_linejoin)
set_stroke_miterlimit(stroke_miterlimit)
set_stroke_opacity(stroke_opacity)
set_stroke_width(stroke_width)
set_style(style)
set_systemLanguage(language_code)
set_text_anchor(text_anchor)
set_text_decoration(text_decoration)
set_text_rendering(text_rendering)
set_transform(transform)
set_unicode_bidi(unicode_bidi)
set_visibility(visibility)
set_width(width)
set_word_spacing(word_spacing)
set_writing_mode(writing_mode)
set_x(x)
set_xml_base(xml_base)
set_xml_lang(language_code)
set_xml_space(xml_space)
set_y(y)
wrap_xml(xml, encoding='ISO-8859-1', standalone='no')

Method that provides a standard svg header string for a file

Table Of Contents

This Page