GSDP:GAM100/CProcessing/mat3 scale()

From Inside
< GSDP:GAM100‎ | CProcessing
Revision as of 07:31, 26 June 2019 by >Zachary.logsdon (New page: {{GSDP:GAM100API.css}} = mat3_scale() = == Description == Creates a Mat3 scale matrix from an input vector. ==== Parameters ==== mat3_scale(Vec2 scale) ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

mat3_scale()

Description

Creates a Mat3 scale matrix from an input vector.

Parameters

mat3_scale(Vec2 scale)

  • data - (unsigned char *) A pointer to a list of colors in and order like R,G,B,A,R,G,... order
  • w - (int) The desired width of the created image.
  • h - (int) The desired height of the created image.

Example

PImage created;

void init()
{
  unsigned char colors[] = {255,0,0,255,   // Red
                            255,255,0,255, // Yellow
                            0,0,255,255,   // Blue
                            0,255,0,255};  // Green

  created = createImage(colors, 2, 2);
}

void update()
{
  background(color(255, 255, 255, 255));
  image(created, canvasWidth/2, canvasHeight/2, 100, 100, 255);
}

Related

Personal tools
Namespaces

Variants
Actions
Navigation
NameSpaces:>
Tools
Dynamic:>