GSDP:GAM100/CProcessing/imageMode()

From Inside
Jump to: navigation, search

imageMode()

Description

Sets the mode to draw an image (similar to a rectangle) with a ShapeMode. Defaults to CENTER

Parameters

imageMode(ShapeMode mode)

  • mode - (ShapeMode) The mode to draw images with.

Example

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

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:>