/* Find out how large an icon is. */
struct DiskObject *icon;
struct Rectangle rect;
if(GetIconRectangleA(NULL,NULL,icon,NULL,&rect,NULL))
{
LONG width,height;
width = rect.MaxX - rect.MinX + 1;
height = rect.MaxY - rect.MinY + 1;
Printf("icon is %ld×%ld pixels in size.\n",
}
/* Find out which area the icon rendering would
* cover if a label would be printed below it.
*/
struct RastPort *rp;
if(GetIconRectangle(rp,NULL,icon,"a rather long label text",&rect,TAG_DONE))
{
Printf("icon plus label would cover the area %ld,%ld×%ld,%ld\n",
rect.MinX,rect.MinY,rect.MaxX,rect.MaxY);
}