You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that's really smart. then you could wrap it by casting to ofColor for the other cases, right?
template<classPixelType>
int ofColor_<PixelType>::getHex(){
return ((ofColor) *this)::getHex();
}
template<>
int ofColor_<unsignedchar>::getHex(){
//non-scaled version
}
mmh, actually you'll need to do some post scaling, if you'll be returning an ofColor_ it will work automatically but since it's a number you'll need to scale it before returning but the rest should work
one solution is to pre-scale or post-scale the inputs/outputs using the
limit()
method for division/multiplication.the best solution would also maintain the speed of the current implementation for ofColor, and not do any unnecessary scaling in that case.
The text was updated successfully, but these errors were encountered: