Change-Id: I9744ab3379c64fc3c829885a17295b22f2b210a2
if (sam)
{
- double samx = (double)(sw) / (double)(tex->pt->w * w * 4);
- double samy = (double)(sh) / (double)(tex->pt->h * h * 4);
+ double samx;
+ double samy;
+ if (tex->im &&
+ (tex->im->orient == EVAS_IMAGE_ORIENT_270 || tex->im->orient == EVAS_IMAGE_ORIENT_90))
+ {
+ samx = (double)(sh) / (double)(tex->pt->h * w * 4);
+ samy = (double)(sw) / (double)(tex->pt->w * h * 4);
+ }
+ else
+ {
+ samx = (double)(sw) / (double)(tex->pt->w * w * 4);
+ samy = (double)(sh) / (double)(tex->pt->h * h * 4);
+ }
PUSH_SAMPLES(pn, samx, samy);
}