code: @Override
      public void paint(IReaction reaction, IDrawVisitor drawVisitor, Rectangle2D bounds, boolean resetCenter) {
  
          // calculate the bounds
          Rectangle2D modelBounds = BoundsCalculator.calculateBounds(reaction);
  
          this.setupTransformToFit(bounds, modelBounds, AverageBondLengthCalculator.calculateAverageBondLength(reaction),
                  resetCenter);
  
          // generate the elements
          IRenderingElement diagram = this.generateDiagram(reaction);
  
          // paint it
          this.paint(drawVisitor, diagram);
      }
docs: Paint a reaction.
  
  @param reaction the reaction to paint
  @param drawVisitor the visitor that does the drawing
  @param bounds the bounds on the screen
  @param resetCenter
  if true, set the draw center to be the center of bounds