al_put_pixel(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

✨ al_put_pixel(3) β€” the Allegro 5 pixel-dropping icon ✨

okay so bestie, we're in the Allegro 5 API section of the Library Functions Manual, and today's main character is al_put_pixel β€” the tiny function that puts exactly one (1) pixel on your bitmap. one pixel. that's the whole job. she's not doing more than that and honestly? respect. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

void al_put_pixel(int x, int y, ALLEGRO_COLOR color)

like, that's it. three params, no drama, no return value. she does her thing and leaves. 🫢


πŸ’– DESCRIPTION πŸ’–

Draw a single pixel on the target bitmap β€” one pixel, at x, y, in whatever ALLEGRO_COLOR you hand her. simple, iconic, no notes. ✨

now for the real talk, because bestie you need to hear this one: this operation is slow on non-memory bitmaps. like, slow slow. 😭 if you're gonna call this function multiple times on the same bitmap, please consider locking the bitmap β€” that's the move, that's the whole vibe check, use the lock. πŸ”’

and lowkey the most important detail: this function is not affected by the transformations or the color blenders. no cap, she ignores all of that. transformations? doesn't care. blenders? not today. she just puts the pixel, exactly as told. πŸ’€


🌈 SEE ALSO 🌈


⭐ friendly reminder bestie: al_lock_bitmap(3) is right there in the SEE ALSO for a reason β€” if you're going pixel-by-pixel in a loop on a non-memory bitmap, lock it first or your frame time is gonna be giving 🐒 energy.

that's the whole page, bestie β€” go forth and place that single pixel with confidence. πŸ’œ

this has been the Allegro reference manual, al_put_pixel(3) entry, byeeee πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms