Examples of paintMolecule()


Examples of org.openscience.cdk.renderer.Renderer2D.paintMolecule()

    g.setColor(backgroundColour);   
    g.fillRect(0, 0, width, height);
    r2dm.setBackColor(backgroundColour);
    r2dm.setFont(new Font(fontName, fontStyle, fontSize));
    r2dm.setColorAtomsByType(colourAtoms);
    if(mol != null) r2d.paintMolecule(mol, img.createGraphics(), true, true);
    ImageIO.write(img, format, out);   
  }
}
View Full Code Here

Examples of org.openscience.jchempaint.renderer.Renderer.paintMolecule()

        Document document = domImpl.createDocument(null, "svg", null);
        SVGGraphics2D svgGenerator = new SVGGraphics2D(document);
        svgGenerator.setBackground(Color.LIGHT_GRAY);
        svgGenerator.setColor(Color.LIGHT_GRAY);
        svgGenerator.fill(new Rectangle(0, 0, moleculewidth, moleculeheight));
        renderer.paintMolecule(cdkmol, new AWTDrawVisitor(svgGenerator), drawArea, false);
        boolean useCSS = false;
        baos = new ByteArrayOutputStream();
        Writer outwriter = new OutputStreamWriter(baos, "UTF-8");
        StringBuffer sb = new StringBuffer();
        svgGenerator.stream(outwriter, useCSS);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.