deadpixel.keystone
Class CornerPinSurface

java.lang.Object
  extended by deadpixel.keystone.CornerPinSurface

public class CornerPinSurface
extends Object

A simple Corner Pin keystoned surface. The surface is a quad mesh that can be skewed to an arbitrary shape by moving its four corners. September-2011 Added JAI library for keystone calculus (@edumo)


Field Summary
 float x
           
 float y
           
 
Method Summary
 int getRes()
           
 PVector getTransformedCursor(int cx, int cy)
          This function will give you the position of the mouse in the surface's coordinate system.
 PVector getTransformedMouse()
           
 boolean isMouseOver()
          Returns true if the mouse is over this surface, false otherwise.
 void moveTo(float x, float y)
           
 void render(PGraphics g, PImage texture)
          Renders and applies keystoning to the image using a specific renderer.
 void render(PGraphics g, PImage texture, int tX, int tY, int tW, int tH)
          Renders and applies keystoning to the image using a specific render.
 void render(PImage texture)
          Renders and applies keystoning to the image using the parent applet's renderer.
 void render(PImage texture, int tX, int tY, int tW, int tH)
          Renders and applies keystoning to the image using the parent applet's renderer.The tX, tY, tW and tH parameters specify which section of the image to render onto this surface.
 void setControlPointsColor(int newColor)
          Sets the control points color
 void setGridColor(int newColor)
          Sets the grid used for calibration's color
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public float x

y

public float y
Method Detail

getRes

public int getRes()
Returns:
The surface's mesh resolution, in number of "tiles"

render

public void render(PImage texture)
Renders and applies keystoning to the image using the parent applet's renderer.


render

public void render(PGraphics g,
                   PImage texture)
Renders and applies keystoning to the image using a specific renderer.


render

public void render(PImage texture,
                   int tX,
                   int tY,
                   int tW,
                   int tH)
Renders and applies keystoning to the image using the parent applet's renderer.The tX, tY, tW and tH parameters specify which section of the image to render onto this surface.


render

public void render(PGraphics g,
                   PImage texture,
                   int tX,
                   int tY,
                   int tW,
                   int tH)
Renders and applies keystoning to the image using a specific render. The tX, tY, tW and tH parameters specify which section of the image to render onto this surface.


getTransformedCursor

public PVector getTransformedCursor(int cx,
                                    int cy)
This function will give you the position of the mouse in the surface's coordinate system.

Returns:
The transformed mouse position

getTransformedMouse

public PVector getTransformedMouse()

setGridColor

public void setGridColor(int newColor)
Sets the grid used for calibration's color


setControlPointsColor

public void setControlPointsColor(int newColor)
Sets the control points color


isMouseOver

public boolean isMouseOver()
Returns true if the mouse is over this surface, false otherwise.


moveTo

public void moveTo(float x,
                   float y)


Processing library keystone by David Bouchard. (C) 2009-2011