diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_CropOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_CropOperation.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp index 162811ac31d..af68fa09f1a 100644 --- a/source/blender/compositor/operations/COM_CropOperation.cpp +++ b/source/blender/compositor/operations/COM_CropOperation.cpp @@ -37,7 +37,7 @@ void CropBaseOperation::updateArea() float width = inputReference->getWidth(); float height = inputReference->getHeight(); NodeTwoXYs local_settings = *this->m_settings; - + if (width > 0.0f && height > 0.0f) { if (this->m_relative) { local_settings.x1 = width * local_settings.fac_x1; @@ -53,7 +53,7 @@ void CropBaseOperation::updateArea() local_settings.x2 = width - 1; if (height <= local_settings.y2 + 1) local_settings.y2 = height - 1; - + this->m_xmax = max(local_settings.x1, local_settings.x2) + 1; this->m_xmin = min(local_settings.x1, local_settings.x2); this->m_ymax = max(local_settings.y1, local_settings.y2) + 1; @@ -101,12 +101,12 @@ CropImageOperation::CropImageOperation() : CropBaseOperation() bool CropImageOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) { rcti newInput; - + newInput.xmax = input->xmax + this->m_xmin; newInput.xmin = input->xmin + this->m_xmin; newInput.ymax = input->ymax + this->m_ymin; newInput.ymin = input->ymin + this->m_ymin; - + return NodeOperation::determineDependingAreaOfInterest(&newInput, readOperation, output); } |