Documentation
Contains all the functions from casioplot calculator module.
- Available functions:
You can also use casioplot_settings to change some behavior.
- class casioplot.casioplot_settings
Bases:
objectManage settings for the casioplot module.
- class Settings
Bases:
objectStore default settings
- bottom_margin: int = 0
- filename: str = 'casioplot.png'
- height: int = 192
- image_format: str = 'png'
- left_margin: int = 0
- open_image: bool = False
- right_margin: int = 0
- save_image: bool = True
- top_margin: int = 0
- width: int = 384
- classmethod casio_graph_90_plus_e()
Set the screen in the casio Graph 90+e format.
- classmethod default()
Restore default parameters from the class to the instance.
- classmethod get(setting)
- classmethod set(**settings)
Set an attribute for each given setting with the corresponding value.
- casioplot.clear_screen()
Clear the virtual screen.
- casioplot.draw_string(x: int, y: int, text: str, color: tuple[int, int, int] = (0, 0, 0), size: Literal['small', 'medium', 'large'] = 'medium')
Draw a string on the virtual screen with the given RGB color and size.
- Parameters
x – x coordinate (from the left)
y – y coordinate (from the top)
text – text that will be shown
color – The text color. A tuple that contain 3 integers from 0 to 255.
size – Size of the text. String from the following values: “small”, “medium” or “large”.
- Raises
ValueError – Raise a ValueError if the size isn’t correct.
- casioplot.get_pixel(x: int, y: int) tuple[int, int, int] | None
Get the RGB color of the pixel at the given position.
- Parameters
x – x coordinate (from the left)
y – y coordinate (from the top)
- Returns
The pixel color. A tuple that contain 3 integers from 0 to 255 or None if the pixel is out of the screen.
- casioplot.set_pixel(x: int, y: int, color: tuple[int, int, int] = (0, 0, 0))
Set the RGB color of the pixel at the given position (from top left)
- Parameters
x – x coordinate (from the left)
y – y coordinate (from the top)
color – The pixel color. A tuple that contain 3 integers from 0 to 255.
- casioplot.show_screen()
Show the virtual screen
- This function implement two modes that can be enabled or disabled using the
casioplot_settings: Open the screen as an image (enabled using casioplot_settings.get(‘open_image’)).
Save the screen to the disk (enabled using casioplot_settings.get(‘save_image’)). The image is saved with the filename found in casioplot_settings.get(‘filename’)
- This function implement two modes that can be enabled or disabled using the