🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for draw_pixel

Draw a single pixel This is part of the reference section.

Purpose

Draw a rectangle with a width of zero and height of zero, changing a single pixel. Uses the fill color.

Snippet

Draw a single black pixel at x coordinate of 100 and y coordinate of 150.
sketch.set_fill('#000000')
sketch.draw_pixel(100, 150)

Parameters

  • x: The x location at which to draw the rectangle.
  • y: The y location at which to draw the rectangle.

Availability

Available for all platforms.

See also