pyumldiagrams.image.ImageDiagram

Attributes

ShapeDefinition

Classes

ImageDiagram

Always lays out in portrait mode. Currently only supports UML classes with methods. Only supports

Module Contents

pyumldiagrams.image.ImageDiagram.ShapeDefinition
class pyumldiagrams.image.ImageDiagram.ImageDiagram(fileName: str, docDisplayMethodParameters: pyumldiagrams.Definitions.DisplayMethodParameters = DisplayMethodParameters.DISPLAY, headerText: str = '', imageSize: pyumldiagrams.Definitions.Size = Size(width=DEFAULT_IMAGE_WIDTH, height=DEFAULT_IMAGE_HEIGHT))

Bases: pyumldiagrams.BaseDiagram.BaseDiagram

Inheritance diagram of pyumldiagrams.image.ImageDiagram.ImageDiagram

Always lays out in portrait mode. Currently only supports UML classes with methods. Only supports inheritance, composition, and aggregation lines.

You are allowed to set the gap between UML classes both horizontally and vertically. Also, you are allowed to specify the text font size

Constructor

Parameters:
  • fileName – The output file name. Including the suffix

  • docDisplayMethodParameters – The global value to consult if a class value says UNSPECIFIED

  • headerText – The text to display as a header on the diagram

  • imageSize – The diagram size in pixels

RESOURCES_PACKAGE_NAME: Final = 'pyumldiagrams.image.resources'
RESOURCES_PATH: Final = 'pyumldiagrams/image/resources'
DEFAULT_IMAGE_WIDTH: Final = 1280
DEFAULT_IMAGE_HEIGHT: Final = 1024
DEFAULT_BACKGROUND_COLOR: str = 'LightYellow'
DEFAULT_LINE_COLOR: str = 'Black'
DEFAULT_TEXT_COLOR: str = 'Black'
DEFAULT_IMAGE_FORMAT: str
SUFFIX_INDICATOR: str = '.'
X_NUDGE_FACTOR: Final = 4
Y_NUDGE_FACTOR: Final = 6
FIRST_METHOD_Y_OFFSET: Final = 0
logger: logging.Logger
retrieveResourcePath(bareFileName: str) str

Must be overridden by implementors

Parameters:

bareFileName

Returns: a fully qualified name

drawClass(classDefinition: pyumldiagrams.Definitions.ClassDefinition)

Draw the class diagram defined by the input

Overrides the empty base definition

Parameters:

classDefinition – The class definition

drawUmlLine(lineDefinition: pyumldiagrams.Definitions.UmlLineDefinition)

Draw the inheritance, association, aggregation, or composition lines that describe the relationships between the UML classes

Overrides the empty base definition

Parameters:

lineDefinition – A UML Line definition

drawNote(noteDefinition: pyumldiagrams.Definitions.NoteDefinition)

TODO: :param noteDefinition:

drawUmlLollipop(umlLollipopDefinition: pyumldiagrams.Definitions.UmlLollipopDefinition)

TODO: :param umlLollipopDefinition:

drawEllipse(definition: pyumldiagrams.Definitions.EllipseDefinition)

Draw a general purpose ellipse

Overrides the empty base definition

Parameters:

definition – It’s definition

drawRectangle(definition: pyumldiagrams.Definitions.RectangleDefinition)

Draw a general purpose rectangle

Overrides the empty base definition

Parameters:

definition – The rectangle definition

write()

Call this method when you are done with placing the diagram onto the image document.

Overrides the empty base definition