FastUIDraw
|
Class to contain various enumerations needed for describing a brush. More...
#include <painter_enums.hpp>
Public Types | |
enum | filter_t { filter_nearest = 1, filter_linear = 2, filter_cubic = 3 } |
Enumeration specifying what filter to apply to an image. More... | |
enum | gradient_type_t { gradient_non = 0, gradient_linear, gradient_radial, gradient_sweep, number_gradient_types } |
enum | mipmap_t { apply_mipmapping, dont_apply_mipmapping } |
enum | spread_type_t { spread_clamp, spread_mirror, spread_repeat, spread_mirror_repeat, number_spread_types } |
Class to contain various enumerations needed for describing a brush.
Definition at line 36 of file painter_enums.hpp.
Enumeration specifying what filter to apply to an image.
Enumerator | |
---|---|
filter_nearest | Indicates to use nearest filtering (i.e choose closest pixel). |
filter_linear | Indicates to use bilinear filtering. |
filter_cubic | Indicates to use bicubic filtering. |
Definition at line 83 of file painter_enums.hpp.
enumeration to describe a gradient type.
Enumerator | |
---|---|
gradient_non | indicates the lack of a gradient. |
gradient_linear | Indicates a linear gradient; a linear gradient is defined by two points p0 and p1 where the interpolate at a point p is the value of dot(p - p0, p1 - p0) / dot(p0 - p1, p0 - p1). |
gradient_radial | Indicates a radial gradient; a radial gradient is defined by two circles C0 = Circle(p0, r0), C1 = Circle(p1, r1) where the interpolate at a point p is the time t when p is on the circle C(t) where C(t) = Circle(p(t), r(t)), p(t) = p0 + (p1 - p0) * t and r(t) = r0 + (r1 - r0) * t. |
gradient_sweep | Indicates a sweep gradient; a sweep gradient is defined by a single point C, an angle theta (in radians), a sign S and a factor F. The angle theta represents at what angle the gradient starts, the point C is the center point of the sweep, the sign of S represents the angle orientation and the factor F reprsents how many times the gradient is to be repated. Precisely, the interpolate at a point p is defined as t_interpolate where vec2 d = p - C; float theta, v; theta = S * atan(d.y, d.x); if (theta < alpha ) { theta += 2 * PI; } theta -= alpha; v = (theta - angle) / (2 * PI); t_interpolate = (S < 0.0) ? F * (1.0 - v) : F * v; |
Definition at line 121 of file painter_enums.hpp.
enumeration to specify mipmapping on an image
Enumerator | |
---|---|
apply_mipmapping | Indicates to apply mipmap filtering |
dont_apply_mipmapping | Indicates to not apply mipmap filtering |
Definition at line 105 of file painter_enums.hpp.
Enumeration to specify how a value is interpreted outside of its natural range. For gradients the range is [0, 1] acting on its interpolate.
Definition at line 44 of file painter_enums.hpp.