diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-26 15:47:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-26 15:47:47 +0400 |
commit | f39a21c36f63f2dac4dc530f6ea3d98efc75fd9d (patch) | |
tree | 82a08421488ab985c5d9c08ff5ad0343ee55d598 /source/blender/editors/mask/mask_edit.c | |
parent | fec872ef9c0bb6904cbe9a7b59b3f51ae7bb0702 (diff) |
add ED_space_image_get_size_fl, ED_space_clip_get_size_fl
Diffstat (limited to 'source/blender/editors/mask/mask_edit.c')
-rw-r--r-- | source/blender/editors/mask/mask_edit.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c index 0491b164fec..5c724d9e5a3 100644 --- a/source/blender/editors/mask/mask_edit.c +++ b/source/blender/editors/mask/mask_edit.c @@ -110,13 +110,10 @@ void ED_mask_mouse_pos(const bContext *C, wmEvent *event, float co[2]) } case SPACE_IMAGE: { - int width, height; float frame_size[2]; SpaceImage *sima = sa->spacedata.first; ARegion *ar = CTX_wm_region(C); - ED_space_image_get_size(sima, &width, &height); - frame_size[0] = width; - frame_size[1] = height; + ED_space_image_get_size_fl(sima, frame_size); ED_image_mouse_pos(sima, ar, event, co); BKE_mask_coord_from_frame(co, co, frame_size); break; @@ -155,13 +152,10 @@ void ED_mask_point_pos(const bContext *C, float x, float y, float *xr, float *yr break; case SPACE_IMAGE: { - int width, height; float frame_size[2]; SpaceImage *sima = sa->spacedata.first; ARegion *ar = CTX_wm_region(C); - ED_space_image_get_size(sima, &width, &height); - frame_size[0] = width; - frame_size[1] = height; + ED_space_image_get_size_fl(sima, frame_size); ED_image_point_pos(sima, ar, x, y, &co[0], &co[1]); BKE_mask_coord_from_frame(co, co, frame_size); break; @@ -203,13 +197,10 @@ void ED_mask_point_pos__reverse(const bContext *C, float x, float y, float *xr, break; case SPACE_IMAGE: { - int width, height; float frame_size[2]; SpaceImage *sima = sa->spacedata.first; ARegion *ar = CTX_wm_region(C); - ED_space_image_get_size(sima, &width, &height); - frame_size[0] = width; - frame_size[1] = height; + ED_space_image_get_size_fl(sima, frame_size); co[0] = x; co[1] = y; |