A newer version of Max is available. Click here to access the latest version of the documentation

jit.gl.cornerpin Reference

Map textures in a window



Provides controls for mapping textures and matrices to an output window by repositioning the image corners. Mouse input is received from the context window allowing for easy manipulation of corner positions.


Map textures in a window


This object requires one argument: the name of a drawing context. A named drawing context is a named instance of a jit.window, jit.pwindow, or jit.matrix object that has an instance of the jit.gl.render object associated with it. Additionally it can reference the name of a jit.gl.node sub-context. This value may also be set via the OB3D drawto attribute. If no argument is present, the object is implicitly added to the first valid drawing context or sub-context found in the current patch or by searching up the patcher hierarchy.


colormode [symbol]

Matrix color mode

Possible values:


corner_color [4 floats]

Set the corner gui color, used when drawcorners is enabled (default = 1 1 1 1).

corner_radius [int]

Pixel size of corner GUI (default = 10)

cornermode [symbol]

Mode to determine how corner attributes are used to set corner position (default = relative)

Possible values:

'relative' ( Normalized coords relative to window size )
'absolute' ( Absolute window coordinates )
'absolute_texture' ( Absolute coordinates based on texture dimensions )

displaylist [int]

Geometry displaylist flag (default = 1)

drawcorners [int]

Corner GUI mode (default = 1 - on). Determines if and how the cornerpin GUI is visible.

Possible values:

0 = 'off'
1 = 'on'
2 = 'on_hover' ( Visible when mouse hovers over cornerpin quad )
3 = 'on_click' ( Visible when mouse clicks on cornerpin quad )

enable_mouse [int]

Mouse interaction flag (default = 1)

hover [int]

Enable/disable mouse hovering (default = 0), when drawcorners mode is 3 (on_hover) or mousereport is enabled.

interp [int]

Enable interpolation of input image (default = 1)

invert_corners [int]

Invert source and destination corner position values (default = 0). This allows for deskewing an image, without dragging beyond the window bounds.

lower_left [2 floats]

Lower left corner position (default = 0 1)

lower_right [2 floats]

Lower right corner position (default = 1 1)

mousereport [int]

Enable/disable mouse reporting out first outlet (default = 0). The report indicates clicking, dragging, and hovering (if hover enabled) over the cornerpin quad.

preserve_aspect [int]

Preserve aspect ratio flag of input image (default = 0)

rect_tex [int]

Enable rectangular textures (default = 1)

texturename [symbol]

Internal texture name

ui_priority [int]

UI priority value (default = -900). When multiple UI objects are listening to the same window, ui_priority determines the order objects receive input. Lower values test first.

upper_left [2 floats]

Upper left corner position (default = 0 0)

upper_right [2 floats]

Upper right corner position (default = 1 0)

Common Box Attributes

OB3D Attributes



Reset corner position attributes



name [symbol]
message [symbol]
values [list]
Send the output texture a message

OB3D Messages

See Also

Name Description
Working with Video in Jitter Working with Video in Jitter
Working with OpenGL Working with OpenGL