Member Avatar for aan_rwh

how to create animated figures 0 runs from the top left corner to the upper right corner and back again from the top right corner to the upper left in a row

what operating system and compiler? c++ itself it completly ignorant of graphics.

you can try this code..

    void setup()
    {
      size(200, 200);
      background(255);
      noStroke();

      // draw the original position in gray
      fill(192);
      rect(20, 20, 40, 40);

      // draw a translucent red rectangle by changing the coordinates
      fill(255, 0, 0, 128);
      rect(20 + 60, 20 + 80, 40, 40);

      // draw a translucent blue rectangle by translating the grid
      fill(0, 0, 255, 128);
      pushMatrix();
      translate(60, 80);
      rect(20, 20, 40, 40);
      popMatrix();

}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.