tinymon
Project description
Tinymon
Usage
TinyMon
class
- TinyMon(baseimagepath=None, fbdev=None, previewdev=None, brightness=15, sleep_time=0.01)
- 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
- baseimagepath
- parameters
methods
-
addctrl(id, ctrl)
- parameters
- id : str
- ctrl name for internal dictionary
- ctrl : ImageCtrl, TextCtrl
- ImageCtrl, TextCtrl instance
- id : str
- parameters
-
delImageCtrl(id)
- parameters
- id : str
- ctrl name for internal dictionary
- id : str
- parameters
-
delTextCtrl(id)
- parameters
- id : str
- ctrl name for internal dictionary
- id : str
- parameters
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
- pos : tuple (x,y)
- parameters
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)
- pos : tuple (x,y)
- description
-
changePos(pos)
- parameters
- pos : tuple (x,y)
- image position top-left
- pos : tuple (x,y)
- parameters
-
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
- im
- description
-
clear(image)
- description
- paste image whole area
- for background image
- parameters
- image
- pillow image
- image
- description
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
- pos : tuple (x,y)
- parameters
methods
-
setText(text)
- parameters
- text : str
- input text
- text : str
- parameters
-
draw(im=None, fill=255)
- description
- for internal use
- parameters
- im
- pillow image
- fill
- gray level : 0~255
- im
- returns
- pillow image
- text added image
- description
requirements
g4l (gpio python package)
ssd1362-py
Project details
Release history Release notifications | RSS feed
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.5.tar.gz
(2.4 MB
view hashes)