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/nodes/intern/CMP_nodes/CMP_rotate.c')
-rw-r--r--source/blender/nodes/intern/CMP_nodes/CMP_rotate.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
index 4da0b20c6f8..4103981af46 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
+++ b/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
@@ -53,7 +53,7 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* note, this returns zero'd image */
float rad, u, v, s, c, centx, centy, miny, maxy, minx, maxx;
int x, y, yo, xo;
- ImBuf *ibuf, *obuf;
+ ImBuf *ibuf, *obuf;
rad= (M_PI*in[1]->vec[0])/180.0f;
@@ -68,36 +68,36 @@ static void node_composit_exec_rotate(void *data, bNode *node, bNodeStack **in,
maxy= -centy + (float)cbuf->y;
- ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0);
- obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0, 0);
+ ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0);
+ obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0, 0);
- if(ibuf){
- ibuf->rect_float=cbuf->rect;
- obuf->rect_float=stackbuf->rect;
+ if(ibuf){
+ ibuf->rect_float=cbuf->rect;
+ obuf->rect_float=stackbuf->rect;
for(y=miny; y<maxy; y++) {
yo= y+(int)centy;
- for(x=minx; x<maxx;x++) {
- u=c*x + y*s + centx;
- v=-s*x + c*y + centy;
- xo= x+(int)centx;
+ for(x=minx; x<maxx;x++) {
+ u=c*x + y*s + centx;
+ v=-s*x + c*y + centy;
+ xo= x+(int)centx;
- switch(node->custom1) {
- case 0:
- neareast_interpolation(ibuf, obuf, u, v, xo, yo);
- break ;
- case 1:
- bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
- break;
- case 2:
- bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
- }
+ switch(node->custom1) {
+ case 0:
+ neareast_interpolation(ibuf, obuf, u, v, xo, yo);
+ break ;
+ case 1:
+ bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
+ break;
+ case 2:
+ bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
+ }
- }
+ }
}
- /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
+ /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
s= sin(-rad);
c= cos(-rad);
centx= (float)cbuf->xof; centy= (float)cbuf->yof;