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>2012-05-17 17:44:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-17 17:44:15 +0400
commit979f6bab9c1aba27b8d018d1481987d841f68ee1 (patch)
tree162419d475bf68326b3b5e88b25f27057fee6831 /source/blender/compositor/operations/COM_CropOperation.cpp
parentfe0d1a381003408dedcd3142a727c77806617150 (diff)
style cleanup: braces, compositor
Diffstat (limited to 'source/blender/compositor/operations/COM_CropOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index a763ded7f52..3c4e3428ec2 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -23,7 +23,7 @@
#include "COM_CropOperation.h"
#include "BLI_math.h"
-CropBaseOperation::CropBaseOperation() :NodeOperation(){
+CropBaseOperation::CropBaseOperation() :NodeOperation() {
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
this->inputOperation = NULL;
@@ -34,7 +34,7 @@ void CropBaseOperation::updateArea() {
SocketReader * inputReference = this->getInputSocketReader(0);
float width = inputReference->getWidth();
float height = inputReference->getHeight();
- if (this->relative){
+ if (this->relative) {
settings->x1= width * settings->fac_x1;
settings->x2= width * settings->fac_x2;
settings->y1= height * settings->fac_y1;
@@ -55,22 +55,23 @@ void CropBaseOperation::updateArea() {
this->ymin = MIN2(settings->y1, settings->y2);
}
-void CropBaseOperation::initExecution(){
+void CropBaseOperation::initExecution() {
this->inputOperation = this->getInputSocketReader(0);
updateArea();
}
-void CropBaseOperation::deinitExecution(){
+void CropBaseOperation::deinitExecution() {
this->inputOperation = NULL;
}
-CropOperation::CropOperation() :CropBaseOperation(){
+CropOperation::CropOperation() :CropBaseOperation() {
}
-void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]){
- if ((x < this->xmax && x >= xmin) && (y < ymax && y >= ymin)){
+void CropOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
+ if ((x < this->xmax && x >= xmin) && (y < ymax && y >= ymin)) {
inputOperation->read(color, x, y, sampler, inputBuffers);
- } else {
+ }
+ else {
color[0] = 0.0f;
color[1] = 0.0f;
color[2] = 0.0f;
@@ -78,10 +79,10 @@ void CropOperation::executePixel(float *color, float x, float y, PixelSampler sa
}
}
-CropImageOperation::CropImageOperation() :CropBaseOperation(){
+CropImageOperation::CropImageOperation() :CropBaseOperation() {
}
-bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output){
+bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) {
rcti newInput;
newInput.xmax = input->xmax + this->xmin;
@@ -92,13 +93,13 @@ bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output);
}
-void CropImageOperation::determineResolution(unsigned int resolution[], unsigned int preferedResolution[]){
+void CropImageOperation::determineResolution(unsigned int resolution[], unsigned int preferedResolution[]) {
NodeOperation::determineResolution(resolution, preferedResolution);
updateArea();
resolution[0] = this->xmax - this->xmin;
resolution[1] = this->ymax - this->ymin;
}
-void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]){
+void CropImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) {
this->inputOperation->read(color, (x + this->xmin), (y + this->ymin), sampler, inputBuffers);
}