Constrain a color value from 0 to 255
| 676 | |
| 677 | // Constrain a color value from 0 to 255 |
| 678 | int Frame::constrain(int color_value) |
| 679 | { |
| 680 | // Constrain new color from 0 to 255 |
| 681 | if (color_value < 0) |
| 682 | color_value = 0; |
| 683 | else if (color_value > 255) |
| 684 | color_value = 255; |
| 685 | |
| 686 | return color_value; |
| 687 | } |
| 688 | |
| 689 | void Frame::AddColor(int new_width, int new_height, std::string new_color) |
| 690 | { |
nothing calls this directly
no outgoing calls
no test coverage detected