Examples of Surface


Examples of org.jnode.driver.video.Surface

    public static void main(String[] args) throws Exception {

        final String devId = (args.length > 0) ? args[0] : "" /*"fb0"*/;

        Surface g = null;
        try {
            Device dev = null;
            if ("".equals(devId)) {
                final Collection<Device> devs = DeviceUtils.getDevicesByAPI(FrameBufferAPI.class);
                int dev_count = devs.size();
                if (dev_count > 0) {
                    Device[] dev_a = devs.toArray(new Device[dev_count]);
                    dev = dev_a[0];
                }
            }

            if (dev == null) {
                final DeviceManager dm = InitialNaming.lookup(DeviceManager.NAME);
                dev = dm.getDevice(devId);
            }

            final FrameBufferAPI api = dev.getAPI(FrameBufferAPI.class);
            final FrameBufferConfiguration conf = api.getConfigurations()[0];

            g = api.open(conf);

            TextScreenConsoleManager mgr = new TextScreenConsoleManager();

            ScrollableTextScreen ts = new FBConsole.FBPcTextScreen(g).createCompatibleScrollableBufferScreen(500);

            ScrollableTextScreenConsole first =
                new ScrollableTextScreenConsole(mgr, "console", ts,
                    ConsoleManager.CreateOptions.TEXT |
                        ConsoleManager.CreateOptions.SCROLLABLE);

            mgr.registerConsole(first);
            mgr.focus(first);

            new CommandShell(first).run();
            Thread.sleep(60 * 1000);

        } catch (Throwable ex) {
            log.error("Error in FBConsole", ex);
        } finally {
            if (g != null) {
                log.info("Close graphics");
                g.close();
            }
        }
    }
View Full Code Here

Examples of org.opengis.geometry.primitive.Surface

     * @return the surface created out of the points
     */
    protected Surface createSurface(final DirectPosition[] points) {
        Curve curve = createCurve(points);
        SurfaceBoundary surfaceBoundary = createSurfaceBoundary(curve);
        Surface surface = getPrimitiveFactory().createSurface(surfaceBoundary);
        return surface;
    }
View Full Code Here

Examples of sun.java2d.Surface

        VolatileImage vi = gc.createCompatibleVolatileImage(10, 10);
        vi.validate(gc);
        if (vi instanceof DestSurfaceProvider) {
            System.out.println("Passed: VI is DestSurfaceProvider");
            Surface s = ((DestSurfaceProvider) vi).getDestSurface();
            if (s instanceof AccelSurface) {
                System.out.println("Passed: Obtained Accel Surface");
                printSurface((AccelSurface) s);
            }
            Graphics g = vi.getGraphics();
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.