diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 22:42:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 22:42:03 +0400 |
commit | 570cc70772d78703053956ce57b20c6c4ed74c95 (patch) | |
tree | b4c5db0392384251f1b1ccefc17c959d3e742977 /source/blender/compositor/operations/COM_ImageOperation.cpp | |
parent | 8fd2267e56d3d0b6bb860800eb8059bcbfa0b501 (diff) |
style cleanup: compositor operations
Diffstat (limited to 'source/blender/compositor/operations/COM_ImageOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ImageOperation.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index 04cd91d3c3a..9dbe8419daa 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -36,7 +36,7 @@ extern "C" { #include "IMB_imbuf_types.h" } -BaseImageOperation::BaseImageOperation(): NodeOperation() +BaseImageOperation::BaseImageOperation() : NodeOperation() { this->image = NULL; this->buffer = NULL; @@ -48,15 +48,15 @@ BaseImageOperation::BaseImageOperation(): NodeOperation() this->depthBuffer = NULL; this->numberOfChannels = 0; } -ImageOperation::ImageOperation(): BaseImageOperation() +ImageOperation::ImageOperation() : BaseImageOperation() { this->addOutputSocket(COM_DT_COLOR); } -ImageAlphaOperation::ImageAlphaOperation(): BaseImageOperation() +ImageAlphaOperation::ImageAlphaOperation() : BaseImageOperation() { this->addOutputSocket(COM_DT_VALUE); } -ImageDepthOperation::ImageDepthOperation(): BaseImageOperation() +ImageDepthOperation::ImageDepthOperation() : BaseImageOperation() { this->addOutputSocket(COM_DT_VALUE); } @@ -66,12 +66,12 @@ ImBuf *BaseImageOperation::getImBuf() ImBuf *ibuf; ibuf = BKE_image_get_ibuf(this->image, this->imageUser); - if (ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) { - return NULL; + if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) { + return NULL; } if (ibuf->rect_float == NULL) { - IMB_float_from_rect(ibuf); + IMB_float_from_rect(ibuf); } return ibuf; } @@ -108,7 +108,7 @@ void BaseImageOperation::determineResolution(unsigned int resolution[], unsigned } } -void ImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])\ +void ImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { if (this->imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { color[0] = 0.0f; @@ -118,15 +118,15 @@ void ImageOperation::executePixel(float *color, float x, float y, PixelSampler s } else { switch (sampler) { - case COM_PS_NEAREST: - neareast_interpolation_color(this->buffer, NULL, color, x, y); - break; - case COM_PS_BILINEAR: - bilinear_interpolation_color(this->buffer, NULL, color, x, y); - break; - case COM_PS_BICUBIC: - bicubic_interpolation_color(this->buffer, NULL, color, x, y); - break; + case COM_PS_NEAREST: + neareast_interpolation_color(this->buffer, NULL, color, x, y); + break; + case COM_PS_BILINEAR: + bilinear_interpolation_color(this->buffer, NULL, color, x, y); + break; + case COM_PS_BICUBIC: + bicubic_interpolation_color(this->buffer, NULL, color, x, y); + break; } } } @@ -141,15 +141,15 @@ void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSamp else { tempcolor[3] = 1.0f; switch (sampler) { - case COM_PS_NEAREST: - neareast_interpolation_color(this->buffer, NULL, tempcolor, x, y); - break; - case COM_PS_BILINEAR: - bilinear_interpolation_color(this->buffer, NULL, tempcolor, x, y); - break; - case COM_PS_BICUBIC: - bicubic_interpolation_color(this->buffer, NULL, tempcolor, x, y); - break; + case COM_PS_NEAREST: + neareast_interpolation_color(this->buffer, NULL, tempcolor, x, y); + break; + case COM_PS_BILINEAR: + bilinear_interpolation_color(this->buffer, NULL, tempcolor, x, y); + break; + case COM_PS_BICUBIC: + bicubic_interpolation_color(this->buffer, NULL, tempcolor, x, y); + break; } color[0] = tempcolor[3]; } |