<?php $my_string = filter_input(INPUT_GET, 'my_string', FILTER_SANITIZE_STRING); ?>
Saturday, July 10, 2010
Thursday, July 8, 2010
There is a method in the Sprite class
One of its parameters is bounds:Rectangle.
Now, when I first tried to use it I thought,
it specified the bounds of the complete sprite,
i.e. the rectangle inside which the sprite will
be forced to stay.
1. But it is actually the bounding rectangle for the
topLeft point of the sprite.
So, during the dragging, the topLeft point of the sprite
will be forced to stay in this rectangle.
2. Also, the x & y for the bounding rectangle are wrt
to the parent of sprite.
3. Also, if you have applied some scaling transformations on
your sprite, you should take that into account while specifying
x,y,width,height for your bounding rectangle.
- ► 2017 (64)
- ► 2016 (67)
- ► 2013 (48)
- ► 2012 (59)
- ► 2011 (77)
- ▼ 2010 (147)
- ► 2009 (46)
- ► 2008 (73)