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
#### methods
- addctrl(id, ctrl)
- parameters
- idstr
ctrl name for internal dictionary
- ctrlImageCtrl, TextCtrl
ImageCtrl, TextCtrl instance
- delImageCtrl(id)
- parameters
- idstr
ctrl name for internal dictionary
- delTextCtrl(id)
- parameters
- idstr
ctrl name for internal dictionary
### ImageCtrl
#### class
- ImageCtrl(pos=(0,0), size=(MAX_WIDTH,MAX_HEIGHT), path=None)
- parameters
- postuple (x,y)
image position top-left
- sizetuple (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
- postuple (x,y)
image position top-left
- sizetuple (width, height)
image size : max(256, 64)
- changePos(pos)
- parameters
- postuple (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
- postuple (x,y)
text position top-left
fontsize
- font
font path
- textstr
input text
#### methods
- setText(text)
- parameters
- textstr
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)
>- link : <https://gitlab.com/telelian/peripheral-library/g4l>
### ssd1362-py
>- link : <https://gitlab.com/telelian/peripheral-library/ssd1362.git>
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.