Module pygmlparser.graphics.NodeGraphics

Expand source code
from dataclasses import dataclass

from pygmlparser.graphics.BaseGraphics import BaseGraphics


@dataclass
class NodeGraphics(BaseGraphics):

    x: int = 0
    """
    x-coordinate
    """
    y: int = 0
    """
    y-coordinate
    """
    z: int = 0
    """
    z-coordinate for 3-D graphics
    """
    h: float = 0.0
    """
    height
    """
    w: float = 0.0
    """
    width
    """
    d: float = 0.0
    """
    depth for 3-D graphics
    """
    fill:    str = "#ff0000"
    """
    RGB value to fill graphic
    """
    outline: str = "#000000"
    """
    RGB value to outline the graphic
    """

    def __str__(self):
        meStr: str = (
            f'['
            f'NodeGraphics: x: {self.x:>4} y: {self.y:>4} z: {self.z:>2} '
            f'h:{self.h:>4} w: {self.w:>4} d: {self.d:>2} '
            f'fill: {self.fill} outline: {self.outline}'
            f']'
        )
        return f'{super().__str__()} {meStr}'

    def __repr__(self):
        return self.__str__()

Classes

class NodeGraphics (type: str = '', width: float = 0.0, x: int = 0, y: int = 0, z: int = 0, h: float = 0.0, w: float = 0.0, d: float = 0.0, fill: str = '#ff0000', outline: str = '#000000')

NodeGraphics(type: str = '', width: float = 0.0, x: int = 0, y: int = 0, z: int = 0, h: float = 0.0, w: float = 0.0, d: float = 0.0, fill: str = '#ff0000', outline: str = '#000000')

Expand source code
class NodeGraphics(BaseGraphics):

    x: int = 0
    """
    x-coordinate
    """
    y: int = 0
    """
    y-coordinate
    """
    z: int = 0
    """
    z-coordinate for 3-D graphics
    """
    h: float = 0.0
    """
    height
    """
    w: float = 0.0
    """
    width
    """
    d: float = 0.0
    """
    depth for 3-D graphics
    """
    fill:    str = "#ff0000"
    """
    RGB value to fill graphic
    """
    outline: str = "#000000"
    """
    RGB value to outline the graphic
    """

    def __str__(self):
        meStr: str = (
            f'['
            f'NodeGraphics: x: {self.x:>4} y: {self.y:>4} z: {self.z:>2} '
            f'h:{self.h:>4} w: {self.w:>4} d: {self.d:>2} '
            f'fill: {self.fill} outline: {self.outline}'
            f']'
        )
        return f'{super().__str__()} {meStr}'

    def __repr__(self):
        return self.__str__()

Ancestors

Class variables

var d : float

depth for 3-D graphics

var fill : str

RGB value to fill graphic

var h : float

height

var outline : str

RGB value to outline the graphic

var w : float

width

var x : int

x-coordinate

var y : int

y-coordinate

var z : int

z-coordinate for 3-D graphics

Inherited members