}
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
String resourceClassName = ((UIPaint2D) component).isCacheable() ? Paint2DCachedResource.class.getName() : Paint2DResource.class.getName();
InternetResource image = getResource(resourceClassName);
image.encodeBegin(context, component, Collections.EMPTY_MAP);
// fix for bug CH-1445
String style = (String) component.getAttributes().get("style");
if (null != style) writer.writeAttribute("style", style, null);