As we discussed, I'll assign the "cropping" functions
to you.
To do this, you could:
- create a new sub-package in the developers package
with your SFU
username as the title
- make a new interface in this package:
public interface Cropped {
public void cropTop(int numPixels);
public void cropBottom(int numPixels);
public void cropLeft(int numPixels);
public void cropRight(int numPixels);
}
(I've never implemented cropping before, so this might
not turn out to be
the best interface. If you or anyone has other ideas,
by all means please
suggest them.)
- create a new version of TheMatrix in your package
and call it, say,
TheCroppedMatrix, and have it extend TheMatrix, e.g.
class TheCroppedMatrix extends TheMatrix implements
Cropped {
// ...
}
To get an idea of how to approach this, Daryl's
TheButtonMatrix (in
developers.dvanhumb) does the same sort of thing for a
different feature.
- make a demo program that shows how to use the
cropping features in a
typical way, e.g. cropping a photo