Menu

#14 add cropping to TheMatrix

open
angela
5
2005-05-19
2005-05-19
No

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

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.