LEFT | RIGHT |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version.· | 7 * of the License, or (at your option) any later version.· |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 x1 = ar->winrct.xmin + (winx - sima->zoom * w) / 2.0f; | 585 x1 = ar->winrct.xmin + (winx - sima->zoom * w) / 2.0f; |
586 y1 = ar->winrct.ymin + (winy - sima->zoom * h) / 2.0f; | 586 y1 = ar->winrct.ymin + (winy - sima->zoom * h) / 2.0f; |
587 | 587 |
588 x1 -= sima->zoom * sima->xof; | 588 x1 -= sima->zoom * sima->xof; |
589 y1 -= sima->zoom * sima->yof; | 589 y1 -= sima->zoom * sima->yof; |
590 ········ | 590 ········ |
591 /* relative display right */ | 591 /* relative display right */ |
592 ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1) / sima->zoom); | 592 ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1) / sima->zoom); |
593 ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx / sima->zoom); | 593 ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx / sima->zoom); |
594 ········ | 594 ········ |
595 /* relative display left */ | |
596 ar->v2d.cur.ymin = ((ar->winrct.ymin - (float)y1) / sima->zoom); | |
597 ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy / sima->zoom); | |
598 ························ | 595 ························ |
599 tf = EM_get_active_mtface(em, NULL, NULL, 1); /* partial
ly selected face is ok */ | 596 tf = EM_get_active_mtface(em, NULL, NULL, 1); /* partial
ly selected face is ok */ |
600 ························ | 597 ························ |
601 if(tf && (tf->mode & TF_TEX)) { | 598 if(tf && (tf->mode & TF_TEX)) { |
602 /* don't need to check for pin here, see above *
/ | 599 /* don't need to check for pin here, see above *
/ |
603 sima->image= tf->tpage; | 600 sima->image= tf->tpage; |
604 ································ | 601 ································ |
LEFT | RIGHT |