Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp55
1 files changed, 29 insertions, 26 deletions
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 02497725d46..61ad4248fb0 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -23,53 +23,56 @@
#ifdef __cplusplus
extern "C" {
#endif
-# include "BKE_colortools.h"
+#include "BKE_colortools.h"
#ifdef __cplusplus
}
#endif
HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation() : CurveBaseOperation()
{
- this->addInputSocket(COM_DT_COLOR);
- this->addOutputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_COLOR);
+ this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = NULL;
}
void HueSaturationValueCorrectOperation::initExecution()
{
- CurveBaseOperation::initExecution();
- this->m_inputProgram = this->getInputSocketReader(0);
+ CurveBaseOperation::initExecution();
+ this->m_inputProgram = this->getInputSocketReader(0);
}
-void HueSaturationValueCorrectOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
+void HueSaturationValueCorrectOperation::executePixelSampled(float output[4],
+ float x,
+ float y,
+ PixelSampler sampler)
{
- float hsv[4], f;
+ float hsv[4], f;
- this->m_inputProgram->readSampled(hsv, x, y, sampler);
+ this->m_inputProgram->readSampled(hsv, x, y, sampler);
- /* adjust hue, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->m_curveMapping, 0, hsv[0]);
- hsv[0] += f - 0.5f;
+ /* adjust hue, scaling returned default 0.5 up to 1 */
+ f = curvemapping_evaluateF(this->m_curveMapping, 0, hsv[0]);
+ hsv[0] += f - 0.5f;
- /* adjust saturation, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->m_curveMapping, 1, hsv[0]);
- hsv[1] *= (f * 2.0f);
+ /* adjust saturation, scaling returned default 0.5 up to 1 */
+ f = curvemapping_evaluateF(this->m_curveMapping, 1, hsv[0]);
+ hsv[1] *= (f * 2.0f);
- /* adjust value, scaling returned default 0.5 up to 1 */
- f = curvemapping_evaluateF(this->m_curveMapping, 2, hsv[0]);
- hsv[2] *= (f * 2.0f);
+ /* adjust value, scaling returned default 0.5 up to 1 */
+ f = curvemapping_evaluateF(this->m_curveMapping, 2, hsv[0]);
+ hsv[2] *= (f * 2.0f);
- hsv[0] = hsv[0] - floorf(hsv[0]); /* mod 1.0 */
- CLAMP(hsv[1], 0.0f, 1.0f);
+ hsv[0] = hsv[0] - floorf(hsv[0]); /* mod 1.0 */
+ CLAMP(hsv[1], 0.0f, 1.0f);
- output[0] = hsv[0];
- output[1] = hsv[1];
- output[2] = hsv[2];
- output[3] = hsv[3];
+ output[0] = hsv[0];
+ output[1] = hsv[1];
+ output[2] = hsv[2];
+ output[3] = hsv[3];
}
void HueSaturationValueCorrectOperation::deinitExecution()
{
- CurveBaseOperation::deinitExecution();
- this->m_inputProgram = NULL;
+ CurveBaseOperation::deinitExecution();
+ this->m_inputProgram = NULL;
}