@@ -524,12 +524,12 @@ void tint(const PColor& c);
524524
525525static constexpr int THRESHOLD = 1 ;
526526static constexpr int GRAY = 2 ;
527- static constexpr int OPAQUE = 3 ;
527+ static constexpr int OPAQUE = 14 ;
528528static constexpr int INVERT = 4 ;
529- static constexpr int POSTERIZE = 5 ;
530- static constexpr int BLUR = 6 ;
531- static constexpr int ERODE = 7 ;
532- static constexpr int DILATE = 8 ;
529+ static constexpr int POSTERIZE = 8 ;
530+ static constexpr int BLUR = 11 ;
531+ static constexpr int ERODE = 15 ;
532+ static constexpr int DILATE = 16 ;
533533
534534// =============================================================================
535535// PIMAGE -- Pixel buffer backed by an OpenGL texture
@@ -1180,7 +1180,7 @@ static constexpr int CENTER = 3; // middle mouse button; also rectMode/el
11801180
11811181// Color modes
11821182static constexpr int RGB = 1 ;
1183- static constexpr int HSB = 2 ;
1183+ static constexpr int HSB = 3 ;
11841184#define ARGB 3 /* createImage(w,h,ARGB) */
11851185
11861186// Shape / rect / ellipse modes
@@ -1190,10 +1190,10 @@ static constexpr int RADIUS = 2;
11901190
11911191// Stroke caps and joins
11921192static constexpr int ROUND = 10 ;
1193- static constexpr int SQUARE = 11 ;
1194- static constexpr int PROJECT = 12 ;
1195- static constexpr int MITER = 13 ;
1196- static constexpr int BEVEL = 14 ;
1193+ static constexpr int SQUARE = 1 ;
1194+ static constexpr int PROJECT = 4 ;
1195+ static constexpr int MITER = 8 ;
1196+ static constexpr int BEVEL = 32 ;
11971197
11981198// beginShape() kinds
11991199static constexpr int POINTS = 0 ;
@@ -1206,23 +1206,38 @@ static constexpr int QUAD_STRIP = 6;
12061206static constexpr int CLOSE = 7 ;
12071207
12081208// Text alignment
1209+ // Text alignment internal constants
12091210static constexpr int LEFT_ALIGN = 20 ;
12101211static constexpr int RIGHT_ALIGN = 21 ;
12111212static constexpr int TOP_ALIGN = 22 ;
12121213static constexpr int BOTTOM_ALIGN = 23 ;
1213- static constexpr int BASELINE = 24 ;
1214+ static constexpr int BASELINE = 0 ; // Processing Java value
12141215static constexpr int CENTER_ALIGN = 25 ;
1216+ // Processing Java textAlign vertical aliases
1217+ static constexpr int TOP = 101 ;
1218+ static constexpr int BOTTOM = 102 ;
12151219
12161220// Blend modes
1217- static constexpr int BLEND = 30 ;
1218- static constexpr int ADD = 31 ;
1219- static constexpr int SUBTRACT = 32 ;
1220- static constexpr int MULTIPLY = 33 ;
1221- static constexpr int SCREEN = 34 ;
1222- static constexpr int DARKEST = 35 ;
1223- static constexpr int LIGHTEST = 36 ;
1224- static constexpr int DIFFERENCE = 37 ;
1225- static constexpr int EXCLUSION = 38 ;
1221+ static constexpr int BLEND = 1 ;
1222+ static constexpr int ADD = 2 ;
1223+ static constexpr int SUBTRACT = 4 ;
1224+ static constexpr int MULTIPLY = 128 ;
1225+ static constexpr int SCREEN = 256 ;
1226+ static constexpr int DARKEST = 8 ;
1227+ static constexpr int LIGHTEST = 16 ;
1228+ static constexpr int DIFFERENCE = 32 ;
1229+ static constexpr int EXCLUSION = 64 ;
1230+ static constexpr int OVERLAY = 512 ;
1231+ static constexpr int HARD_LIGHT = 1024 ;
1232+ static constexpr int SOFT_LIGHT = 2048 ;
1233+ static constexpr int DODGE = 4096 ;
1234+ static constexpr int BURN = 8192 ;
1235+ static constexpr int REPLACE = 0 ;
1236+ // Boolean aliases
1237+ #ifndef TRUE
1238+ #define TRUE true
1239+ #define FALSE false
1240+ #endif
12261241
12271242// Math constants (float precision)
12281243static constexpr float PI = static_cast <float >(M_PI );
0 commit comments