Package org.apache.harmony.awt.gl.windows

Examples of org.apache.harmony.awt.gl.windows.WinGDIPGraphics2D


    private final long gi;
    private final int trX;
    private final int trY;

    public WinThemeGraphics(Graphics gr) {
        WinGDIPGraphics2D wgr = (WinGDIPGraphics2D)gr;
        this.gi = wgr.getGraphicsInfo();
        trX = Math.round((float)wgr.getTransform().getTranslateX());
        trY = Math.round((float)wgr.getTransform().getTranslateY());

        int clip[];
        Shape clipShape = gr.getClip();
        if (clipShape instanceof MultiRectArea) {
            clip = ((MultiRectArea) clipShape).rect;
View Full Code Here


    private final long gi;
    private final int trX;
    private final int trY;

    public WinThemeGraphics(Graphics gr) {
        WinGDIPGraphics2D wgr = (WinGDIPGraphics2D)gr;
        this.gi = wgr.getGraphicsInfo();
        trX = Math.round((float)wgr.getTransform().getTranslateX());
        trY = Math.round((float)wgr.getTransform().getTranslateY());

        int clip[];
        Shape clipShape = gr.getClip();
        if (clipShape instanceof MultiRectArea) {
            clip = ((MultiRectArea) clipShape).rect;
View Full Code Here

            final long pdc = WinPrinterFactory.getPrinterDC(
                            service.printerName, service.getPrinterProps()
                                            .getStructPtr());
            final double xRes = WinPrinterFactory.getPixelsPerInchX(pdc) / 72;
            final double yRes = WinPrinterFactory.getPixelsPerInchY(pdc) / 72;
            final Graphics2D g2d = new WinGDIPGraphics2D(pdc, (char) 2,
                            (int) (format.getWidth() * xRes), (int) (format
                                            .getHeight() * yRes));

            try {
                startJob(pdc, getDocName(img, attributes),
                                getDestinationPath(attributes));
                WinPrinterFactory.startPage(pdc);
                g2d.drawImage(img, (int) (format.getImageableX() * xRes),
                                (int) (format.getImageableY() * yRes),
                                (int) (format.getImageableWidth() * xRes),
                                (int) (format.getImageableHeight() * yRes),
                                Color.WHITE, null);
                WinPrinterFactory.endPage(pdc);
View Full Code Here

            }
        }

        private Graphics2D getGraphics(final long pdc, final PageFormat format)
                        throws PrintException {
            final Graphics2D g2d = new WinGDIPGraphics2D(pdc, (char) 3,
                            (int) format.getWidth(), (int) format.getHeight());

            g2d.setColor(Color.BLACK);
            g2d.setBackground(Color.WHITE);
            g2d.setClip((int) format.getImageableX(), (int) format
                            .getImageableY(), (int) format.getImageableWidth(),
                            (int) format.getImageableHeight());

            return g2d;
        }
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.gl.windows.WinGDIPGraphics2D

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.