public class GCScheme extends java.lang.Object implements GConstants, processing.core.PConstants
ALPHA_BLOCK, ALPHA_PICK, BACKGROUND, BLUE_SCHEME, CANCEL, CLOSE_WINDOW, CLOSED, CTRL_ANGULAR, CTRL_HORIZONTAL, CTRL_VERTICAL, CYAN_SCHEME, DECIMAL, END, ERROR, EXIT_APP, EXPONENT, FAMILY, FOREGROUND, FORWARD, GOLD_SCHEME, GREEN_SCHEME, HOME, INFO, INTEGER, KEEP_OPEN, NO, OK, OK_CANCEL, ORANGE_SCHEME, ORIENT_LEFT, ORIENT_RIGHT, ORIENT_TRACK, PLAIN, POSTURE, POSTURE_OBLIQUE, POSTURE_REGULAR, PURPLE_SCHEME, QUERY, RED_SCHEME, REVERSE, SCHEME_10, SCHEME_11, SCHEME_12, SCHEME_13, SCHEME_14, SCHEME_15, SCHEME_8, SCHEME_9, SCROLLBARS_AUTOHIDE, SCROLLBARS_BOTH, SCROLLBARS_HORIZONTAL_ONLY, SCROLLBARS_NONE, SCROLLBARS_VERTICAL_ONLY, SIZE, STRIKETHROUGH, STRIKETHROUGH_OFF, STRIKETHROUGH_ON, SUPERSCRIPT, SUPERSCRIPT_OFF, SUPERSCRIPT_SUB, SUPERSCRIPT_SUPER, USER_COL_SCHEME, WARNING, WEIGHT, WEIGHT_BOLD, WEIGHT_DEMIBOLD, WEIGHT_DEMILIGHT, WEIGHT_EXTRA_LIGHT, WEIGHT_EXTRABOLD, WEIGHT_HEAVY, WEIGHT_LIGHT, WEIGHT_MEDIUM, WEIGHT_REGULAR, WEIGHT_SEMIBOLD, WEIGHT_ULTRABOLD, WIDTH, WIDTH_CONDENSED, WIDTH_EXTENDED, WIDTH_REGULAR, WIDTH_SEMI_CONDENSED, WIDTH_SEMI_EXTENDED, X4, X8, YELLOW_SCHEME, YES, YES_NO, YES_NO_CANCEL
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_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 |
---|
GCScheme() |
Modifier and Type | Method and Description |
---|---|
static void |
changePalette(int schemeNbr,
int[] colors)
Change a colour scheme to use the colours passed in the third parameter.
|
static void |
changePaletteColor(int schemeNbr,
int colorNbr,
int color)
Change a single colour within an existing scheme
|
static void |
copyPalette(int srcSchemeNbr,
int dstSchemeNbr)
Copies the colours from the source scheme to the destination scheme.
|
static java.awt.Color[] |
getJavaColor(int schemeNo)
DO NOT CALL THIS METHOD
This method is only to be used by GUI Builder. |
static int[] |
getPalette(int schemeNbr)
Set the color scheme to one of the preset schemes
BLUE / GREEN / RED / PURPLE / YELLOW / CYAN / BROWN
or if you have created your own schemes following the instructions
at gui4processing.lagers.org.uk/colorscheme.html then you can enter
the appropriate numeric value of the scheme.
|
static void |
makeColorSchemes()
DO NOT CALL THIS METHOD
This method is only to be used by GUI Builder. |
static void |
makeColorSchemes(processing.core.PApplet app)
Called every time we create a control.
|
static void |
savePalettes(processing.core.PApplet app)
Save the current colour schemes as an image in the sketch's data folder.
|
static void |
savePalettes(processing.core.PApplet app,
java.lang.String filename)
Save the current colour schemes as an image in the sketch's data folder.
|
public static int[] getPalette(int schemeNbr)
schemeNbr
- scheme number (0-15)public static void changePalette(int schemeNbr, int[] colors)
schemeNbr
- the scheme numbercolors
- the colours to use in this palette.public static void copyPalette(int srcSchemeNbr, int dstSchemeNbr)
srcSchemeNbr
- source scheme number (0-15)dstSchemeNbr
- destination scheme number (0-15)public static void changePaletteColor(int schemeNbr, int colorNbr, int color)
schemeNbr
- the scheme numbercolorNbr
- the palette index number for the colourcolor
- ARGB colour valuepublic static void savePalettes(processing.core.PApplet app)
"user_gui_palette.png"
app
- the PApplet objectpublic static void savePalettes(processing.core.PApplet app, java.lang.String filename)
app
- the PApplet objectfilename
- the name of the image file to usepublic static void makeColorSchemes(processing.core.PApplet app)
app
- the PApplet using this schemepublic static java.awt.Color[] getJavaColor(int schemeNo)
public static void makeColorSchemes()
Processing library G4P by Peter Lager. (c) 2017