code: @Override
     public final <E> E style(E element, Object data) throws VectorPrintException {
        initURL(String.valueOf((data != null) ? convert(data) : getData()));
        try {
           /*
            always call createImage when styling, subclasses may do their own document writing etc. in createImage
            */
           com.itextpdf.text.Image img = createImage(getWriter().getDirectContent(), (data != null) ? convert(data) : getData(), getValue(OPACITY, Float.class));
           if (data != null) {
              setData(convert(data));
           }
           applySettings(img);
           VectorPrintDocument document = (VectorPrintDocument) getDocument();
           if (getValue(SHADOW, Boolean.class)) {
              // draw a shadow, but we do not know our position
              document.addHook(new VectorPrintDocument.AddElementHook(VectorPrintDocument.AddElementHook.INTENTION.PRINTIMAGESHADOW, img, this, getStyleClass()));
           }
           document.addHook(new VectorPrintDocument.AddElementHook(VectorPrintDocument.AddElementHook.INTENTION.DRAWNEARIMAGE, img, this, getStyleClass()));
           if (element != null) {
              // if we got here with an element, proceed no further, this element should finaly be added to the document
              return element;
           }
  
           return (E) img;
        } catch (BadElementException ex) {
           throw new VectorPrintException(ex);
        }
     }
docs: Calls {@link #initURL(String) }, {@link #createImage(com.itextpdf.text.pdf.PdfContentByte, java.lang.Object, float) },
  {@link #applySettings(com.itextpdf.text.Image) }. Calls {@link VectorPrintDocument#addHook(com.vectorprint.report.itext.VectorPrintDocument.AddElementHook)
  } for drawing image shadow and for drawing near this image.
  
  @param <E>
  @param element
  @param data when null use {@link #getData() }
  @return
  @throws VectorPrintException