diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-26 14:36:48 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-01-26 14:36:48 +0300 |
commit | 38111eb224f08c7e5afddd6b4b429a61fa0106bc (patch) | |
tree | f2c4822d45d44a03cd061902f80d0847eaa5ccee /source/blender/editors/space_image/space_image.c | |
parent | 009304523e6a4240f49cbb609f2820f70ebfdb2c (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/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 4 |
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) |