bWidgets
Core widget toolkit designed for Blender
|
Simple class for calculating colors for gradient fills. More...
#include <bwGradient.h>
Public Types | |
enum class | Direction { TOP_BOTTOM , LEFT_RIGHT } |
Public Member Functions | |
bwGradient ()=default | |
bwGradient (const bwColor &base_color, float shade_begin, float shade_end, Direction direction=Direction::TOP_BOTTOM) | |
auto | calcPointColor (const class bwPoint &point, const bwRectanglePixel &bounding_box) const -> bwColor |
Public Attributes | |
bwColor | begin |
bwColor | end |
Direction | direction {Direction::TOP_BOTTOM} |
Simple class for calculating colors for gradient fills.
The implementation is currently pretty simple and limited, it's however all we need for now. More features like unlimited stops at custom positions could be added if needed.
|
strong |
|
default |
|
explicit |
auto bWidgets::bwGradient::calcPointColor | ( | const class bwPoint & | point, |
const bwRectanglePixel & | bounding_box | ||
) | const -> bwColor |
bwColor bWidgets::bwGradient::begin |
Direction bWidgets::bwGradient::direction {Direction::TOP_BOTTOM} |
bwColor bWidgets::bwGradient::end |