al_draw_pixel(3alleg5)
π NAME π
ok so bestie, welcome to the Allegro reference manual page for al_draw_pixel β yes it's Allegro 5 API, we love a glow-up era β¨
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_draw_pixel(float x, float y, ALLEGRO_COLOR color)
π DESCRIPTION π
Okay so real talk: this function draws a single pixel at x, y. That's it. That's the whole job. But she's got range, so listen up π
The way that she's built different from al_put_pixel(3alleg5)? She does blending. Periodt. And the way she differs from al_put_blended_pixel(3alleg5)? She respects the transformations β meaning the pixel's position gets transformed, but its size is unaffected, so it stays exactly one pixel, no stretching, no nothing. Iconic behavior, no cap π
lowkey a warning though: this function can be slow if called often. Not her fault, she's just doing a lot per call. So if you need to draw a LOT of pixels, don't spam her β consider usingal_draw_prim(3alleg5)withALLEGRO_PRIM_POINT_LISTfrom the primitives addon instead. She'll understand π«Ά
Here's the full tea on her arguments:
xβ destination x πyβ destination y πcolorβ color of the pixel π¨- Note: this function may not draw exactly where you expect it to. Fr fr. See the pixel-precise output section on the primitives addon documentation for the details on how to control exactly where the pixel is drawn. iykyk π
π SEE ALSO π
okay that's the whole page bestie, thanks for coming to my ted talk π and shoutout to the Allegro reference manual for the version, plus the al_draw_pixel(3alleg5) crew β stay pixelated, stay blessed π¦πβ¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms