marciodrosa/ZineMob — Issue #3: Scrolling
Author: marciodrosa
Created: 2012-03-06 02:11:06+00:00
State: open
Labels: feature

The ViewportElement (that DrawableElement where the children are not drew outside of the bounds of the parent) should be renamed to something like "CropElement"; and the "crop" should be turned off.

So, a new DrawableElement called ViewportElement, that inherits from CropElement, will be used to do the scrolling effect.

The ViewportElement should have a directly child, the "root", that will be the parent of the "world" that will be scrolled.

The ViewportElement should have a method called lookAt(x, y). This method is used to set wich part of the world will be shown. The coordinates are relative to the "root" element. Internally, the ViewportElement will just move the root to the oposite side.