Changeset 1310


Ignore:
Timestamp:
Nov 9, 2006, 10:27:35 AM (13 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Fixed behaviour of the pig while resizing window
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cxx/cxxtest.cpp

    r1282 r1310  
    8484    while(!kk->getEvent(ev.CACA_EVENT_KEY_PRESS, &ev, 0)) {
    8585
     86
     87        /* In case of resize ...*/
     88        if((x + pig->getWidth())-1 >= qq->getWidth() || x < 0 )
     89            x = 0;
     90        if((y + pig->getHeight())-1 >= qq->getHeight() || y < 0 )
     91            y = 0;
     92
     93
     94
     95
    8696        qq->Clear();
    8797
     
    104114        if(y + pig->getHeight() >= qq->getHeight() || y < 0 )
    105115            iy = -iy;
     116
    106117    }
    107118
Note: See TracChangeset for help on using the changeset viewer.