public final class DrawMoleculeToRenderer extends Object
Molecule
to a Renderer
.
Delegates Renderer.drawMolecule(chemaxon.struc.Molecule, com.chemaxon.overlap.cli.util.images.Area)
and
Renderer.placeHorizontalTextInto(java.lang.String, com.chemaxon.overlap.cli.util.images.Halign, com.chemaxon.overlap.cli.util.images.Valign, com.chemaxon.overlap.cli.util.images.Area, int, int)
methods.Constructor and Description |
---|
DrawMoleculeToRenderer()
Construct with default settings.
|
Modifier and Type | Method and Description |
---|---|
DrawMoleculeToRenderer |
border(String borderColor,
int borderOverflow)
Specify border.
|
DrawMoleculeToRenderer |
borderColor(String borderColor)
Draw border.
|
static DrawMoleculeToRenderer |
drawMoleculeToRenderer() |
DrawMoleculeToRenderer |
labelColor(String labelColor)
Label color.
|
DrawMoleculeToRenderer |
labelFontHeight(int labelFontHeight)
Label font height.
|
void |
paint(Renderer renderer,
Area area,
Molecule molecule)
Paint.
|
void |
paint(Renderer renderer,
Area area,
Molecule molecule,
String labelOrNull)
Paint.
|
DrawMoleculeToRenderer |
shrinkMoleculeArea(int px)
Shrink molecule area.
|
public DrawMoleculeToRenderer()
public static DrawMoleculeToRenderer drawMoleculeToRenderer()
public DrawMoleculeToRenderer borderColor(String borderColor)
borderColor
- Color to use, passed to Renderer.setColor(java.lang.String)
this
instancepublic DrawMoleculeToRenderer labelColor(String labelColor)
labelColor
- Color to use, passed to Renderer.setColor(java.lang.String)
this
instancepublic DrawMoleculeToRenderer labelFontHeight(int labelFontHeight)
labelFontHeight
- Font height passed to Renderer.setFontHeight(int)
for labelsthis
instancepublic DrawMoleculeToRenderer border(String borderColor, int borderOverflow)
borderColor
- Color to use, passed to Renderer.setColor(java.lang.String)
borderOverflow
- Border overflow, passed to Renderer.drawBorder(com.chemaxon.overlap.cli.util.images.Area, int)
this
instancepublic DrawMoleculeToRenderer shrinkMoleculeArea(int px)
Area.shrink(int)
before painting Molecule
using
Renderer.drawMolecule(chemaxon.struc.Molecule, com.chemaxon.overlap.cli.util.images.Area)
.px
- Pixels to shrinkthis
instancepublic void paint(Renderer renderer, Area area, Molecule molecule, String labelOrNull)
renderer
- Renderer to paint toarea
- Location of the structuremolecule
- Molecule to paintlabelOrNull
- Textual label to paint