This module allows to use casioplot module on a computer.
Project description
Casioplot for computer
Module casioplot from Casio calculator for Computer.
This can help to develop python programs in your computer and run it before put it in your calculator.
Requirements
This module use python 3.10.0.
Need the module Pillow to work.
Install Pillow:
$ pip install pillow
Settings
See settings options for more information.
Exemples
Draw a pixel
from casioplot import *
red = (255, 0, 0)
set_pixel(10, 10, red)
show_screen() # Don't forget to show the screen to see the result.
Result:
Draw a rectangle
from casioplot import *
def rectangle(start_x, start_y, end_x, end_y, color):
x = abs(end_x - start_x)
y = abs(end_y - start_y)
for i in range(x + 1):
for j in range(y + 1):
set_pixel(i + start_x, j + start_y, color)
red = (255, 0, 0)
rectangle(10, 10, 200, 100, red)
show_screen() # Don't forget to show the screen to see the result.
Result:
Get a pixel value
from casioplot import *
def rectangle(start_x, start_y, end_x, end_y, color):
x = abs(end_x - start_x)
y = abs(end_y - start_y)
for i in range(x + 1):
for j in range(y + 1):
set_pixel(i + start_x, j + start_y, color)
red = (255, 0, 0)
rectangle(10, 10, 200, 100, red)
match get_pixel(20, 20):
case r, g, b:
print('Red: ', r)
print('Green:', g)
print('Blue: ', b)
case None:
print('Out of the screen.')
Result:
Red: 255
Green: 0
Blue: 0
Note that you don't need to show the screen to get the color of a pixel.
Compatibility Notes
Some behaviors aren't respected:
- The output isn't show in the screen but saved on a picture.
- The function draw_string ignore the size parameter and doesn't use the same font as casio.
- Only one calculator implemented: casio graph 90+e
v 1.0.0 - Uniwix
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
casioplot-1.0.4.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file casioplot-1.0.4.tar.gz
.
File metadata
- Download URL: casioplot-1.0.4.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c04c713fc89438afdaedd55fc7dabb96a0b1e3ec1a6a1c0652fad3f7afbad675 |
|
MD5 | 8fbd907ab8afeadccfb3d897fcb7a3b7 |
|
BLAKE2b-256 | 9932d554fa2c0ddf9b053373eae2d3ac735589b689bd49da25b6957d601ebad1 |
File details
Details for the file casioplot-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: casioplot-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e5f5f20a3b5b95c57002a10fe5b1671e13508a71866e820c5e0a9c07b9f6dbd |
|
MD5 | 3767f09871246b2b3229317cca11dac9 |
|
BLAKE2b-256 | c64dc975c052ce5ec47b1927debaf2bc092cd1ce2122c5574b61c579b754a475 |