public class Canvas
extends vialab.SMT.Zone
Modifier and Type | Field and Description |
---|---|
int |
backgroundColour |
int |
borderColour |
int |
transparentAlpha |
int |
transparentColour |
boolean |
useOverlay |
ADD, ALPHA, ALT, AMBIENT, ARC, ARGB, ARROW, BACKSPACE, BASELINE, BEVEL, BEZIER_VERTEX, BLEND, BLUR, BOTTOM, BOX, BREAK, BURN, CENTER, CHATTER, CHORD, CLAMP, CLOSE, CODED, COMPLAINT, CONTROL, CORNER, CORNERS, CROSS, CURVE_VERTEX, CUSTOM, DARKEST, DEG_TO_RAD, DELETE, DIAMETER, DIFFERENCE, DILATE, DIRECTIONAL, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ERROR_BACKGROUND_IMAGE_FORMAT, ERROR_BACKGROUND_IMAGE_SIZE, ERROR_PUSHMATRIX_OVERFLOW, ERROR_PUSHMATRIX_UNDERFLOW, ERROR_TEXTFONT_NULL_PFONT, ESC, EXCLUSION, GIF, GRAY, GROUP, HALF_PI, HAND, HARD_LIGHT, HINT_COUNT, HSB, IMAGE, INVERT, JAVA2D, JPEG, LANDSCAPE, LEFT, LIGHTEST, LINE, LINE_LOOP, LINE_STRIP, LINES, LINUX, MACOSX, MAX_FLOAT, MAX_INT, MIN_FLOAT, MIN_INT, MITER, MODEL, MODELVIEW, MOVE, MULTIPLY, NORMAL, OPAQUE, OPEN, OPENGL, ORTHOGRAPHIC, OTHER, OVERLAY, P2D, P3D, PATH, PDF, PERSPECTIVE, PI, PIE, platformNames, POINT, POINTS, POLYGON, PORTRAIT, POSTERIZE, PROBLEM, PROJECT, PROJECTION, QUAD, QUAD_BEZIER_VERTEX, QUAD_STRIP, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPHERE, SPOT, SQUARE, SUBTRACT, TAB, TARGA, TEXT, THIRD_PI, THRESHOLD, TIFF, TOP, TRIANGLE, TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TWO_PI, UP, VERTEX, WAIT, WHITESPACE, WINDOWS, X, Y, Z
Constructor and Description |
---|
Canvas(int x,
int y,
int width,
int height,
int backgroundColour)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the current drawing and erase all strokes.
|
void |
clearAndLoad(java.lang.String filename)
Clear the current drawing and load the specified image file.
|
processing.core.PImage |
getDrawing(boolean hideOverlay)
Return the current drawing.
|
java.lang.String |
getOverlayImagePath()
Get the path to the current overlay image.
|
void |
setOverlayImage(java.lang.String filename)
Set the overlay image and enable the colouring mode.
|
void |
toggleOverlay() |
add, assign, assign, beginTouch, clearZones, clone, clone, clone, contains, drag, drag, drag, drag, drag, drag, drag, drag, drag, drag, dragWithinParent, drawRntCircle, endTouch, fromZoneVector, getActiveTouch, getCentre, getChild, getChildCount, getChildren, getGlobalMatrix, getHeight, getIds, getName, getNumTouches, getOrigin, getParent, getRntRadius, getTouchCollection, getTouches, getTouchMap, getWidth, getX, getY, hSwipe, hSwipe, isActive, isAssigned, isAssigned, isChildActive, isDirect, keyPressed, keyReleased, keyTyped, pinch, pinch, putChildOnTop, remove, resetMatrix, rnt, rnt, rnt, rnt, rotate, rotate, rotateAbout, rotateAbout, rotateAboutCentre, rs, rst, rst, rst, rst, rst, rst, setBodyFromMatrix, setData, setDirect, setLocation, setMatrixFromBody, setName, setRntRadius, setSize, swipeDown, swipeLeft, swipeRight, swipeUp, toss, toZoneVector, unassign, unassign, unassignAll, vSwipe, vSwipe
alpha, ambient, ambient, ambient, ambientLight, ambientLight, applyMatrix, applyMatrix, applyMatrix, applyMatrix, applyMatrix, arc, background, background, background, background, background, background, background, beginCamera, beginRaw, beginShape, beginShape, bezier, bezier, bezierDetail, bezierPoint, bezierTangent, bezierVertex, bezierVertex, blend, blend, blue, box, box, brightness, camera, camera, canDraw, color, color, color, color, color, color, color, color, color, colorMode, colorMode, colorMode, colorMode, copy, copy, curve, curve, curveDetail, curvePoint, curveTangent, curveTightness, curveVertex, curveVertex, directionalLight, displayable, dispose, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endRaw, endShape, endShape, fill, fill, fill, fill, fill, fill, filter, filter, flush, frustum, get, get, get, getCache, getMatrix, getMatrix, getMatrix, getStyle, getStyle, green, hint, hue, image, image, image, imageMode, init, is2D, is3D, isModified, lerpColor, lightFalloff, lights, lightSpecular, line, line, loadPixels, mask, mask, modelX, modelY, modelZ, noFill, noLights, normal, noSmooth, noStroke, noTint, ortho, ortho, perspective, perspective, point, point, pointLight, popMatrix, popStyle, printCamera, printMatrix, printProjection, pushMatrix, pushStyle, quad, rect, rect, rect, rectMode, red, removeCache, resize, rotate, rotate, rotateX, rotateY, rotateZ, saturation, save, scale, scale, scale, screenX, screenX, screenY, screenY, screenZ, set, set, setCache, setMatrix, setMatrix, setMatrix, setModified, setModified, setParent, setPath, setPrimary, shape, shape, shape, shapeMode, shininess, smooth, specular, specular, specular, sphere, sphereDetail, sphereDetail, spotLight, stroke, stroke, stroke, stroke, stroke, stroke, strokeCap, strokeJoin, strokeWeight, style, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textAscent, textDescent, textFont, textFont, textLeading, textMode, textSize, texture, textureMode, textWidth, textWidth, textWidth, tint, tint, tint, tint, tint, tint, translate, translate, triangle, updatePixels, updatePixels, vertex, vertex, vertex, vertex, vertex
public int backgroundColour
public int borderColour
public int transparentColour
public int transparentAlpha
public boolean useOverlay
public Canvas(int x, int y, int width, int height, int backgroundColour)
x
- x-coordinate of the top left corner of the canvasy
- w-coordinate of the top left corner of the canvaswidth
- width of the canvasheight
- height of the canvasbackgroundColour
- colour of the canvaspublic processing.core.PImage getDrawing(boolean hideOverlay)
hideOverlay
- if false then the overlay image will be blended over
the main image (in an overlay image is defined) and if
true then the overlay image will be ignored.public void clear()
public void clearAndLoad(java.lang.String filename)
filename
- path to the image file to load into the drawingpublic java.lang.String getOverlayImagePath()
public void setOverlayImage(java.lang.String filename)
filename
- path to the image file to be used as overlaypublic void toggleOverlay()