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:
authorTon Roosendaal <ton@blender.org>2003-10-22 13:06:30 +0400
committerTon Roosendaal <ton@blender.org>2003-10-22 13:06:30 +0400
commit389b06c91e10b34c48fe048f59cea6ee236287bb (patch)
treed8e52b5c4b382a5b9db1ef98ec6305ff87bb35c3 /source/blender/src/drawipo.c
parent26698cfa3fc56e901a3d2e4c6c102d50796ed41c (diff)
More fixes in object drawing:
- transparent faces in editmode don't write in zbuffer anymore (prevents drawing errors) but still read (so behind the subsurf faces for example) - improved drawing 'handles' for subsurf editing - going in editmode to Solid view, will draw extra wire always, including transparent faces when set - works in all combos... http://www.blender.org/docs/ton/subsurf.html - fixed error; padplus/padminus didnt work in buttonswindow anymore - improved buttonswin: when dragging window edge, the buttons dont rescale, but stay same size
Diffstat (limited to 'source/blender/src/drawipo.c')
-rw-r--r--source/blender/src/drawipo.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c
index 24b43bc15c9..16cf0d4a36e 100644
--- a/source/blender/src/drawipo.c
+++ b/source/blender/src/drawipo.c
@@ -417,12 +417,23 @@ void test_view2d(View2D *v2d, int winx, int winy)
}
if(v2d->keepaspect) {
+ short do_x=0, do_y=0;
+
+ /* when a window edge changes, the aspect ratio can't be used to
+ find which is the best new 'cur' rect. thats why it stores 'old' */
+ if(winx!=v2d->oldwinx) do_x= 1;
+ if(winy!=v2d->oldwiny) do_y= 1;
+ v2d->oldwinx= winx;
+ v2d->oldwiny= winy;
+
dx= (cur->ymax-cur->ymin)/(cur->xmax-cur->xmin);
dy= ((float)winy)/((float)winx);
- /* dx/dy is the total aspect */
+ if(do_x==do_y) {
+ if( dy > 1.0) do_x= 1; else do_x= 0;
+ }
- if( dx/dy > 1.0) {
+ if( do_x ) {
/* portrait window: correct for x */
dx= cur->ymax-cur->ymin;