GSDP:GAM100/CProcessing/imageRotated()

From Inside
Jump to: navigation, search

imageRotated()

Description

Images loaded using loadImage() can be displayed using imageRotated(). The reference point used to draw the image can be specified with imageMode() .

Parameters

imageRotated(PImage img, float x, float y, float w, float h, int a, float r)

  • img - (PImage) The loaded image to draw
  • x - (float) the horizontal position of the image
  • y - (float) the vertical position of the image
  • w - (float) the width of the image
  • h - (float) the height of the image
  • a - (int) the alpha to draw with
  • r - (float) the angle of the image

Example

PImage justin_face;
void init()
{
  justin_face = loadImage("./Assets/justin1.png");
}

float rotation = 0;
void update()
{
  background(color(255, 255, 255, 255));
  imageRotated(justin_face, mouseX, mouseY, 100, 150, 255, rotation);
  rotation++;
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>