Drawzero

Latest version: v0.4.5

Safety actively analyzes 688792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.4

0.3.2

New features:

- Rotated rectangles:

python
filled_rect_rotated('red', (350, 350), 50, 100, 135)
rect_rotated('green', (350, 350), 50, 100, 45)


- Ellipse and arc

python
ellipse('grey', (100, 650), 200, 100)
arc('grey', (300, 650), 200, 100, start_angle=45, stop_angle=270)
arc('red', (350, 650), 100, 100, start_angle=45, stop_angle=270)


- Text alignment

python
text(C.magenta, 'text', (200, 900), 48, '>v')
text(C.red, '×', (200, 900), 72, '..')
text(C.magenta, 'align', (200, 900), 48, '<^')


- [Dozen examples](https://github.com/ShashkovS/drawzero/tree/master/src/drawzero/examples)

0.2.1

New features:

- Transparency is also straightforward via alpha or RGBA:

python
filled_circle('blue', (100, 110), 22, alpha=100)
polygon((0, 0, 255, 200), [(20, 300), (100, 340), (40, 260)], line_width=15)


- Keyboard and mouse events
Process keyboard events in two ways: check if key is pressed via `get_keys_pressed()` or run throw `keysdown` or `keysup` events
python
Mouse buttons events
if mousebuttonsdown:
x, y = mousebuttonsdown[0].pos
Keys which are still pressed
keys = get_keys_pressed()
if keys[K.UP] or keys[K.w]:
y -= 5
Keyboard events
for ev in keysdown:
if ev.unicode:
upper_text += ev.unicode

0.1.11

0.1.10

0.1.4

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.