Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to invoke resize(int,int) on a array type PImage()

$
0
0

This is needed to adapt the graphics to the different sizes of my android devices.

import controlP5.*;
int buttonSize = ... ;
ControlP5 MyController;
Button but_Play;
MyController = new ControlP5(this);

  // make button Play

  PImage[] play_Img = {loadImage("play.png"), loadImage("play.png"), loadImage("play.png")};

  //**play_Img.resize(0,60); = not allowed**

  but_Play = MyController.addButton("but_Play")
    .setValue(0)
    .setPosition(tab, dotWidth)
    .setSize(buttonSize, buttonSize)
    .setImages(play_Img)
    .updateSize()
    ;

Viewing all articles
Browse latest Browse all 2896

Trending Articles