Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_view.c
| Context not available. | |||||
| float fx, fy; | float fx, fy; | ||||
| if (ibuf == NULL) { | if (ibuf == NULL) { | ||||
| IMB_freeImBuf(ibuf); | IMB_freeImBuf(ibuf); | ||||
| info->draw = 0; | info->draw = 0; | ||||
| return; | return; | ||||
| } | } | ||||
| UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy); | UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy); | ||||
| fx += (float) ibuf->x / 2.0f; | fx += (float)scene->r.xsch / 2.0f; | ||||
| fy += (float) ibuf->y / 2.0f; | fy += (float)scene->r.ysch / 2.0f; | ||||
| fx *= (float)ibuf->x / (float)scene->r.xsch; | |||||
| fy *= (float)ibuf->y / (float)scene->r.ysch; | |||||
| if (fx >= 0.0f && fy >= 0.0f && fx < ibuf->x && fy < ibuf->y) { | if (fx >= 0.0f && fy >= 0.0f && fx < ibuf->x && fy < ibuf->y) { | ||||
| const float *fp; | const float *fp; | ||||
| unsigned char *cp; | unsigned char *cp; | ||||
| int x = (int) fx, y = (int) fy; | int x = (int) fx, y = (int) fy; | ||||
| info->x = x; | info->x = x; | ||||
| info->y = y; | info->y = y; | ||||
| info->draw = 1; | info->draw = 1; | ||||
| info->channels = ibuf->channels; | info->channels = ibuf->channels; | ||||
| Context not available. | |||||