style cleanup
This commit is contained in:
@@ -64,7 +64,7 @@ void TranslateOperation::executePixel(float output[4], float x, float y, PixelSa
|
||||
float originalXPos = x - this->getDeltaX();
|
||||
float originalYPos = y - this->getDeltaY();
|
||||
|
||||
switch(m_wrappingType) {
|
||||
switch (m_wrappingType) {
|
||||
case 0:
|
||||
//Intentionally empty, originalXPos and originalYPos have been set before
|
||||
break;
|
||||
@@ -83,7 +83,7 @@ void TranslateOperation::executePixel(float output[4], float x, float y, PixelSa
|
||||
break;
|
||||
}
|
||||
|
||||
this->m_inputOperation->read(output, originalXPos , originalYPos, sampler);
|
||||
this->m_inputOperation->read(output, originalXPos, originalYPos, sampler);
|
||||
|
||||
}
|
||||
|
||||
@@ -98,20 +98,20 @@ bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBuffe
|
||||
newInput.ymin = input->ymin - this->getDeltaY();
|
||||
newInput.ymax = input->ymax - this->getDeltaY();
|
||||
|
||||
if (m_wrappingType == 1 || m_wrappingType == 3){
|
||||
if (m_wrappingType == 1 || m_wrappingType == 3) {
|
||||
// wrap only on the x-axis if tile is wrapping
|
||||
newInput.xmin = getWrappedOriginalXPos(input->xmin);
|
||||
newInput.xmax = getWrappedOriginalXPos(input->xmax);
|
||||
if(newInput.xmin > newInput.xmax){
|
||||
if (newInput.xmin > newInput.xmax) {
|
||||
newInput.xmin = 0;
|
||||
newInput.xmax = this->getWidth();
|
||||
}
|
||||
}
|
||||
if(m_wrappingType == 2 || m_wrappingType == 3) {
|
||||
if (m_wrappingType == 2 || m_wrappingType == 3) {
|
||||
// wrap only on the y-axis if tile is wrapping
|
||||
newInput.ymin = getWrappedOriginalYPos(input->ymin);
|
||||
newInput.ymax = getWrappedOriginalYPos(input->ymax);
|
||||
if (newInput.ymin > newInput.ymax){
|
||||
if (newInput.ymin > newInput.ymax) {
|
||||
newInput.ymin = 0;
|
||||
newInput.ymax = this->getHeight();
|
||||
}
|
||||
@@ -131,17 +131,22 @@ float TranslateOperation::getWrappedOriginalXPos(float x)
|
||||
float originalXPos = 0;
|
||||
|
||||
// Positive offset: Append image data from the left
|
||||
if ( this->m_relativeOffsetX > 0 ) {
|
||||
if ( x < this->m_relativeOffsetX )
|
||||
if (this->m_relativeOffsetX > 0) {
|
||||
if (x < this->m_relativeOffsetX) {
|
||||
originalXPos = this->getWidth() - this->m_relativeOffsetX + x;
|
||||
else
|
||||
originalXPos = x - this->m_relativeOffsetX;
|
||||
} else {
|
||||
// Negative offset: Append image data from the right
|
||||
if (x < (this->getWidth() + this->m_relativeOffsetX))
|
||||
}
|
||||
else {
|
||||
originalXPos = x - this->m_relativeOffsetX;
|
||||
else
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Negative offset: Append image data from the right
|
||||
if (x < (this->getWidth() + this->m_relativeOffsetX)) {
|
||||
originalXPos = x - this->m_relativeOffsetX;
|
||||
}
|
||||
else {
|
||||
originalXPos = x - (this->getWidth() + this->m_relativeOffsetX);
|
||||
}
|
||||
}
|
||||
|
||||
while (originalXPos < 0) originalXPos += this->m_width;
|
||||
@@ -154,17 +159,22 @@ float TranslateOperation::getWrappedOriginalYPos(float y)
|
||||
float originalYPos = 0;
|
||||
|
||||
// Positive offset: Append image data from the bottom
|
||||
if ( this->m_relativeOffsetY > 0 ) {
|
||||
if ( y < this->m_relativeOffsetY )
|
||||
originalYPos = this->getHeight()- this->m_relativeOffsetY + y;
|
||||
else
|
||||
originalYPos = y - this->m_relativeOffsetY;
|
||||
} else {
|
||||
// Negative offset: Append image data from the top
|
||||
if (y < (this->getHeight() + this->m_relativeOffsetY))
|
||||
if (this->m_relativeOffsetY > 0) {
|
||||
if (y < this->m_relativeOffsetY) {
|
||||
originalYPos = this->getHeight() - this->m_relativeOffsetY + y;
|
||||
}
|
||||
else {
|
||||
originalYPos = y - this->m_relativeOffsetY;
|
||||
else
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Negative offset: Append image data from the top
|
||||
if (y < (this->getHeight() + this->m_relativeOffsetY)) {
|
||||
originalYPos = y - this->m_relativeOffsetY;
|
||||
}
|
||||
else {
|
||||
originalYPos = y - (this->getHeight() + this->m_relativeOffsetY);
|
||||
}
|
||||
}
|
||||
|
||||
while (originalYPos < 0) originalYPos += this->m_height;
|
||||
|
@@ -1393,7 +1393,7 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN
|
||||
|
||||
/* turn button into search button */
|
||||
if (searchprop) {
|
||||
if(RNA_property_flag(prop) & PROP_NEVER_UNLINK)
|
||||
if (RNA_property_flag(prop) & PROP_NEVER_UNLINK)
|
||||
but->type = SEARCH_MENU;
|
||||
else
|
||||
but->type = SEARCH_MENU_UNLINK;
|
||||
|
@@ -712,7 +712,7 @@ typedef struct NodeTrackPosData {
|
||||
} NodeTrackPosData;
|
||||
|
||||
typedef struct NodeTranslateData {
|
||||
char wrap_axis, pad[7];
|
||||
char wrap_axis, pad[7];
|
||||
} NodeTranslateData;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user