[Drawkit] drawkit suitability for a grid of resizable photo tiles
Graham Cox
graham.cox at bigpond.com
Sat Oct 4 08:10:19 PDT 2008
On 5 Oct 2008, at 12:38 am, Joel Reymont wrote:
> I need to lay out a bunch of photos in a grid of square tiles. I
> then need to be able to make each individual tile bigger or smaller
> by dragging on its side or corner. The end result should be a grid
> of rectangular tiles of different sizes.
>
> Is DrawKit the best solution for this?
No idea if it's the best solution, but it can handle the problem as
described fairly easily.
DKImageShape is a resizable object that displays an image and can be
resized with handles at its edges. It would be a simple matter to read
in a list of images, build a DKImageShape for each one and lay them
out in a grid. The resizing as described would just work.
I'm not clear whether you need the entire grid to adjust itself as an
object is resized or not, but if so, you would need to add that
behaviour using a layer subclass or perhaps a controller that
repositioned the objects as necessary within a standard layer.
Also, how many images are you talking about? If more than a few
hundred at a time you might need to do extra work to optimise
performance.
cheers, Graham
More information about the Drawkit
mailing list