Examples of drawPixmap()


Examples of com.badlogic.gdx.graphics.Pixmap.drawPixmap()

        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.drawPixmap()

        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.drawPixmap()

      Pixmap pixmap = new Pixmap(getWidth(), getRows(), Format.Alpha);
      BufferUtils.copy(getBuffer(), pixmap.getPixels(), pixmap.getPixels().capacity());
      Pixmap converted = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), format);
      Blending blending = Pixmap.getBlending();
      Pixmap.setBlending(Blending.None);
      converted.drawPixmap(pixmap, 0, 0);
      Pixmap.setBlending(blending);
      pixmap.dispose();
      return converted;
    }
   
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.drawPixmap()

      int pixmapHeight = pixmap.getHeight();
      int potWidth = MathUtils.nextPowerOfTwo(pixmapWidth);
      int potHeight = MathUtils.nextPowerOfTwo(pixmapHeight);
      if (pixmapWidth != potWidth || pixmapHeight != potHeight) {
        Pixmap tmp = new Pixmap(potWidth, potHeight, pixmap.getFormat());
        tmp.drawPixmap(pixmap, 0, 0, 0, 0, pixmapWidth, pixmapHeight);
        pixmap.dispose();
        return tmp;
      }
    }
    return pixmap;
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.drawPixmap()

      int pixmapHeight = pixmap.getHeight();
      int potWidth = MathUtils.nextPowerOfTwo(pixmapWidth);
      int potHeight = MathUtils.nextPowerOfTwo(pixmapHeight);
      if (pixmapWidth != potWidth || pixmapHeight != potHeight) {
        Pixmap tmp = new Pixmap(potWidth, potHeight, pixmap.getFormat());
        tmp.drawPixmap(pixmap, 0, 0, 0, 0, pixmapWidth, pixmapHeight);
        pixmap.dispose();
        return tmp;
      }
    }
    return pixmap;
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.drawPixmap()

      System.out.println("Processing " + entry.inputFile);
      Pixmap pixmap = new Pixmap(new FileHandle(entry.inputFile));
      if (pixmap.getFormat() != Format.RGB888 && pixmap.getFormat() != Format.RGB565) {
        System.out.println("Converting from " + pixmap.getFormat() + " to RGB888!");
        Pixmap tmp = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGB888);
        tmp.drawPixmap(pixmap, 0, 0, 0, 0, pixmap.getWidth(), pixmap.getHeight());
        pixmap.dispose();
        pixmap = tmp;
      }
      ETC1.encodeImagePKM(pixmap).write(new FileHandle(entry.outputFile));
      pixmap.dispose();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.drawPixmap()

        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.drawPixmap()

        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.drawPixmap()

        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.trolltech.qt.gui.QPainter.drawPixmap()

   
    // Get a painter for the image.  This is the background (the initial image).
      QPixmap pix = new QPixmap(f.fileName());
      QPixmap hilightedPix = new QPixmap(pix.size());
      QPainter p = new QPainter(hilightedPix);
      p.drawPixmap(0,0, pix);

      // Create a transparent pixmap.  The only non-transparent
      // piece is the hilight that will be overlayed to hilight text no the background
      QPixmap overlayPix = new QPixmap(pix.size());
      overlayPix.fill(QColor.transparent);
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.