61 g = utils::clipped_cast<icl32f,icl8u>((b*(k+1.0))/(1.0/y-1.0-k));
62 r = utils::clipped_cast<icl32f,icl8u>(g/y-g-b);
80 p(p),d(d),r(utils::
Rect32f(p.x-d,p.y-d,2*d,2*d)),dr(false),c(c),ov(false){}
89 float dim()
const {
return d; }
103 c =
Color(utils::clipped_cast<icl32f,icl8u>(r),
104 utils::clipped_cast<icl32f,icl8u>(g),
105 utils::clipped_cast<icl32f,icl8u>(b));
171 bool over()
const {
return ov; }
Dragger(const utils::Point32f &p=utils::Point32f::null, float d=0.02, const Color &c=Color(255, 0, 0))
creates a new Dragger
Definition: Dragger.h:79
undocument this line if you encounter any issues!
Definition: Any.h:37
math::FixedColVector< icl8u, 3 > Color
Default color type of the ICL.
Definition: Color.h:42
bool dragged() const
returns whether this dragger is currently dragged
Definition: Dragger.h:179
bool dr
Definition: Dragger.h:186
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
float y
y position of this point
Definition: Point32f.h:48
const utils::Point32f & pos() const
returns the current center position
Definition: Dragger.h:92
void drop()
drops this dragger, to it is no longer moved by the mouse
Definition: Dragger.h:151
Color(icl8u r=0, icl8u g=0, icl8u b=0, icl8u a=255)
Create a new color with given red, green, blue and alpha value.
Definition: Dragger.h:65
Color c
Definition: Dragger.h:187
icl8u a
Definition: Dragger.h:71
icl8u r
Definition: Dragger.h:68
float dim() const
returns the current dim variable
Definition: Dragger.h:89
Floating point precision implementation of the Rect class.
Definition: Rect32f.h:45
static void xyb_to_rg(icl8u &r, icl8u &g, float b, float x, float y)
conversion function calculates r and g given b R and G
Definition: Dragger.h:59
T clip(T tX, T tMin, T tMax)
clips a value into the range [tMin,tMax]
Definition: ClippedCast.h:40
void setDim(float d)
sets the current dim
Definition: Dragger.h:110
void move(const utils::Point32f &dist)
moves the dragger by a given distance
Definition: Dragger.h:129
bool ov
Definition: Dragger.h:188
bool over() const
returns whether the mouse is currently over this dragger
Definition: Dragger.h:171
static const Point32f null
null Point is x=0, y=0
Definition: Point32f.h:51
const Color & col() const
returns the current color
Definition: Dragger.h:95
void drag(const utils::Point32f &x)
makes this dragger "dragged" by the mouse
Definition: Dragger.h:137
utils::Point32f p
Definition: Dragger.h:183
Utility class which helps to convert rgb to RG-Chroma and back.
Definition: Dragger.h:50
const utils::Rect32f & rect() const
returns the draggers relative rect
Definition: Dragger.h:86
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
#define ICLQt_API
Definition: CompatMacros.h:178
void setOver(bool val=true)
sets the internal "over"-variable to indicate, that the mouse is over the dragger
Definition: Dragger.h:176
float x
x position of this point
Definition: Point32f.h:45
void setPos(const utils::Point32f &x)
sets the current position (which is clipped to [0,1])
Definition: Dragger.h:118
utils::Point32f dragOffs
Definition: Dragger.h:189
bool hit(const utils::Point32f &x) const
returns whether a given relative position is inside the dragger
Definition: Dragger.h:83
utils::Rect32f r
Definition: Dragger.h:185
void setColor(float r, float g, float b)
sets the current color
Definition: Dragger.h:102
icl8u b
Definition: Dragger.h:70
void dragTo(const utils::Point32f &x)
once dragged, this function will move the dragger
Definition: Dragger.h:146
icl8u g
Definition: Dragger.h:69
float d
Definition: Dragger.h:184