Home ARBP Blogs and Opinions Review: FGThumbnailCanvas

Review: FGThumbnailCanvas

Open as PDF  Print Version
07 Aug 2011 bob.keeney  
avatar
 
 

Views: (416)
Replies: (0)
Votes: (0)
Favorited: (0)

Figa Software www.figasoftware.com released a new control called FGThumbailCanvas http://madebyfiga.com/fgthumbnailcanvas/ that lets you view a list of images in a nice scrollable list.  It's an easy to use set of classes that lets you create gorgeous interfaces like you've seen in iPhoto and Aperture.

Looks Great!

The FGThumbnailCanvas comes as a set of three classes and an interface class.  The FGThumbnailCanvas is a canvas subclass that you place on your window or container and it handles all of the drawing and manipulating of images for you.  To add an image to your list you simply add an instance of the PhotoThumbNail object:

dim f as folder item = GetFolderitem("Images").child("1.jpg")

dim oThumbNail as new PhotoThumbnail(f, "Image 1")

MyThumbNail.canvas.addThumbnail oThumbNail

MyThumbNail.Update


FGthumbnailCanvas 1























FGthumbnailCanvas 2





























FGthumbnailCanvas 3
























Eventful Planning

The ThumbNail canvas object has a number of events that are useful.  The ClickedThumbnail event informs you of which ThumbNail object was selected, whether it was a Contextual (right) click and the coordinates of the click.

Likewise, a SelectionChanged event informs you when a selection changes.  Perhaps you need to change other UI elements in your application or change a properties list.

Image of My Eye

The canvas manages the size of the images allowing for easy size manipulation.  It's really as simple as giving it the new size and telling the canvas to update:

MyThumbNail.CellSize = 256

MyThumbNail.Update

Likewise, you can specify whether or not to draw selection rectangles and how to draw them.

MyThumbNail.DrawSelectionRectangle = me.Value

MyThumbNail.SelectedBorderThickness

MyThumbNail.SelectedBorderColor = c

MyThumbNail.Update(true)

There are many options available in determining how to display and draw the thumbnails, background colors and padding around cells and so on.  The demo application supplied by Figa looks drippingly awesome on Mac OS X.  To work with Windows and Linux you'll probably want to determine more appropriate colors for those platforms.

Memory Management

Real Studio likes to load images into memory and that's okay unless you start talking hundreds or thousands of images.  The FGThumbNailClass automatically tracks which images are visible and only loads those that are.  Images that aren't visible or scrolled out of view automatically free of memory.  In addition, the ThumbNail class creates a smaller, less memory consuming thumbnail rather than try to load and scale the original image

The classes also add in a judicious amount of pragmas to reduce background processing, bounds checking, nil object checking and so on which means that it's fast enough you probably won't notice any lag.  In my testing, the action in Mac OS X was very smooth and slightly less smooth in Windows and Linux.

Requirements

FGThumbnailCanvas works on Mac OS X (Carbon and Cocoa), Windows and Linux and works with Personal, Professional, and Enterprise editions of Real Studio.

It does not work with Web Edition.

Purchase Information

FGThumbnailCanvas comes with two licensing options - standard and professional.  The standard license (£ 20) gets you a set of encrypted classes.  The professional license (£ 100) includes the full source code.  Each comes with a Real Studio example project and PDF documentation.

Conclusion

The FGThumbnailCanvas should be a wonderful addition to your arsenal of third-party controls for Real Studio.  This inexpensive set of classes and controls are nicely done and should work nicely in your applications that require its capabilities.

 
Tags: figa software (1) , fgthumbnailcanvas (1) , third party (1) Add Tags
 

Comments

There are no comments for this item

Be the first to leave a comment

Login to leave a comment

 

ARBP Members Login

This Sign In is for registered ARBP members only. Please read the information on this page to discover the benefits of membership.



To start accessing the ARBP site you only have to register. After that you can purchase any of the memberships to unlock additional content.

Purchase REALbasic