ImageType type,
Map<Object, Object> properties,
Map<Object, Object> responseProperties
) throws CacheException
{
Configuration config = context.getConfiguration();
// See if we don't want any image generation (which is basically
// just for the renderkit test). Always generate a width and a height,
// and generate an area map if needed
if (Boolean.TRUE.equals(config.getProperty(BLOCK_IMAGE_GENERATION)))
{
responseProperties.put(WIDTH_RESPONSE_KEY, _TEST_WIDTH);
responseProperties.put(HEIGHT_RESPONSE_KEY, _TEST_HEIGHT);
Object o = properties.get(TABS_KEY);
if (o != null)
{
int length = ((Object[]) o).length;
MapArea[] areas = new MapArea[length];
for (int i = 0; i < length; i++)
{
areas[i] = new MapArea(new Rectangle(i, 0, 1, 1));
}
responseProperties.put(IMAGE_MAP_AREAS_RESPONSE_KEY, areas);
}
return new byte[0];
}
// Before we do any rendering check for Configuration.HEADLESS
if (Boolean.TRUE.equals(config.getProperty(Configuration.HEADLESS)) ||
!GraphicsUtils.isGraphicalEnvironment())
{
// We're special casing colorized icons so that we can generate
// them even if we don't have an X server
if (TECATE_NAMESPACE.equals(type.getNamespaceURI()) &&