Skip to main content

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.

Installation

pip install casioplot

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.

Examples

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:

pixel

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:

rectangle

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 can't print all the characters and doesn't support the sizes "small" and "large".
  • Only one calculator implemented: casio graph 90+e.

v 1.0.0 - Uniwix

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

casioplot-1.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

casioplot-1.2.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file casioplot-1.2.0.tar.gz.

File metadata

  • Download URL: casioplot-1.2.0.tar.gz
  • Upload date:
  • Size: 7.1 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

Hashes for casioplot-1.2.0.tar.gz
Algorithm Hash digest
SHA256 85b0c202cd5af4844065e318cf657db9b71e53bc7e0153ced1fbd4c09f690a64
MD5 12c37f8b3d29ce06a91c14a22b58fdd6
BLAKE2b-256 e586e1e8bb3fb00423b1c57f372b38109631f1c4ddcba985f046df545c1822e1

See more details on using hashes here.

File details

Details for the file casioplot-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: casioplot-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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

Hashes for casioplot-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 421b99c2d5aeb899fcf6d8813698dc5f73cac559b90eb56efbb1b84a0599dc79
MD5 5a8ef88ac890a2e3e80d35264e421197
BLAKE2b-256 5c267e9fad0d98a5978df4eb08439bd716127b64558baea4d4b3eb35d5857cc4

See more details on using hashes here.

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