Built-in images
This document provides a comprehensive reference for all 64 built-in images available in the Codi:bit library.
Overview
The Codi:bit library provides 64 built-in images that can be accessed via Image objects:
Image.ICON_NAME
(e.g.,Image.HEART
)
Usage
from codibit import display, Image
# Draw built-in icons
display.draw_image(Image.HEART, 0, 0)
display.draw_image(Image.HAPPY, 20, 0)
display.show()
# With scaling
display.draw_image(Image.STAR, 0, 0, scale=2)
display.draw_image(Image.DIAMOND, 40, 0, scale=3)
display.show()
Complete Icon Reference
Basic Icons
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.HEART | Image.HEART_SMALL | Image.HAPPY | |||
Image.STAR | Image.SAD | Image.CONFUSED | |||
Image.ANGRY | Image.ASLEEP | Image.SURPRISED | |||
Image.SILLY | Image.FABULOUS | Image.MEH | |||
Image.O | Image.X |
Geometric Shapes
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.TRIANGLE | Image.TRIANGLE_LEFT | Image.CHESSBOARD | |||
Image.DIAMOND | Image.DIAMOND_SMALL | Image.SQUARE | |||
Image.SQUARE_SMALL |
Animals & Characters
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.RABBIT | Image.COW | Image.DUCK | |||
Image.TORTOISE | Image.BUTTERFLY | Image.STICKFIGURE | |||
Image.GHOST | Image.GIRAFFE | Image.SKULL | |||
Image.UMBRELLA | Image.SNAKE | Image.SCISSORS |
Tools & Objects
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.SWORD | Image.TSHIRT | Image.ROLLERSKATE | |||
Image.HOUSE | Image.TARGET |
Music
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.MUSIC_CROTCHET | Image.MUSIC_QUAVER | Image.MUSIC_QUAVERS | |||
Image.PITCHFORK |
Special
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.XMAS | Image.PACMAN |
Clock Faces (1-12)
Clock faces for different hours. These are perfect for creating clock animations.
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.CLOCK1 | Image.CLOCK2 | Image.CLOCK3 | |||
Image.CLOCK4 | Image.CLOCK5 | Image.CLOCK6 | |||
Image.CLOCK7 | Image.CLOCK8 | Image.CLOCK9 | |||
Image.CLOCK10 | Image.CLOCK11 | Image.CLOCK12 |
Arrows (8 Directions)
Directional arrows for navigation and movement indicators.
Icon | Preview | Icon | Preview | Icon | Preview |
---|---|---|---|---|---|
Image.ARROW_N | Image.ARROW_NE | Image.ARROW_E | |||
Image.ARROW_SE | Image.ARROW_S | Image.ARROW_SW | |||
Image.ARROW_W | Image.ARROW_NW |
Icon Sequences
For convenience, the Image class provides pre-defined sequences for common animations:
Image.ALL_CLOCKS
List of all 12 clock icons for clock animations.
from codibit import Image, display
import time
# Clock animation
for clock in Image.ALL_CLOCKS:
display.clear()
display.draw_image(clock, 0, 0)
display.show()
time.sleep(0.5)
Image.ALL_ARROWS
List of all 8 arrow icons for directional animations.
from codibit import Image, display
import time
# Arrow animation
for arrow in Image.ALL_ARROWS:
display.clear()
display.draw_image(arrow, 0, 0)
display.show()
time.sleep(0.3)