Merge branch 'master' into add_effect_engine

Conflicts:
	include/hyperion/Hyperion.h
	libsrc/hyperion/Hyperion.cpp
	libsrc/jsonserver/JsonClientConnection.cpp

Former-commit-id: 53467c63b97c7dc370f04357588f7cf1ad0e3ada
This commit is contained in:
T. van der Zwan
2013-12-05 21:01:52 +00:00
35 changed files with 1900 additions and 407 deletions

View File

@@ -11,11 +11,11 @@ add_library(hyperion-utils
${CURRENT_HEADER_DIR}/ColorRgba.h
${CURRENT_SOURCE_DIR}/ColorRgba.cpp
${CURRENT_HEADER_DIR}/Image.h
${CURRENT_HEADER_DIR}/ColorTransform.h
${CURRENT_HEADER_DIR}/HsvTransform.h
${CURRENT_SOURCE_DIR}/ColorTransform.cpp
${CURRENT_HEADER_DIR}/HsvTransform.h
${CURRENT_SOURCE_DIR}/HsvTransform.cpp
${CURRENT_HEADER_DIR}/RgbChannelTransform.h
${CURRENT_SOURCE_DIR}/RgbChannelTransform.cpp
${CURRENT_HEADER_DIR}/jsonschema/JsonFactory.h
${CURRENT_HEADER_DIR}/jsonschema/JsonSchemaChecker.h

View File

@@ -1,9 +1,10 @@
// STL includes
#include <cmath>
#include <utils/ColorTransform.h>
// Utils includes
#include <utils/RgbChannelTransform.h>
ColorTransform::ColorTransform() :
RgbChannelTransform::RgbChannelTransform() :
_threshold(0),
_gamma(1.0),
_blacklevel(0.0),
@@ -12,7 +13,7 @@ ColorTransform::ColorTransform() :
initializeMapping();
}
ColorTransform::ColorTransform(double threshold, double gamma, double blacklevel, double whitelevel) :
RgbChannelTransform::RgbChannelTransform(double threshold, double gamma, double blacklevel, double whitelevel) :
_threshold(threshold),
_gamma(gamma),
_blacklevel(blacklevel),
@@ -21,55 +22,55 @@ ColorTransform::ColorTransform(double threshold, double gamma, double blacklevel
initializeMapping();
}
ColorTransform::~ColorTransform()
RgbChannelTransform::~RgbChannelTransform()
{
}
double ColorTransform::getThreshold() const
double RgbChannelTransform::getThreshold() const
{
return _threshold;
}
void ColorTransform::setThreshold(double threshold)
void RgbChannelTransform::setThreshold(double threshold)
{
_threshold = threshold;
initializeMapping();
}
double ColorTransform::getGamma() const
double RgbChannelTransform::getGamma() const
{
return _gamma;
}
void ColorTransform::setGamma(double gamma)
void RgbChannelTransform::setGamma(double gamma)
{
_gamma = gamma;
initializeMapping();
}
double ColorTransform::getBlacklevel() const
double RgbChannelTransform::getBlacklevel() const
{
return _blacklevel;
}
void ColorTransform::setBlacklevel(double blacklevel)
void RgbChannelTransform::setBlacklevel(double blacklevel)
{
_blacklevel = blacklevel;
initializeMapping();
}
double ColorTransform::getWhitelevel() const
double RgbChannelTransform::getWhitelevel() const
{
return _whitelevel;
}
void ColorTransform::setWhitelevel(double whitelevel)
void RgbChannelTransform::setWhitelevel(double whitelevel)
{
_whitelevel = whitelevel;
initializeMapping();
}
void ColorTransform::initializeMapping()
void RgbChannelTransform::initializeMapping()
{
// initialize the mapping as a linear array
for (int i = 0; i < 256; ++i)

View File

@@ -154,6 +154,8 @@ void JsonSchemaChecker::checkType(const Json::Value & value, const Json::Value &
wrongType = !value.isNumeric();
else if (type == "integer")
wrongType = !value.isIntegral();
else if (type == "double")
wrongType = !value.isDouble();
else if (type == "boolean")
wrongType = !value.isBool();
else if (type == "object")
@@ -162,6 +164,8 @@ void JsonSchemaChecker::checkType(const Json::Value & value, const Json::Value &
wrongType = !value.isArray();
else if (type == "null")
wrongType = !value.isNull();
else if (type == "enum")
wrongType = !value.isString();
else if (type == "any")
wrongType = false;
// else