public class PGraphicsFX2D extends PGraphics
A, AB, AG, ambientB, ambientColor, ambientG, ambientR, AR, B, backgroundColor, BEEN_LIT, bezierDetail, colorMode, colorModeA, colorModeX, colorModeY, colorModeZ, curveDetail, curveTightness, DA, DB, DEFAULT_VERTICES, DG, DR, EB, edge, EDGE, EG, ellipseMode, emissiveB, emissiveColor, emissiveG, emissiveR, ER, fill, fillColor, G, HAS_NORMAL, image, imageMode, normalX, normalY, normalZ, NX, NY, NZ, pixelCount, R, rectMode, SA, SB, setAmbient, SG, shapeMode, SHINE, shininess, smooth, SPB, specularB, specularColor, specularG, specularR, SPG, sphereDetailU, sphereDetailV, SPR, SR, stroke, strokeCap, strokeColor, strokeJoin, strokeWeight, SW, textAlign, textAlignY, textFont, textLeading, textMode, textSize, textureImage, textureMode, textureU, textureV, tint, tintColor, TX, TY, TZ, U, V, VERTEX_FIELD_COUNT, VW, VX, VY, VZALPHA_MASK, BLUE_MASK, format, GREEN_MASK, height, loaded, parent, pixelDensity, pixelHeight, pixels, pixelWidth, RED_MASK, widthADD, 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_ASYNC_SAVEFRAME, DISABLE_BUFFER_READING, DISABLE_DEPTH_MASK, DISABLE_DEPTH_SORT, DISABLE_DEPTH_TEST, DISABLE_KEY_REPEAT, DISABLE_NATIVE_FONTS, DISABLE_OPENGL_ERRORS, DISABLE_OPTIMIZED_STROKE, DISABLE_STROKE_PERSPECTIVE, DISABLE_STROKE_PURE, DISABLE_TEXTURE_MIPMAPS, DODGE, DOWN, DXF, ELLIPSE, ENABLE_ASYNC_SAVEFRAME, ENABLE_BUFFER_READING, ENABLE_DEPTH_MASK, ENABLE_DEPTH_SORT, ENABLE_DEPTH_TEST, ENABLE_KEY_REPEAT, ENABLE_NATIVE_FONTS, ENABLE_OPENGL_ERRORS, ENABLE_OPTIMIZED_STROKE, ENABLE_STROKE_PERSPECTIVE, ENABLE_STROKE_PURE, ENABLE_TEXTURE_MIPMAPS, ENTER, EPSILON, ERODE, ESC, EXCLUSION, FX2D, 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, QUADRATIC_VERTEX, QUADS, QUARTER_PI, RAD_TO_DEG, RADIUS, RECT, REPEAT, REPLACE, RETURN, RGB, RIGHT, ROUND, SCREEN, SHAPE, SHIFT, SOFT_LIGHT, SPAN, SPHERE, SPOT, SQUARE, SUBTRACT, SVG, TAB, TARGA, TAU, 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 |
|---|
PGraphicsFX2D() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyMatrix(float n00,
float n01,
float n02,
float n10,
float n11,
float n12) |
void |
applyMatrix(float n00,
float n01,
float n02,
float n03,
float n10,
float n11,
float n12,
float n13,
float n20,
float n21,
float n22,
float n23,
float n30,
float n31,
float n32,
float n33) |
void |
backgroundImpl()
Actual implementation of clearing the background, now that the
internal variables for background color have been set.
|
void |
beginContour() |
void |
beginDraw()
( begin auto-generated from PGraphics_beginDraw.xml )
Sets the default properties for a PGraphics object.
|
void |
beginShape(int kind)
( begin auto-generated from beginShape.xml )
Using the beginShape() and endShape() functions allow
creating more complex forms.
|
void |
bezierDetail(int detail)
Ignored (not needed) by this renderer.
|
void |
bezierVertex(float x1,
float y1,
float x2,
float y2,
float x3,
float y3) |
void |
bezierVertex(float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
( begin auto-generated from bezierVertex.xml )
Specifies vertex coordinates for Bezier curves.
|
void |
box(float w,
float h,
float d) |
PSurface |
createSurface() |
void |
curveDetail(int detail)
Ignored (not needed) by this renderer.
|
void |
curveVertex(float x,
float y,
float z) |
void |
endContour() |
void |
endDraw()
( begin auto-generated from PGraphics_endDraw.xml )
Finalizes the rendering of a PGraphics object so that it can be shown on screen.
|
void |
endShape(int mode)
( begin auto-generated from endShape.xml )
The endShape() function is the companion to beginShape()
and may only be called after beginShape().
|
void |
flush() |
int |
get(int x,
int y)
( begin auto-generated from PImage_get.xml )
Reads the color of any pixel or grabs a section of an image.
|
PMatrix |
getMatrix() |
PMatrix2D |
getMatrix(PMatrix2D target)
Copy the current transformation matrix into the specified target.
|
PMatrix3D |
getMatrix(PMatrix3D target)
Copy the current transformation matrix into the specified target.
|
Object |
getNative()
Returns the javafx.scene.canvas.GraphicsContext used by this renderer.
|
void |
line(float x1,
float y1,
float x2,
float y2)
( begin auto-generated from line.xml )
Draws a line (a direct path between two points) to the screen.
|
void |
loadPixels()
( begin auto-generated from PImage_loadPixels.xml )
Loads the pixel data for the image into its pixels[] array.
|
PShape |
loadShape(String filename) |
PShape |
loadShape(String filename,
String options) |
void |
mask(PImage alpha)
( begin auto-generated from PImage_mask.xml )
Masks part of an image from displaying by loading another image and
using it as an alpha channel.
|
void |
noClip()
( begin auto-generated from noClip.xml )
Disables the clipping previously started by the clip() function.
|
void |
point(float x,
float y)
( begin auto-generated from point.xml )
Draws a point, a coordinate in space at the dimension of one pixel.
|
void |
popMatrix()
( begin auto-generated from popMatrix.xml )
Pops the current transformation matrix off the matrix stack.
|
void |
printMatrix()
( begin auto-generated from printMatrix.xml )
Prints the current matrix to the Console (the text window at the bottom
of Processing).
|
void |
pushMatrix()
( begin auto-generated from pushMatrix.xml )
Pushes the current transformation matrix onto the matrix stack.
|
void |
quad(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
( begin auto-generated from quad.xml )
A quad is a quadrilateral, a four sided polygon.
|
void |
quadraticVertex(float ctrlX,
float ctrlY,
float endX,
float endY) |
void |
quadraticVertex(float x2,
float y2,
float z2,
float x4,
float y4,
float z4) |
void |
resetMatrix()
( begin auto-generated from resetMatrix.xml )
Replaces the current matrix with the identity matrix.
|
void |
rotate(float angle)
( begin auto-generated from rotate.xml )
Rotates a shape the amount specified by the angle parameter.
|
void |
rotate(float angle,
float vx,
float vy,
float vz)
Advanced
|
void |
rotateX(float angle)
( begin auto-generated from rotateX.xml )
Rotates a shape around the x-axis the amount specified by the
angle parameter.
|
void |
rotateY(float angle)
( begin auto-generated from rotateY.xml )
Rotates a shape around the y-axis the amount specified by the
angle parameter.
|
void |
rotateZ(float angle)
( begin auto-generated from rotateZ.xml )
Rotates a shape around the z-axis the amount specified by the
angle parameter.
|
void |
scale(float s)
( begin auto-generated from scale.xml )
Increases or decreases the size of a shape by expanding and contracting
vertices.
|
void |
scale(float sx,
float sy)
Advanced
|
void |
scale(float sx,
float sy,
float sz) |
float |
screenX(float x,
float y)
( begin auto-generated from screenX.xml )
Takes a three-dimensional X, Y, Z position and returns the X value for
where it will appear on a (two-dimensional) screen.
|
float |
screenX(float x,
float y,
float z) |
float |
screenY(float x,
float y)
( begin auto-generated from screenY.xml )
Takes a three-dimensional X, Y, Z position and returns the Y value for
where it will appear on a (two-dimensional) screen.
|
float |
screenY(float x,
float y,
float z) |
float |
screenZ(float x,
float y,
float z)
( begin auto-generated from screenZ.xml )
Takes a three-dimensional X, Y, Z position and returns the Z value for
where it will appear on a (two-dimensional) screen.
|
void |
set(int x,
int y,
int argb)
( begin auto-generated from PImage_set.xml )
Changes the color of any pixel or writes an image directly into the
display window.
The x and y parameters specify the pixel to change and the color parameter specifies the color value. |
void |
setMatrix(PMatrix2D source)
Set the current transformation to the contents of the specified source.
|
void |
setMatrix(PMatrix3D source)
Set the current transformation to the contents of the specified source.
|
void |
shearX(float angle)
( begin auto-generated from shearX.xml )
Shears a shape around the x-axis the amount specified by the
angle parameter.
|
void |
shearY(float angle)
( begin auto-generated from shearY.xml )
Shears a shape around the y-axis the amount specified by the
angle parameter.
|
static void |
showTodoWarning(String method,
int issue)
Display a warning that the specified method is simply unavailable.
|
void |
sphere(float r)
( begin auto-generated from sphere.xml )
A sphere is a hollow ball made from tessellated triangles.
|
void |
strokeCap(int cap)
( begin auto-generated from strokeCap.xml )
Sets the style for rendering line endings.
|
void |
strokeJoin(int join)
( begin auto-generated from strokeJoin.xml )
Sets the style of the joints which connect line segments.
|
void |
strokeWeight(float weight)
( begin auto-generated from strokeWeight.xml )
Sets the width of the stroke used for lines, points, and the border
around shapes.
|
float |
textAscent()
( begin auto-generated from textAscent.xml )
Returns ascent of the current font at its current size.
|
float |
textDescent()
( begin auto-generated from textDescent.xml )
Returns descent of the current font at its current size.
|
void |
texture(PImage image)
( begin auto-generated from texture.xml )
Sets a texture to be applied to vertex points.
|
void |
translate(float tx,
float ty)
( begin auto-generated from translate.xml )
Specifies an amount to displace objects within the display window.
|
void |
triangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
( begin auto-generated from triangle.xml )
A triangle is a plane created by connecting three points.
|
void |
vertex(float[] v)
Used by renderer subclasses or PShape to efficiently pass in already
formatted vertex information.
|
void |
vertex(float x,
float y) |
void |
vertex(float x,
float y,
float z) |
void |
vertex(float x,
float y,
float u,
float v) |
void |
vertex(float x,
float y,
float z,
float u,
float v)
( begin auto-generated from vertex.xml )
All shapes are constructed by connecting a series of vertices.
|
alpha, ambient, ambient, ambient, ambientLight, ambientLight, applyMatrix, applyMatrix, applyMatrix, arc, arc, attrib, attrib, attrib, attribColor, attribNormal, attribPosition, background, background, background, background, background, background, background, beginCamera, beginPGL, beginRaw, beginShape, bezier, bezier, bezierPoint, bezierTangent, blendMode, blue, box, brightness, camera, camera, circle, clear, clip, color, color, color, color, color, color, color, color, color, colorMode, colorMode, colorMode, colorMode, createShape, createShape, createShape, curve, curve, curvePoint, curveTangent, curveTightness, curveVertex, directionalLight, displayable, dispose, edge, ellipse, ellipseMode, emissive, emissive, emissive, endCamera, endPGL, endRaw, endShape, fill, fill, fill, fill, fill, fill, filter, frustum, getCache, getRaw, getStyle, getStyle, green, haveRaw, hint, hue, image, image, image, imageMode, is2D, is2X, is3D, isGL, lerpColor, lerpColor, lightFalloff, lights, lightSpecular, line, loadShader, loadShader, modelX, modelY, modelZ, noFill, noLights, normal, noSmooth, noStroke, noTexture, noTint, ortho, ortho, ortho, perspective, perspective, point, pointLight, pop, popStyle, printCamera, printProjection, push, pushStyle, rect, rect, rect, rectMode, red, removeCache, resetShader, resetShader, saturation, save, setCache, setMatrix, setParent, setPath, setPrimary, setSize, shader, shader, shape, shape, shape, shapeMode, shininess, showDepthWarning, showDepthWarningXYZ, showException, showMethodWarning, showMissingWarning, showVariationWarning, showWarning, showWarning, smooth, smooth, specular, specular, specular, sphereDetail, sphereDetail, spotLight, square, stroke, stroke, stroke, stroke, stroke, stroke, style, text, text, text, text, text, text, text, text, text, text, text, textAlign, textAlign, textFont, textFont, textLeading, textMode, textSize, textureMode, textureWrap, textWidth, textWidth, textWidth, tint, tint, tint, tint, tint, tint, translateblend, blend, blendColor, clone, copy, copy, copy, filter, filter, get, get, getImage, getModifiedX1, getModifiedX2, getModifiedY1, getModifiedY2, init, init, isLoaded, isModified, mask, resize, set, setLoaded, setLoaded, setModified, setModified, updatePixels, updatePixelspublic PSurface createSurface()
createSurface in class PGraphicspublic Object getNative()
public void beginDraw()
PGraphicspublic void endDraw()
PGraphicspublic void beginShape(int kind)
PGraphicsbeginShape in class PGraphicskind - Either POINTS, LINES, TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, or QUAD_STRIPPShape,
PGraphics.endShape(),
PGraphics.vertex(float, float, float, float, float),
PGraphics.curveVertex(float, float, float),
PGraphics.bezierVertex(float, float, float, float, float, float, float, float, float)public void texture(PImage image)
PGraphicstexture in class PGraphicsimage - reference to a PImage objectPGraphics.textureMode(int),
PGraphics.textureWrap(int),
PGraphics.beginShape(int),
PGraphics.endShape(int),
PGraphics.vertex(float, float, float, float, float)public void vertex(float[] v)
PGraphicspublic void vertex(float x,
float y,
float z,
float u,
float v)
PGraphicsvertex in class PGraphicsx - x-coordinate of the vertexy - y-coordinate of the vertexz - z-coordinate of the vertexu - horizontal coordinate for the texture mappingv - vertical coordinate for the texture mappingPGraphics.beginShape(int),
PGraphics.endShape(int),
PGraphics.bezierVertex(float, float, float, float, float, float, float, float, float),
PGraphics.quadraticVertex(float, float, float, float, float, float),
PGraphics.curveVertex(float, float, float),
PGraphics.texture(PImage)public void beginContour()
beginContour in class PGraphicspublic void endContour()
endContour in class PGraphicspublic void endShape(int mode)
PGraphicsendShape in class PGraphicsmode - use CLOSE to close the shapePShape,
PGraphics.beginShape(int)public void noClip()
PGraphicspublic void bezierVertex(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
bezierVertex in class PGraphicspublic void bezierVertex(float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4)
PGraphicsbezierVertex in class PGraphicsx2 - the x-coordinate of the 1st control pointy2 - the y-coordinate of the 1st control pointz2 - the z-coordinate of the 1st control pointx3 - the x-coordinate of the 2nd control pointy3 - the y-coordinate of the 2nd control pointz3 - the z-coordinate of the 2nd control pointx4 - the x-coordinate of the anchor pointy4 - the y-coordinate of the anchor pointz4 - the z-coordinate of the anchor pointPGraphics.curveVertex(float, float, float),
PGraphics.vertex(float, float, float, float, float),
PGraphics.quadraticVertex(float, float, float, float, float, float),
PGraphics.bezier(float, float, float, float, float, float, float, float, float, float, float, float)public void quadraticVertex(float ctrlX,
float ctrlY,
float endX,
float endY)
quadraticVertex in class PGraphicsctrlX - the x-coordinate of the control pointctrlY - the y-coordinate of the control pointendX - the x-coordinate of the anchor pointendY - the y-coordinate of the anchor pointPGraphics.curveVertex(float, float, float),
PGraphics.vertex(float, float, float, float, float),
PGraphics.bezierVertex(float, float, float, float, float, float),
PGraphics.bezier(float, float, float, float, float, float, float, float, float, float, float, float)public void quadraticVertex(float x2,
float y2,
float z2,
float x4,
float y4,
float z4)
quadraticVertex in class PGraphicsz2 - the z-coordinate of the control pointz4 - the z-coordinate of the anchor pointpublic void curveVertex(float x,
float y,
float z)
curveVertex in class PGraphicsz - the z-coordinate of the vertexpublic void point(float x,
float y)
PGraphicspoint in class PGraphicsx - x-coordinate of the pointy - y-coordinate of the pointPGraphics.stroke(int)public void line(float x1,
float y1,
float x2,
float y2)
PGraphicsline in class PGraphicsx1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second pointPGraphics.strokeWeight(float),
PGraphics.strokeJoin(int),
PGraphics.strokeCap(int),
PGraphics.beginShape()public void triangle(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)
PGraphicstriangle in class PGraphicsx1 - x-coordinate of the first pointy1 - y-coordinate of the first pointx2 - x-coordinate of the second pointy2 - y-coordinate of the second pointx3 - x-coordinate of the third pointy3 - y-coordinate of the third pointPApplet.beginShape()public void quad(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
PGraphicsquad in class PGraphicsx1 - x-coordinate of the first cornery1 - y-coordinate of the first cornerx2 - x-coordinate of the second cornery2 - y-coordinate of the second cornerx3 - x-coordinate of the third cornery3 - y-coordinate of the third cornerx4 - x-coordinate of the fourth cornery4 - y-coordinate of the fourth cornerpublic void box(float w,
float h,
float d)
public void sphere(float r)
PGraphicsImplementation notes:
cache all the points of the sphere in a static array top and bottom are just a bunch of triangles that land in the center point
sphere is a series of concentric circles who radii vary along the shape, based on, er.. cos or something
[toxi 031031] new sphere code. removed all multiplies with radius, as scale() will take care of that anyway [toxi 031223] updated sphere code (removed modulos) and introduced sphereAt(x,y,z,r) to avoid additional translate()'s on the user/sketch side [davbol 080801] now using separate sphereDetailU/V
sphere in class PGraphicsr - the radius of the spherePGraphics.sphereDetail(int)public void bezierDetail(int detail)
bezierDetail in class PGraphicsdetail - resolution of the curvesPGraphics.curve(float, float, float, float, float, float, float, float, float, float, float, float),
PGraphics.curveVertex(float, float, float),
PGraphics.curveTightness(float)public void curveDetail(int detail)
curveDetail in class PGraphicsdetail - resolution of the curvesPGraphics.curve(float, float, float, float, float, float, float, float, float, float, float, float),
PGraphics.curveVertex(float, float),
PGraphics.curveTightness(float)public PShape loadShape(String filename)
loadShape in class PGraphicsfilename - name of file to load, can be .svg or .objPShape,
PApplet.createShape()public PShape loadShape(String filename, String options)
public float textAscent()
PGraphicstextAscent in class PGraphicsPGraphics.textDescent()public float textDescent()
PGraphicstextDescent in class PGraphicsPGraphics.textAscent()public void pushMatrix()
PGraphicspublic void popMatrix()
PGraphicspopMatrix in class PGraphicsPGraphics.pushMatrix()public void translate(float tx,
float ty)
PGraphicstranslate in class PGraphicstx - left/right translationty - up/down translationPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.rotate(float),
PGraphics.rotateX(float),
PGraphics.rotateY(float),
PGraphics.rotateZ(float),
PGraphics.scale(float, float, float)public void rotate(float angle)
PGraphicsrotate in class PGraphicsangle - angle of rotation specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.rotateX(float),
PGraphics.rotateY(float),
PGraphics.rotateZ(float),
PGraphics.scale(float, float, float),
PApplet.radians(float)public void rotateX(float angle)
PGraphicsrotateX in class PGraphicsangle - angle of rotation specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.rotate(float),
PGraphics.rotateY(float),
PGraphics.rotateZ(float),
PGraphics.scale(float, float, float),
PGraphics.translate(float, float, float)public void rotateY(float angle)
PGraphicsrotateY in class PGraphicsangle - angle of rotation specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.rotate(float),
PGraphics.rotateX(float),
PGraphics.rotateZ(float),
PGraphics.scale(float, float, float),
PGraphics.translate(float, float, float)public void rotateZ(float angle)
PGraphicsrotateZ in class PGraphicsangle - angle of rotation specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.rotate(float),
PGraphics.rotateX(float),
PGraphics.rotateY(float),
PGraphics.scale(float, float, float),
PGraphics.translate(float, float, float)public void rotate(float angle,
float vx,
float vy,
float vz)
PGraphicspublic void scale(float s)
PGraphicsscale in class PGraphicss - percentage to scale the objectPGraphics.pushMatrix(),
PGraphics.popMatrix(),
PGraphics.translate(float, float, float),
PGraphics.rotate(float),
PGraphics.rotateX(float),
PGraphics.rotateY(float),
PGraphics.rotateZ(float)public void scale(float sx,
float sy)
PGraphicspublic void scale(float sx,
float sy,
float sz)
public void shearX(float angle)
PGraphicsshearX in class PGraphicsangle - angle of shear specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.shearY(float),
PGraphics.scale(float, float, float),
PGraphics.translate(float, float, float),
PApplet.radians(float)public void shearY(float angle)
PGraphicsshearY in class PGraphicsangle - angle of shear specified in radiansPGraphics.popMatrix(),
PGraphics.pushMatrix(),
PGraphics.shearX(float),
PGraphics.scale(float, float, float),
PGraphics.translate(float, float, float),
PApplet.radians(float)public void resetMatrix()
PGraphicsresetMatrix in class PGraphicsPGraphics.pushMatrix(),
PGraphics.popMatrix(),
PGraphics.applyMatrix(PMatrix),
PGraphics.printMatrix()public void applyMatrix(float n00,
float n01,
float n02,
float n10,
float n11,
float n12)
applyMatrix in class PGraphicsn00 - numbers which define the 4x4 matrix to be multipliedn01 - numbers which define the 4x4 matrix to be multipliedn02 - numbers which define the 4x4 matrix to be multipliedn10 - numbers which define the 4x4 matrix to be multipliedn11 - numbers which define the 4x4 matrix to be multipliedn12 - numbers which define the 4x4 matrix to be multipliedpublic void applyMatrix(float n00,
float n01,
float n02,
float n03,
float n10,
float n11,
float n12,
float n13,
float n20,
float n21,
float n22,
float n23,
float n30,
float n31,
float n32,
float n33)
applyMatrix in class PGraphicsn03 - numbers which define the 4x4 matrix to be multipliedn13 - numbers which define the 4x4 matrix to be multipliedn20 - numbers which define the 4x4 matrix to be multipliedn21 - numbers which define the 4x4 matrix to be multipliedn22 - numbers which define the 4x4 matrix to be multipliedn23 - numbers which define the 4x4 matrix to be multipliedn30 - numbers which define the 4x4 matrix to be multipliedn31 - numbers which define the 4x4 matrix to be multipliedn32 - numbers which define the 4x4 matrix to be multipliedn33 - numbers which define the 4x4 matrix to be multipliedpublic PMatrix2D getMatrix(PMatrix2D target)
PGraphicspublic PMatrix3D getMatrix(PMatrix3D target)
PGraphicspublic void setMatrix(PMatrix2D source)
PGraphicspublic void setMatrix(PMatrix3D source)
PGraphicspublic void printMatrix()
PGraphicsprintMatrix in class PGraphicsPGraphics.pushMatrix(),
PGraphics.popMatrix(),
PGraphics.resetMatrix(),
PGraphics.applyMatrix(PMatrix)public float screenX(float x,
float y)
PGraphicsscreenX in class PGraphicsx - 3D x-coordinate to be mappedy - 3D y-coordinate to be mappedPGraphics.screenY(float, float, float),
PGraphics.screenZ(float, float, float)public float screenY(float x,
float y)
PGraphicsscreenY in class PGraphicsx - 3D x-coordinate to be mappedy - 3D y-coordinate to be mappedPGraphics.screenX(float, float, float),
PGraphics.screenZ(float, float, float)public float screenX(float x,
float y,
float z)
public float screenY(float x,
float y,
float z)
public float screenZ(float x,
float y,
float z)
PGraphicsscreenZ in class PGraphicsx - 3D x-coordinate to be mappedy - 3D y-coordinate to be mappedz - 3D z-coordinate to be mappedPGraphics.screenX(float, float, float),
PGraphics.screenY(float, float, float)public void strokeCap(int cap)
PGraphicsstrokeCap in class PGraphicscap - either SQUARE, PROJECT, or ROUNDPGraphics.stroke(int, float),
PGraphics.strokeWeight(float),
PGraphics.strokeJoin(int),
PApplet.size(int, int, String, String)public void strokeJoin(int join)
PGraphicsstrokeJoin in class PGraphicsjoin - either MITER, BEVEL, ROUNDPGraphics.stroke(int, float),
PGraphics.strokeWeight(float),
PGraphics.strokeCap(int)public void strokeWeight(float weight)
PGraphicsstrokeWeight in class PGraphicsweight - the weight (in pixels) of the strokePGraphics.stroke(int, float),
PGraphics.strokeJoin(int),
PGraphics.strokeCap(int)public void backgroundImpl()
PGraphicspublic void loadPixels()
PImageloadPixels in class PImagepublic int get(int x,
int y)
PImageIf the image is in RGB format (i.e. on a PVideo object), the value will get its high bits set, just to avoid cases where they haven't been set already.
If the image is in ALPHA format, this returns a white with its alpha value set.
This function is included primarily for beginners. It is quite slow because it has to check to see if the x, y that was provided is inside the bounds, and then has to check to see what image type it is. If you want things to be more efficient, access the pixels[] array directly.
get in class PImagex - x-coordinate of the pixely - y-coordinate of the pixelPApplet.set(int, int, int),
PApplet.pixels,
PApplet.copy(PImage, int, int, int, int, int, int, int, int)public void set(int x,
int y,
int argb)
PImageset in class PImagex - x-coordinate of the pixely - y-coordinate of the pixelargb - any value of the color datatypePImage.get(int, int, int, int),
PImage.pixels,
PImage.copy(PImage, int, int, int, int, int, int, int, int)public void mask(PImage alpha)
PImageStrictly speaking the "blue" value from the source image is used as the alpha color. For a fully grayscale image, this is correct, but for a color image it's not 100% accurate. For a more accurate conversion, first use filter(GRAY) which will make the image into a "correct" grayscale by performing a proper luminance-based conversion.
public static void showTodoWarning(String method,
int issue)