Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## deadpixel.keystone
Class CornerPinSurface

    java.lang.Object
      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) March-2013 Added methods to programmatically move the corner points

Field Summary
`static int` | `BL`
`static int` | `BR`
`static int` | `TL`
`static int` | `TR`
`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` | `moveMeshPointBy(int corner, float moveX, float moveY)` Manually move one of the corners for this surface by some amount.
`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

### TL

    public static int TL

### TR

    public static int TR

### BL

    public static int BL

### BR

    public static int BR

Method Detail

### moveMeshPointBy

    public void moveMeshPointBy(int corner,
                                float moveX,
                                float moveY)

  Manually move one of the corners for this surface by some amount. The "corner" parameter should be either: CornerPinSurface.TL, CornerPinSurface.BL, CornerPinSurface.TR or CornerPinSurface.BR*

### 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)

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Processing library keystone by David Bouchard. (C) 2013