Skip to main content

tinymon

Project description

Tinymon

Usage


TinyMon

class

  • TinyMon(baseimagepath=None, fbdev=None, previewdev=None, brightness=15, sleep_time=0.01, timeout=7)
    • parameters
      • baseimagepath
        • background image
        • default None
      • fbdev
        • frame buffer device
        • should use Ssd1362
        • fbdev=Ssd1362()
      • previewdev
        • preview video device
        • experimental
      • brightness
        • 0 ~ 15
      • sleep_time
        • sleep for cpu idle time
        • recommend 0.01
      • timeout
        • timeout for preview udp
        • default 7 seconds

methods

  • addctrl(id, ctrl)

    • parameters
      • id : str
        • ctrl name for internal dictionary
      • ctrl : ImageCtrl, TextCtrl
        • ImageCtrl, TextCtrl instance
  • delImageCtrl(id)

    • parameters
      • id : str
        • ctrl name for internal dictionary
  • delTextCtrl(id)

    • parameters
      • id : str
        • ctrl name for internal dictionary

ImageCtrl

class

  • ImageCtrl(pos=(0,0), size=(MAX_WIDTH,MAX_HEIGHT), path=None)
    • parameters
      • pos : tuple (x,y)
        • image position top-left
      • size : tuple (width, height)
        • image size : max(256, 64)
      • path
        • image path

methods

  • open(path, pos=None, size=None)

    • description
      • change an image in ctrl instance
    • parameters
      • pos : tuple (x,y)
        • image position top-left
      • size : tuple (width, height)
        • image size : max(256, 64)
  • changePos(pos)

    • parameters
      • pos : tuple (x,y)
        • image position top-left
  • paste(im, box=(0,0))

    • description
      • pastes another image into this image
    • parameters
      • im
        • pillow image instance
      • box : (x,y), (x, y, width, height)
        • (x, y) : top left position
        • (x, y, width, height) : top left and size
  • clear(image)

    • description
      • paste image whole area
      • for background image
    • parameters
      • image
        • pillow image

TextCtrl

class

  • TextCtrl(pos=(10,10) , fontsize=14, font='font/NanumBarunGothicLight.ttf', text=None):
    • parameters
      • pos : tuple (x,y)
        • text position top-left
      • fontsize
      • font
        • font path
      • text : str
        • input text

methods

  • setText(text)

    • parameters
      • text : str
        • input text
  • draw(im=None, fill=255)

    • description
      • for internal use
    • parameters
      • im
        • pillow image
      • fill
        • gray level : 0~255
    • returns
      • pillow image
      • text added image

requirements

g4l (gpio python package)

ssd1362-py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinymon-0.1.11.tar.gz (2.4 MB view hashes)

Uploaded Source

Built Distribution

tinymon-0.1.11-py3-none-any.whl (2.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page