Changeset 599


Ignore:
Timestamp:
12/10/13 11:59:20 (11 years ago)
Author:
jts21
Message:

Make cropped images always be positioned on the cursor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameMouseActions.java

    r580 r599  
    635635                                Picture cropped = _lastCropped.copy();
    636636                                cropped.setParent(null);
     637                                // move the cropped image to the cursor
     638                                int width = cropped.getWidth();
     639                                int height = cropped.getHeight();
     640                                if(cropped.getX() + width < MouseX) {
     641                                        cropped.setX(MouseX - width);
     642                                }
     643                                if(cropped.getY() + height < MouseY) {
     644                                        cropped.setY(MouseY - height);
     645                                }
    637646                                pickup(cropped);
    638647                                // MIKE put the code below up here
Note: See TracChangeset for help on using the changeset viewer.