code: protected NodeData createRectangleStyle(float x, float y, float width, float height, boolean stroke, boolean fill)
      {
          float lineWidth = transformLength((float) getGraphicsState().getLineWidth());
          float lw = (lineWidth < 1f) ? 1f : lineWidth;
          float wcor = stroke ? lw : 0.0f;
          
          NodeData ret = CSSFactory.createNodeData();
          TermFactory tf = CSSFactory.getTermFactory();
          ret.push(createDeclaration("position", tf.createIdent("absolute")));
          ret.push(createDeclaration("left", tf.createLength(x, unit)));
          ret.push(createDeclaration("top", tf.createLength(y, unit)));
          ret.push(createDeclaration("width", tf.createLength(width - wcor, unit)));
          ret.push(createDeclaration("height", tf.createLength(height - wcor, unit)));
          
          if (stroke)
          {
              ret.push(createDeclaration("border-width", tf.createLength(lw, unit)));
              ret.push(createDeclaration("border-style", tf.createIdent("solid")));
              String color = colorString(getGraphicsState().getStrokingColor());
              ret.push(createDeclaration("border-color", tf.createColor(color)));
          }
          
          if (fill)
          {
              String color = colorString(getGraphicsState().getNonStrokingColor());
              if (color != null)
                  ret.push(createDeclaration("background-color", tf.createColor(color)));
          }
  
          return ret;
      }
docs: Creates the style definition used for a rectangle element based on the given properties of the rectangle
  @param x The X coordinate of the rectangle.
  @param y The Y coordinate of the rectangle.
  @param width The width of the rectangle.
  @param height The height of the rectangle.
  @param stroke Should there be a stroke around?
  @param fill Should the rectangle be filled?
  @return The resulting element style definition.