Select a code and press a hot-key (Ctrl+Alt+Shift+A by default) to copy it as the image (make a screenshot).
Default hot-key can be changed in Settings|Keymap (search for "Copy as image" action)
Some plugin options are available under Editor|Copy image options
Recent change notes
- Version 1.2: IDEA 2017.1 support, HiDPI mode support; default hot-key changed to Ctrl+Alt+Shift+A.
- Version 1.1: options page added (Editor|Copy image options); minor fixes.
General usage instructions
Select code fragment and press Ctrl+Alt+Shift+A to copy (Option+Command+Shift+A on Mac) it as high resolution raster image preserving all the editor features (inspection highlighting, code folding, parameter hints, etc.)