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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-26 14:36:48 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-26 14:36:48 +0300
commit38111eb224f08c7e5afddd6b4b429a61fa0106bc (patch)
treef2c4822d45d44a03cd061902f80d0847eaa5ccee /source/blender/editors/space_image
parent009304523e6a4240f49cbb609f2820f70ebfdb2c (diff)
Patch #20800: uv editor zoom rate not properly calculated,
uv's were drawn slightly offset from the image. Patch by Masahito Takahashi, thanks!
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 34737c62450..33b4e37dc8f 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -218,8 +218,8 @@ void ED_space_image_zoom(SpaceImage *sima, ARegion *ar, float *zoomx, float *zoo
ED_space_image_size(sima, &width, &height);
- *zoomx= (float)(ar->winrct.xmax - ar->winrct.xmin)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width);
- *zoomy= (float)(ar->winrct.ymax - ar->winrct.ymin)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height);
+ *zoomx= (float)(ar->winrct.xmax - ar->winrct.xmin + 1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width);
+ *zoomy= (float)(ar->winrct.ymax - ar->winrct.ymin + 1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height);
}
void ED_space_image_uv_aspect(SpaceImage *sima, float *aspx, float *aspy)