1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Refactor BitMap and add tests

Co-authored-by: Resul Çelik <resul_celik@hotmail.com>
This commit is contained in:
Hendrik Brucker
2022-09-01 18:39:17 +02:00
parent f02134a8c0
commit ea0472fecf
11 changed files with 581 additions and 95 deletions

View File

@@ -201,7 +201,7 @@ Ref<Texture2D> EditorBitmapPreviewPlugin::generate(const Ref<Resource> &p_from,
for (int i = 0; i < bm->get_size().width; i++) {
for (int j = 0; j < bm->get_size().height; j++) {
if (bm->get_bit(Point2i(i, j))) {
if (bm->get_bit(i, j)) {
w[j * (int)bm->get_size().width + i] = 255;
} else {
w[j * (int)bm->get_size().width + i] = 0;