diff --git a/test b/test index b3f9286..10e4bd1 100755 Binary files a/test and b/test differ diff --git a/test.cpp b/test.cpp index a854ce1..6e11d54 100644 --- a/test.cpp +++ b/test.cpp @@ -57,7 +57,7 @@ namespace UwU { mixed.r = this->lerp8(a.r, b.r, t); mixed.g = this->lerp8(a.g, b.g, t); mixed.b = this->lerp8(a.b, b.b, t); - mixed.a = this->lerp8(a.a, b.a, t); + mixed.a = this->lerp8(a.a, b.a, t); // maybe the alpha channel should be handled differently? return mixed; } @@ -216,14 +216,14 @@ namespace UwU { uint8_t xGrad[w]; uint8_t yGrad[h]; - // determine m and calculate horizontal gradient coefficient + // determine m and calculate horizontal gradient coefficients if (w < 256) { this->gradHigh(w, xGrad); } else { this->gradLow(w, xGrad); } - // determine m and calculate vertical gradient coefficient + // determine m and calculate vertical gradient coefficients if (h < 256) { this->gradHigh(h, yGrad); } else { @@ -242,8 +242,6 @@ namespace UwU { putPixel(x, y, Xmix.r, Xmix.g, Xmix.b, Xmix.a); } } - - return; } @@ -296,7 +294,7 @@ int main(void) { UwU::Color red = UwU::Color(0xff0000ff); UwU::Color green = UwU::Color(0x00ff00ff); UwU::Color blue = UwU::Color(0x0000ffff); - UwU::Color alpha = UwU::Color(0xffffff00); + UwU::Color alpha = UwU::Color(0x00000000); printf("r: %u, g:%u, b:%u, a:%u\n", fuchsia.r, fuchsia.g, fuchsia.b, fuchsia.a); // struct waymini *wm = waymini_create(w, h, on_key, NULL); @@ -306,7 +304,7 @@ int main(void) { draw.rectangle(UwU::Coord2(69, 69), UwU::Coord2(420, 420), fuchsia); - draw.rectangleGradient(UwU::Coord2(200, 200), UwU::Coord2(600, 400), red, blue, blue, red); + draw.rectangleGradient(UwU::Coord2(200, 200), UwU::Coord2(600, 400), red, blue, alpha, red);