deadpixel.revkeystone
Class ReverseKeystone

java.lang.Object
  extended by deadpixel.revkeystone.ReverseKeystone

public class ReverseKeystone
extends java.lang.Object

This class manages the creation and calibration of keystoned surfaces. To move and warp surfaces, place the Keystone object in calibrate mode. It catch mouse events and allow you to drag surfaces and control points with the mouse. The Keystone object also provides load/save functionality, once you've calibrated the layout to your liking. Version: 0.11


Field Summary
 java.lang.String VERSION
           
 
Constructor Summary
ReverseKeystone(processing.core.PApplet parent)
           
 
Method Summary
 ReverseCornerPinSurface createReverseCornerPinSurface(int w, int h, int res)
          Creates and registers a new corner pin keystone surface.
 void load()
          Loads a saved layout from "keystone.xml"
 void load(java.lang.String filename)
          Loads a saved layout from a given XML file
 void makeRectangular()
           
 void mouseEvent(java.awt.event.MouseEvent e)
           
 void save()
          Saves the current layout into "keystone.xml"
 void save(java.lang.String filename)
          Saves the layout to an XML file.
 void startCalibration()
          Starts the calibration mode.
 void stopCalibration()
          Stops the calibration mode
 void toggleCalibration()
          Toggles the calibration mode
 java.lang.String version()
          Returns the version of the library.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

ReverseKeystone

public ReverseKeystone(processing.core.PApplet parent)
Parameters:
parent - applet
Method Detail

createReverseCornerPinSurface

public ReverseCornerPinSurface createReverseCornerPinSurface(int w,
                                                             int h,
                                                             int res)
Creates and registers a new corner pin keystone surface.

Parameters:
w - width
h - height
res - resolution (number of tiles per axis)
Returns:

startCalibration

public void startCalibration()
Starts the calibration mode. Mouse events will be intercepted to drag surfaces and move control points around.


stopCalibration

public void stopCalibration()
Stops the calibration mode


toggleCalibration

public void toggleCalibration()
Toggles the calibration mode


version

public java.lang.String version()
Returns the version of the library.

Returns:
String

save

public void save(java.lang.String filename)
Saves the layout to an XML file.


save

public void save()
Saves the current layout into "keystone.xml"


load

public void load(java.lang.String filename)
Loads a saved layout from a given XML file


load

public void load()
Loads a saved layout from "keystone.xml"


mouseEvent

public void mouseEvent(java.awt.event.MouseEvent e)

makeRectangular

public void makeRectangular()


processing library revkeystone by yourNameHere. (c) 2008