Package org.openscience.jchempaint.renderer.visitor

Examples of org.openscience.jchempaint.renderer.visitor.AWTDrawVisitor


        g.fillRect(0, 0, s.width, s.height);

        renderer.setDrawCenter(s.getWidth() / 2, s.getHeight() / 2);
        renderer.setModelCenter(m.getCenterX(), m.getCenterY());

        renderer.paintChemModel(chemModel, new AWTDrawVisitor(g));
    }
View Full Code Here


        super.paint(g);

        Graphics2D g2 = (Graphics2D) g;

        if (this.shouldPaintFromCache) {
            renderer.repaint(new AWTDrawVisitor(g2));
        } else {
            IChemModel chemModel = this.hub.getIChemModel();

            if (!isValidChemModel(chemModel))
                return;
View Full Code Here

            Rectangle result = shift(screen, diagram);

            // this makes sure the toolbars get drawn
            this.setPreferredSize(new Dimension(result.width, result.height));
            this.revalidate();
            renderer.paintChemModel(chemModel, new AWTDrawVisitor(g));

        }
    }
View Full Code Here

    }

    private void paintChemModelFitToScreen(IChemModel chemModel, Graphics2D g,
            Rectangle screen) {

        renderer.paintChemModel(chemModel, new AWTDrawVisitor(g), screen, true);

    }
View Full Code Here

        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

Related Classes of org.openscience.jchempaint.renderer.visitor.AWTDrawVisitor

Copyright © 2018 www.massapicom. 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.