Examples of Pixmap


Examples of com.badlogic.gdx.graphics.Pixmap

        //fillTransparencyMap();
    }
   
   
    public GDXImageCatalog(AtlasRegion fromRegion) {       
        this (fromRegion, new Pixmap (Gdx.files.getFileHandle(Detonator.INSTANCE.gameDataDir+"/img/"+fromRegion.name+".png", Files.FileType.Internal)));

        //Log.info("NAMENAMENAME: "+fromRegion.name);
       
        //fillTransparencyMap();
    }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

          + config.fullscreen);

      if (config.iconPaths.size > 0) {
        ByteBuffer[] icons = new ByteBuffer[config.iconPaths.size];
        for (int i = 0, n = config.iconPaths.size; i < n; i++) {
          Pixmap pixmap = new Pixmap(Gdx.files.getFileHandle(config.iconPaths.get(i), config.iconFileTypes.get(i)));
          if (pixmap.getFormat() != Format.RGBA8888) {
            Pixmap rgba = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGBA8888);
            rgba.drawPixmap(pixmap, 0, 0);
            pixmap = rgba;
          }
          icons[i] = ByteBuffer.allocateDirect(pixmap.getPixels().limit());
          icons[i].put(pixmap.getPixels()).flip();
          pixmap.dispose();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  Pixmap pixmap;

  @Override
  public void loadAsync (AssetManager manager, String fileName, FileHandle file, PixmapParameter parameter) {
    pixmap = null;
    pixmap = new Pixmap(file);
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

    pixmap = new Pixmap(file);
  }

  @Override
  public Pixmap loadSync (AssetManager manager, String fileName, FileHandle file, PixmapParameter parameter) {
    Pixmap pixmap = this.pixmap;
    this.pixmap = null;
    return pixmap;
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

          + config.fullscreen);

      if (config.iconPaths.size > 0) {
        ByteBuffer[] icons = new ByteBuffer[config.iconPaths.size];
        for (int i = 0, n = config.iconPaths.size; i < n; i++) {
          Pixmap pixmap = new Pixmap(Gdx.files.getFileHandle(config.iconPaths.get(i), config.iconFileTypes.get(i)));
          if (pixmap.getFormat() != Format.RGBA8888) {
            Pixmap rgba = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGBA8888);
            rgba.drawPixmap(pixmap, 0, 0);
            pixmap = rgba;
          }
          icons[i] = ByteBuffer.allocateDirect(pixmap.getPixels().limit());
          icons[i].put(pixmap.getPixels()).flip();
          pixmap.dispose();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

    return rect;
  }
 
  private void newPage() {
    Page page = new Page();
    page.image = new Pixmap(pageWidth, pageHeight, pageFormat);
    page.root =  new Node(0, 0, pageWidth, pageHeight, null, null, null);
    page.rects = new OrderedMap<String, Rectangle>();
    pages.add(page);
    currPage = page;
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  void loadSkeleton (FileHandle skeletonFile, boolean reload) {
    if (skeletonFile == null) return;

    // A regular texture atlas would normally usually be used. This returns a white image for images not found in the atlas.
    Pixmap pixmap = new Pixmap(32, 32, Format.RGBA8888);
    pixmap.setColor(new Color(1, 1, 1, 0.33f));
    pixmap.fill();
    final AtlasRegion fake = new AtlasRegion(new Texture(pixmap), 0, 0, 32, 32);
    pixmap.dispose();

    String atlasFileName = skeletonFile.nameWithoutExtension();
    if (atlasFileName.endsWith(".json")) atlasFileName = new FileHandle(atlasFileName).nameWithoutExtension();
    FileHandle atlasFile = skeletonFile.sibling(atlasFileName + ".atlas");
    if (!atlasFile.exists()) atlasFile = skeletonFile.sibling(atlasFileName + ".atlas.txt");
View Full Code Here

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

                                    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

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

                    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

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

                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
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.