~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/editors/interface/interface_draw.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-05-12 20:02:22 UTC
  • mfrom: (14.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20120512200222-lznjs2cxzaq96wua
Tags: 2.63a-1
* New upstream bugfix release
  + debian/patches/: re-worked since source code changed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1469
1469
        ImBuf *scaleibuf;
1470
1470
        const float scalex = ((float)ibuf->x - 2 * margin) / width;
1471
1471
        const float scaley = ((float)ibuf->y - 2 * margin) / height;
1472
 
        float off_x = (int)track_pos[0] - track_pos[0] + 0.5f;
1473
 
        float off_y = (int)track_pos[1] - track_pos[1] + 0.5f;
 
1472
        /* NOTE: 1.0f = 0.5f for integer coordinate coorrection (center of pixel vs. left bottom corner of bixel)
 
1473
         *       and 0.5f for centering image in preview (cross is draving at exact center of widget so image
 
1474
         *       should be shifted by half of pixel for correct centering) - sergey */
 
1475
        float off_x = (int)track_pos[0] - track_pos[0] + 1.0f;
 
1476
        float off_y = (int)track_pos[1] - track_pos[1] + 1.0f;
1474
1477
        int x, y;
1475
1478
 
1476
1479
        scaleibuf = IMB_allocImBuf(width, height, 32, IB_rect);