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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-27 19:15:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-27 19:15:55 +0400
commitf1acd6ac3e78aa4b898ee310dae2814015616e5f (patch)
treef9e12a8ac3f65b75465920ec188803751fe06c8b /source/blender/editors/space_image/image_edit.c
parent49e0c832e16195d8a656798830a63074eb6cd6c7 (diff)
code cleanup: pass mouse position as int[2] rather then wmEvent
Diffstat (limited to 'source/blender/editors/space_image/image_edit.c')
-rw-r--r--source/blender/editors/space_image/image_edit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index 65df6f98efb..81423560fb5 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -260,7 +260,8 @@ void ED_image_get_uv_aspect(Image *ima, float *aspx, float *aspy)
*aspy *= (float)h;
}
-void ED_image_mouse_pos(SpaceImage *sima, ARegion *ar, wmEvent *event, float co[2])
+/* takes event->mval */
+void ED_image_mouse_pos(SpaceImage *sima, ARegion *ar, const int mval[2], float co[2])
{
int sx, sy, width, height;
float zoomx, zoomy;
@@ -270,8 +271,8 @@ void ED_image_mouse_pos(SpaceImage *sima, ARegion *ar, wmEvent *event, float co[
UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &sx, &sy);
- co[0] = ((event->mval[0] - sx) / zoomx) / width;
- co[1] = ((event->mval[1] - sy) / zoomy) / height;
+ co[0] = ((mval[0] - sx) / zoomx) / width;
+ co[1] = ((mval[1] - sy) / zoomy) / height;
}
void ED_image_point_pos(SpaceImage *sima, ARegion *ar, float x, float y, float *xr, float *yr)