Examples of Blending


Examples of com.badlogic.gdx.graphics.Pixmap.Blending

    }

    boolean disposePixmap = false;
    if (data.getFormat() != pixmap.getFormat()) {
      Pixmap tmp = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), data.getFormat());
      Blending blend = Pixmap.getBlending();
      Pixmap.setBlending(Blending.None);
      tmp.drawPixmap(pixmap, 0, 0, 0, 0, pixmap.getWidth(), pixmap.getHeight());
      Pixmap.setBlending(blend);
      pixmap = tmp;
      disposePixmap = true;
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.Blending

     */
    public Pixmap getPixmap(Format format) {
      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.Blending

    borderPixels >>= 1;
    rect.x += borderPixels;
    rect.y += borderPixels;
    currPage.rects.put(name, rect);

    Blending blending = Pixmap.getBlending();
    Pixmap.setBlending(Blending.None);
    this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y);

    if (duplicateBorder) {
      int imageWidth = image.getWidth();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap.Blending

    borderPixels >>= 1;
    rect.x += borderPixels;
    rect.y += borderPixels;
    currPage.rects.put(name, rect);

    Blending blending = Pixmap.getBlending();
    Pixmap.setBlending(Blending.None);
    this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y);
    Pixmap.setBlending(blending);

    // not terribly efficient (as the rest of the code) but will do :p
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.