Options
All
  • Public
  • Public/Protected
  • All
Menu

This class draw the frame around the display. With the constructor it takes in the whole display en de size of it. Then it send back the display with the frame, this is done by temperatureWithBorder().

Hierarchy

  • BorderDrawer

Index

Constructors

constructor

  • new BorderDrawer(args: { input: string[]; size: string }): BorderDrawer
  • Parameters

    • args: { input: string[]; size: string }

      The input is an array of strings, were each line is a line of the 7segment. The size is "big" or "normal"

      • input: string[]
      • size: string

    Returns BorderDrawer

Properties

Private _input

_input: string[]

Private _size

_size: string

withBorder

withBorder: string[] = []

Accessors

Private input

  • get input(): string[]

Private size

  • get size(): string

Methods

Private borderDrawer

  • borderDrawer(): string[]
  • These method draw the frame around the display. The frame is dependent of the length of the display.

    Returns string[]

    give back the array with strings.

Private lineDrawer

  • lineDrawer(howMany: number, index: number): void
  • lineDrawer Draw the top and bottom of the frame.

    Parameters

    • howMany: number

      is the length of a line.

    • index: number

      on witch index that you want the line in the array.

    Returns void

temperatureWithBorder

  • temperatureWithBorder(): string[]
  • Returns string[]

    returns the 7segment with frame bach to class where this method is called.

Private verticalBarDrawerManyLine

  • verticalBarDrawerManyLine(amount: number, offset: number): void
  • Draw the "|" at the end and beginning of many lines.

    Parameters

    • amount: number

      Takes in how many line's you want a vertical bar at the beginning and end.

    • offset: number

      The offset of the array, were you want to start drawing these.

    Returns void

Private verticalBarDrawerOneLine

  • verticalBarDrawerOneLine(index: number): void
  • Draw the "|" at the begin and end of one line.

    Parameters

    • index: number

      on which index you want to draw "|".

    Returns void

Generated using TypeDoc