Rename blending blit methods to blend

This commit is contained in:
Josh Holtrop 2022-03-22 22:32:45 -04:00
parent 6b7b14d954
commit b4d8707243

View File

@ -117,11 +117,11 @@ struct Framebuffer
void character(int x, int y, char ch, uint color)
{
const(CharInfo) * ci = &kfont.chars[ch];
blit_alpha_bitmap(x + ci.left, y + kfont.baseline_offset + ci.top - ci.height, ci.bitmap, ci.width, ci.height, color);
blend_alpha_bitmap(x + ci.left, y + kfont.baseline_offset + ci.top - ci.height, ci.bitmap, ci.width, ci.height, color);
}
/**
* Blit an 8-bit alpha bitmap to the framebuffer.
* Blend an 8-bit alpha bitmap to the framebuffer.
*
* @param x X coordinate of left side of target location.
* @param y Y coordinate of bottom side of target location.
@ -130,7 +130,7 @@ struct Framebuffer
* @param height Bitmap height.
* @param color Color to blend with alpha value.
*/
void blit_alpha_bitmap(size_t x, size_t y, const(ubyte) * alpha_bitmap,
void blend_alpha_bitmap(size_t x, size_t y, const(ubyte) * alpha_bitmap,
size_t width, size_t height, uint color)
{
y += height - 1u;
@ -153,7 +153,7 @@ struct Framebuffer
}
/**
* Blit an 8-bit alpha bitmap to the framebuffer.
* Blend an 8-bit alpha bitmap to the framebuffer.
*
* @param x X coordinate of left side of target location.
* @param y Y coordinate of bottom side of target location.
@ -162,10 +162,10 @@ struct Framebuffer
* @param height Bitmap height.
* @param color Color to blend with alpha value.
*/
void blit_alpha_bitmap(size_t x, size_t y, const(ubyte)[] alpha_bitmap,
void blend_alpha_bitmap(size_t x, size_t y, const(ubyte)[] alpha_bitmap,
size_t width, size_t height, uint color)
{
blit_alpha_bitmap(x, y, alpha_bitmap.ptr, width, height, color);
blend_alpha_bitmap(x, y, alpha_bitmap.ptr, width, height, color);
}
/**