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_ScaleOperation.h
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_ScaleOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.h155
1 files changed, 94 insertions, 61 deletions
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.h b/source/blender/compositor/operations/COM_ScaleOperation.h
index d761e441419..28e32ff8606 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.h
+++ b/source/blender/compositor/operations/COM_ScaleOperation.h
@@ -22,79 +22,112 @@
#include "COM_NodeOperation.h"
class BaseScaleOperation : public NodeOperation {
-public:
- void setSampler(PixelSampler sampler) { this->m_sampler = (int) sampler; }
- void setVariableSize(bool variable_size) { m_variable_size = variable_size; };
+ public:
+ void setSampler(PixelSampler sampler)
+ {
+ this->m_sampler = (int)sampler;
+ }
+ void setVariableSize(bool variable_size)
+ {
+ m_variable_size = variable_size;
+ };
-protected:
- BaseScaleOperation();
+ protected:
+ BaseScaleOperation();
- PixelSampler getEffectiveSampler(PixelSampler sampler) { return (m_sampler == -1) ? sampler : (PixelSampler) m_sampler; }
+ PixelSampler getEffectiveSampler(PixelSampler sampler)
+ {
+ return (m_sampler == -1) ? sampler : (PixelSampler)m_sampler;
+ }
- int m_sampler;
- bool m_variable_size;
+ int m_sampler;
+ bool m_variable_size;
};
class ScaleOperation : public BaseScaleOperation {
-private:
- SocketReader *m_inputOperation;
- SocketReader *m_inputXOperation;
- SocketReader *m_inputYOperation;
- float m_centerX;
- float m_centerY;
-public:
- ScaleOperation();
- bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
+ private:
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputXOperation;
+ SocketReader *m_inputYOperation;
+ float m_centerX;
+ float m_centerY;
+
+ public:
+ ScaleOperation();
+ bool determineDependingAreaOfInterest(rcti *input,
+ ReadBufferOperation *readOperation,
+ rcti *output);
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
};
class ScaleAbsoluteOperation : public BaseScaleOperation {
- SocketReader *m_inputOperation;
- SocketReader *m_inputXOperation;
- SocketReader *m_inputYOperation;
- float m_centerX;
- float m_centerY;
-
-public:
- ScaleAbsoluteOperation();
- bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
+ SocketReader *m_inputOperation;
+ SocketReader *m_inputXOperation;
+ SocketReader *m_inputYOperation;
+ float m_centerX;
+ float m_centerY;
+
+ public:
+ ScaleAbsoluteOperation();
+ bool determineDependingAreaOfInterest(rcti *input,
+ ReadBufferOperation *readOperation,
+ rcti *output);
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
};
class ScaleFixedSizeOperation : public BaseScaleOperation {
- SocketReader *m_inputOperation;
- int m_newWidth;
- int m_newHeight;
- float m_relX;
- float m_relY;
-
- /* center is only used for aspect correction */
- float m_offsetX;
- float m_offsetY;
- bool m_is_aspect;
- bool m_is_crop;
- /* set from other properties on initialization,
- * check if we need to apply offset */
- bool m_is_offset;
-public:
- ScaleFixedSizeOperation();
- bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output);
- void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
- void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
-
- void initExecution();
- void deinitExecution();
- void setNewWidth(int width) { this->m_newWidth = width; }
- void setNewHeight(int height) { this->m_newHeight = height; }
- void setIsAspect(bool is_aspect) { this->m_is_aspect = is_aspect; }
- void setIsCrop(bool is_crop) { this->m_is_crop = is_crop; }
- void setOffset(float x, float y) { this->m_offsetX = x; this->m_offsetY = y; }
+ SocketReader *m_inputOperation;
+ int m_newWidth;
+ int m_newHeight;
+ float m_relX;
+ float m_relY;
+
+ /* center is only used for aspect correction */
+ float m_offsetX;
+ float m_offsetY;
+ bool m_is_aspect;
+ bool m_is_crop;
+ /* set from other properties on initialization,
+ * check if we need to apply offset */
+ bool m_is_offset;
+
+ public:
+ ScaleFixedSizeOperation();
+ bool determineDependingAreaOfInterest(rcti *input,
+ ReadBufferOperation *readOperation,
+ rcti *output);
+ void determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]);
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
+ void setNewWidth(int width)
+ {
+ this->m_newWidth = width;
+ }
+ void setNewHeight(int height)
+ {
+ this->m_newHeight = height;
+ }
+ void setIsAspect(bool is_aspect)
+ {
+ this->m_is_aspect = is_aspect;
+ }
+ void setIsCrop(bool is_crop)
+ {
+ this->m_is_crop = is_crop;
+ }
+ void setOffset(float x, float y)
+ {
+ this->m_offsetX = x;
+ this->m_offsetY = y;
+ }
};
#endif