forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helper function to determine if color is transparent (bevyengine#…
…10310) # Objective - We need to check multiple times if a color is fully transparent, e.g. for performance optimizations. - Make code more readable. - Reduce code duplication, to simplify making changes if needed (e.g. if we need to take floating point weirdness into account later on). ## Solution - Introduce a new `Color::is_fully_transparent` helper function to determine if the alpha of a color is 0. - Use the helper function in our UI rendering code. --- ## Changelog - Added `Color::is_fully_transparent` helper function. --------- Co-authored-by: François <mockersf@gmail.com>
- Loading branch information
Showing
2 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters