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:
Diffstat (limited to 'source/blender/compositor/operations/COM_BoxMaskOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index 0244be4cad3..ae83115ff69 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -38,7 +38,7 @@ void BoxMaskOperation::initExecution()
{
this->inputMask = this->getInputSocketReader(0);
this->inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD(this->data->rotation);
+ const double rad = DEG2RAD((double)this->data->rotation);
this->cosine = cos(rad);
this->sine = sin(rad);
this->aspectRatio = ((float)this->getWidth())/this->getHeight();
@@ -60,12 +60,12 @@ void BoxMaskOperation::executePixel(float *color, float x, float y, PixelSampler
this->inputMask->read(inputMask, x, y, sampler, inputBuffers);
this->inputValue->read(inputValue, x, y, sampler, inputBuffers);
- float halfHeight = (this->data->height)/2.0f;
- float halfWidth = this->data->width/2.0f;
- bool inside = rx > this->data->x-halfWidth
- && rx < this->data->x+halfWidth
- && ry > this->data->y-halfHeight
- && ry < this->data->y+halfHeight;
+ float halfHeight = this->data->height / 2.0f;
+ float halfWidth = this->data->width / 2.0f;
+ bool inside = (rx > this->data->x - halfWidth &&
+ rx < this->data->x + halfWidth &&
+ ry > this->data->y - halfHeight &&
+ ry < this->data->y + halfHeight);
switch (this->maskType) {
case CMP_NODE_MASKTYPE_ADD: