svgen.element.line
index
/home/vkottler/src/vkottler/workspace/svgen/svgen/element/line.py

svgen - A module for the 'line' element.

 
Classes
       
svgen.element.Element(builtins.object)
Line

 
class Line(svgen.element.Element)
    Line(p1: svgen.cartesian.point.Point, p2: svgen.cartesian.point.Point, attrs: Union[Dict[str, Union[str, int, float, bool]], List[svgen.attribute.Attribute], svgen.attribute.Attribute] = None, **extra) -> None
 
A definition of a line.
 
 
Method resolution order:
Line
svgen.element.Element
builtins.object

Methods defined here:
__init__(self, p1: svgen.cartesian.point.Point, p2: svgen.cartesian.point.Point, attrs: Union[Dict[str, Union[str, int, float, bool]], List[svgen.attribute.Attribute], svgen.attribute.Attribute] = None, **extra) -> None
Initialize this line.
translate(self, move: Union[svgen.cartesian.mutate.Translation, float], *args, **kwargs) -> 'Line'
Move a rectangle by a given translation.

Static methods defined here:
create(x2: float, y2: float, x1: float = 0.0, y1: float = 0.0, attrs: Union[Dict[str, Union[str, int, float, bool]], List[svgen.attribute.Attribute], svgen.attribute.Attribute] = None, **extra) -> 'Line'
Create a line.

Methods inherited from svgen.element.Element:
__getitem__(self, tag: str) -> str
Get an attibute as a string.
__setitem__(self, tag: str, value: Union[str, int, float, bool]) -> None
Allow adding attributes dict-set style.
add_attribute(self, attr: svgen.attribute.Attribute, strict: bool = True) -> 'Element'
Add an attribute to this element.
add_class(self, *data: str) -> None
Add a class string.
closing(self, indent: int = 0) -> str
Create a string to close this element.
encode(self, output: <class 'TextIO'>, quote: str = '"', indent: int = 0, newlines: bool = True) -> None
Encode this element to a string stream.
encode_str(self, quote: str = '"', indent: int = 0, newlines: bool = True) -> str
Encode this element to a string.

Readonly properties inherited from svgen.element.Element:
style
Get the style attribute for this element.
xml
Get this element as an xml element.

Data descriptors inherited from svgen.element.Element:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Functions
       
line(x2: float, y2: float, x1: float = 0.0, y1: float = 0.0, attrs: Union[Dict[str, Union[str, int, float, bool]], List[svgen.attribute.Attribute], svgen.attribute.Attribute] = None, **extra) -> svgen.element.line.Line
Create a line.

 
Data
        PossibleAttributes = typing.Union[typing.Dict[str, typing.Union[str, ....attribute.Attribute], svgen.attribute.Attribute]
Union = typing.Union