Skip to content

Commit

Permalink
Texture.h:
Browse files Browse the repository at this point in the history
* Added a clear() function in Texture.
  • Loading branch information
razterizer committed Oct 15, 2024
1 parent d3629cf commit c38917d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,16 @@ namespace drawing
}

bool empty() const { return size.r == 0 && size.c == 0; }

void clear()
{
size = { -1, -1 };
area = 0;
characters.clear();
fg_colors.clear();
bg_colors.clear();
materials.clear();
}
};

}

0 comments on commit c38917d

Please sign in to comment.