} else {
throw new BridgeException
(cursorElement, ERR_URI_IMAGE_INVALID,
new Object[] {uriStr});
}
GraphicsNode node = ctx.getGVTBuilder().build(ctx, rootElement);
//
// The cursorSize define the viewport into which the
// cursor is displayed. That viewport is platform
// dependant and is not defined by the SVG content.
//
float width = DEFAULT_PREFERRED_WIDTH;
float height = DEFAULT_PREFERRED_HEIGHT;
UnitProcessor.Context uctx
= UnitProcessor.createContext(ctx, rootElement);
String s = rootElement.getAttribute(SVG_WIDTH_ATTRIBUTE);
if (s.length() != 0) {
width = UnitProcessor.svgHorizontalLengthToUserSpace
(s, SVG_WIDTH_ATTRIBUTE, uctx);
}
s = rootElement.getAttribute(SVG_HEIGHT_ATTRIBUTE);
if (s.length() != 0) {
height = UnitProcessor.svgVerticalLengthToUserSpace
(s, SVG_HEIGHT_ATTRIBUTE, uctx);
}
cursorSize
= Toolkit.getDefaultToolkit().getBestCursorSize
((int)Math.round(width), (int)Math.round(height));
// Handle the viewBox transform
AffineTransform at
= ViewBox.getPreserveAspectRatioTransform(rootElement,
cursorSize.width,
cursorSize.height);
Filter filter = node.getGraphicsNodeRable(true);
f = new AffineRable8Bit(filter, at);
} catch (BridgeException ex) {
throw ex;
} catch (SecurityException ex) {
throw new BridgeException(cursorElement, ERR_URI_UNSECURE,