Package com.sun.jna.examples.unix.X11

Examples of com.sun.jna.examples.unix.X11.GC


            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
            x11.XFillRectangle(dpy, pm, gc, 0, 0, width, height);
View Full Code Here


        }
      }
      int width = bounds.x + bounds.width;
      int height = bounds.y + bounds.height;
      final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
      final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
      if (gc == null) {
        return null;
      }
      x11.XSetForeground(dpy, gc, new NativeLong(0));
      x11.XFillRectangle(dpy, pm, gc, 0, 0, width, height);
View Full Code Here

                                    Window w, Raster raster) {
            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

                    X11 x11 = X11.INSTANCE;
                    Xext ext = Xext.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null)
                        return;
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        if (raster == null
                            || ((pm = createBitmap(dpy, win, w, raster)) == null)) {
                            ext.XShapeCombineMask(dpy, win,
View Full Code Here

                BufferedImage buf = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB_PRE);
                Graphics g = buf.getGraphics();
                g.drawImage(image, 0, 0, w, h, null);
               
                GC gc = x11.XCreateGC(dpy, win, new NativeLong(0), null);
                Pixmap pixmap = x11.XCreatePixmap(dpy, win, w, h, 32);
                try {
                    x11.XSetForeground(dpy, gc, new NativeLong(0));
                    x11.XFillRectangle(dpy, pixmap, gc, 0, 0, w, h);
                    Raster raster = buf.getData();
                    int[] pixel = new int[4];
View Full Code Here

                                           Raster raster) {
            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

                    X11 x11 = X11.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null) {
                        return;
                    }
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        pm = src.getPixmap(dpy, win);
                        Xext ext = Xext.INSTANCE;
                        ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
View Full Code Here

                                           Raster raster) {
            final X11 x11 = X11.INSTANCE;
            Rectangle bounds = raster.getBounds();
            int width = bounds.x + bounds.width;
            int height = bounds.y + bounds.height;
            final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
            final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
            if (gc == null) {
                return null;
            }
            x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

                    X11 x11 = X11.INSTANCE;
                    Display dpy = x11.XOpenDisplay(null);
                    if (dpy == null) {
                        return;
                    }
                    Pixmap pm = null;
                    try {
                        X11.Window win = getDrawable(w);
                        pm = src.getPixmap(dpy, win);
                        Xext ext = Xext.INSTANCE;
                        ext.XShapeCombineMask(dpy, win, X11.Xext.ShapeBounding,
View Full Code Here

          Rectangle.union(bounds, rectangles[i], bounds);
        }
      }
      int width = bounds.x + bounds.width;
      int height = bounds.y + bounds.height;
      final Pixmap pm = x11.XCreatePixmap(dpy, win, width, height, 1);
      final GC gc = x11.XCreateGC(dpy, pm, new NativeLong(0), null);
      if (gc == null) {
        return null;
      }
      x11.XSetForeground(dpy, gc, new NativeLong(0));
View Full Code Here

TOP

Related Classes of com.sun.jna.examples.unix.X11.GC

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.