*/}}

ourpaint.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. /*
  2. * Our Paint: A light weight GPU powered painting program.
  3. * Copyright (C) 2022-2023 Wu Yiming
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #include "la_5.h"
  19. #ifndef OURPAINT_GIT_BRANCH
  20. #define OURPAINT_GIT_BRANCH "Release 1"
  21. #endif
  22. // No need to show hash when not compiled from git repo.
  23. //#ifndef OURPAINT_GIT_HASH
  24. //#define OURPAINT_GIT_HASH "?"
  25. //#endif
  26. extern unsigned char DATA_SPLASH[];
  27. extern unsigned char DATA_SPLASH_HIGHDPI[];
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. extern const char OUR_SHADER_VERSION_430[];
  32. extern const char OUR_SHADER_VERSION_320ES[];
  33. extern const char OUR_CANVAS_SHADER[];
  34. extern const char OUR_COMPOSITION_SHADER[];
  35. extern const char OUR_SHADER_COMMON[];
  36. extern const char OUR_MIME[];
  37. extern const char OUR_THUMBNAILER[];
  38. extern const char OUR_DESKTOP[];
  39. extern const char OUR_PIGMENT_TEXTURE_MIX_SHADER[];
  40. extern const char OUR_PIGMENT_TEXTURE_DISPLAY_SHADER[];
  41. extern const char OUR_PIGMENT_COMMON[];
  42. #ifdef __cplusplus
  43. } // extern "C"
  44. #endif
  45. #define OUR_AT_CROP_CENTER 0
  46. #define OUR_AT_CROP_L 1
  47. #define OUR_AT_CROP_R 2
  48. #define OUR_AT_CROP_U 3
  49. #define OUR_AT_CROP_B 4
  50. #define OUR_AT_CROP_UL 5
  51. #define OUR_AT_CROP_UR 6
  52. #define OUR_AT_CROP_BL 7
  53. #define OUR_AT_CROP_BR 8
  54. #define OUR_VERSION_MAJOR 0
  55. #define OUR_VERSION_MINOR 5
  56. #define OUR_VERSION_SUB 0
  57. #define OUR_PAINT_NAME_STRING "Our Paint v0.5"
  58. #define OUR_SIGNAL_PICK 1
  59. #define OUR_SIGNAL_MOVE 2
  60. #define OUR_SIGNAL_PICK 3
  61. #define OUR_SIGNAL_TOGGLE_ERASING 4
  62. #define OUR_SIGNAL_ZOOM_IN 5
  63. #define OUR_SIGNAL_ZOOM_OUT 6
  64. #define OUR_SIGNAL_BRUSH_BIGGER 7
  65. #define OUR_SIGNAL_BRUSH_SMALLER 8
  66. #define OUR_SIGNAL_TOGGLE_SKETCH 9
  67. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_0 10
  68. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_1 11
  69. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_2 12
  70. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_3 13
  71. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_4 14
  72. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_5 15
  73. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_6 16
  74. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_7 17
  75. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_8 18
  76. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_9 19
  77. #define OUR_SIGNAL_SELECT_BRUSH_SIZE_FREE 20
  78. #define OUR_SIGNAL_ADJUST 21
  79. #define OUR_SIGNAL_SELECT_BRUSH_ID_0 22
  80. #define OUR_SIGNAL_SELECT_BRUSH_ID_1 23
  81. #define OUR_SIGNAL_SELECT_BRUSH_ID_2 24
  82. #define OUR_SIGNAL_SELECT_BRUSH_ID_3 25
  83. #define OUR_SIGNAL_SELECT_BRUSH_ID_4 26
  84. #define OUR_SIGNAL_SELECT_BRUSH_ID_5 27
  85. #define OUR_SIGNAL_SELECT_BRUSH_ID_6 28
  86. #define OUR_SIGNAL_SELECT_BRUSH_ID_7 29
  87. #define OUR_SIGNAL_SELECT_BRUSH_ID_8 30
  88. #define OUR_SIGNAL_SELECT_BRUSH_ID_9 31
  89. extern laWidget* OUR_WIDGET_PIGMENT;
  90. extern laUiType* _OUR_UI_PIGMENT;
  91. #define OURU Our->u
  92. STRUCTURE(OurCanvasDraw){
  93. laCanvasExtra Base;
  94. tnsOffscreen *OffScrSave;
  95. int HideBrushCircle;
  96. int AtCrop;
  97. real CanvasLastX,CanvasLastY;
  98. real CanvasDownX,CanvasDownY;
  99. real PointerX,PointerY,DownTilt;
  100. real LastPressure;
  101. real LastTilt[2];
  102. real LastTwist;
  103. real LastSize;
  104. int LastNumber;
  105. int MovedX,MovedY;
  106. };
  107. #define OUR_DPC (600*0.3937007874)
  108. #define OUR_SPECTRAL_SLICES 14
  109. #define OUR_MIXING_SPEED 0.05f
  110. #define OUR_TILE_W 1024
  111. #define OUR_TILES_PER_ROW 100
  112. #define OUR_TILE_CTR (OUR_TILES_PER_ROW/2)
  113. #define OUR_TILE_SEAM 12
  114. #define OUR_TILE_W_USE (OUR_TILE_W-OUR_TILE_SEAM*2)
  115. #define OUR_BRUSH_ACTUAL_SIZE(b) (Our->BrushNumber?Our->BrushBaseSize*pow(2,(real)Our->BrushNumber/2+(b?b->SizeOffset:0)):pow(2,Our->BrushSize+(b?b->SizeOffset:0)))
  116. #ifdef LA_USE_GLES
  117. #define OUR_PIX_COMPACT uint8_t
  118. #else
  119. #define OUR_PIX_COMPACT uint16_t
  120. #endif
  121. #define OUR_PROOF_PRECISION LA_LUT_PRECISION
  122. #define OUR_PROOF_VAL (OUR_PROOF_PRECISION-1)
  123. #define OUR_PROOF_PIXCOUNT LA_LUT_PIXCOUNT
  124. STRUCTURE(OurTexTile){
  125. tnsTexture* Texture;
  126. OUR_PIX_COMPACT* Data;
  127. int l,r,u,b;
  128. OUR_PIX_COMPACT* FullData;
  129. OUR_PIX_COMPACT* CopyBuffer;
  130. int cl,cr,cu,cb;
  131. };
  132. #define OUR_BLEND_NORMAL 0
  133. #define OUR_BLEND_ADD 1
  134. typedef struct OurLayerImageSegmented{
  135. uint32_t Sizes[32];
  136. int H[32];
  137. int Count; int Width,Height;
  138. }OurLayerImageSegmented;
  139. STRUCTURE(OurLayer){
  140. laListItem Item;
  141. laSafeString* Name;
  142. int OffsetX,OffsetY;
  143. real Transparency;
  144. int Lock;
  145. int Hide;
  146. int BlendMode;
  147. int AsSketch;
  148. OurTexTile** TexTiles[OUR_TILES_PER_ROW];
  149. OurLayerImageSegmented ReadSegmented;
  150. };
  151. STRUCTURE(OurLayerWrite){
  152. unsigned char* data;
  153. size_t NextData, MaxData;
  154. };
  155. STRUCTURE(OurLayerRead){
  156. unsigned char* data;
  157. size_t NextData;
  158. };
  159. STRUCTURE(OurBrushSettingsNode){
  160. laBaseNode Base;
  161. laNodeOutSocket* CanvasScale; real rCanvasScale;
  162. laNodeOutSocket* Size; real rSize;
  163. laNodeOutSocket* Transparency; real rTransparency;
  164. laNodeOutSocket* Hardness; real rHardness;
  165. laNodeOutSocket* Smudge; real rSmudge;
  166. laNodeOutSocket* DabsPerSize; real rDabsPerSize;
  167. laNodeOutSocket* SmudgeLength; real rSmudgeLength;
  168. laNodeOutSocket* Slender; real rSlender;
  169. laNodeOutSocket* Angle; real rAngle;
  170. laNodeOutSocket* Gunkyness; real rGunkyness;
  171. laNodeOutSocket* Force; real rForce;
  172. laNodeOutSocket* Color;
  173. laNodeOutSocket* Iteration; int rIteration;
  174. laNodeOutSocket* Custom1; real rCustom1;
  175. laNodeOutSocket* Custom2; real rCustom2;
  176. };
  177. STRUCTURE(OurBrushOutputsNode){
  178. laBaseNode Base;
  179. laNodeInSocket* Offset;
  180. laNodeInSocket* Size;
  181. laNodeInSocket* Transparency;
  182. laNodeInSocket* Hardness;
  183. laNodeInSocket* Smudge;
  184. laNodeInSocket* DabsPerSize;
  185. laNodeInSocket* SmudgeLength;
  186. laNodeInSocket* Slender;
  187. laNodeInSocket* Angle;
  188. laNodeInSocket* Color;
  189. laNodeInSocket* Gunkyness;
  190. laNodeInSocket* Force;
  191. laNodeInSocket* Repeats;
  192. laNodeInSocket* Discard;
  193. };
  194. STRUCTURE(OurBrushDeviceNode){
  195. laBaseNode Base;
  196. laNodeOutSocket* Pressure; real rPressure;
  197. laNodeOutSocket* Position; real rPosition[2];
  198. laNodeOutSocket* Tilt; real rTilt[2];
  199. laNodeOutSocket* Twist; real rTwist;
  200. laNodeOutSocket* IsEraser; int rIsEraser;
  201. laNodeOutSocket* Speed; real rSpeed;
  202. laNodeOutSocket* Angle; real rAngle;
  203. laNodeOutSocket* Length; real rLength;
  204. laNodeOutSocket* LengthAccum; real rLengthAccum;
  205. };
  206. STRUCTURE(OurBrush){
  207. laListItem Item;
  208. laSafeString* Name;
  209. real SizeOffset;
  210. real DabsPerSize;
  211. real Hardness;
  212. real Transparency;
  213. real Smudge;
  214. real SmudgeResampleLength; real SmudgeAccum; int SmudgeRestart; real BrushRemainingDist;
  215. real Slender;
  216. real Angle;
  217. real Force, Gunkyness;
  218. real Smoothness;
  219. real MaxStrokeLength;
  220. real Custom1,Custom2; laSafeString *Custom1Name,*Custom2Name;
  221. int Iteration;
  222. int PressureSize,PressureHardness,PressureTransparency,PressureSmudge,PressureForce,TwistAngle; // the simple way
  223. int Binding,DefaultAsEraser;
  224. int ShowInPages;
  225. real VisualOffset;
  226. real VisualOffsetAngle;
  227. int16_t OffsetFollowPenTilt;
  228. int16_t UseNodes; // the flexible way
  229. laRackPage* Rack;
  230. real LastX,LastY,LastAngle;
  231. real EvalColor[3];
  232. real EvalOffset[2];
  233. real EvalSize;
  234. real EvalDabsPerSize;
  235. real EvalHardness;
  236. real EvalTransparency;
  237. real EvalSmudge;
  238. real EvalSmudgeLength;
  239. real EvalSlender;
  240. real EvalAngle;
  241. real EvalForce, EvalGunkyness;
  242. real EvalSpeed;
  243. real EvalStrokeLength;
  244. real EvalStrokeLengthAccum;
  245. real EvalPressure;
  246. real EvalPosition[2];
  247. real EvalTilt[2];
  248. real EvalTwist;
  249. real EvalStrokeAngle;
  250. int EvalIsEraser;
  251. int EvalRepeats;
  252. int EvalDiscard;
  253. };
  254. STRUCTURE(OurDab){
  255. float X,Y;
  256. float Size;
  257. float Hardness;
  258. float Smudge; int ResampleSmudge;
  259. float Color[4];
  260. float Slender;
  261. float Angle;
  262. float Direction[2];
  263. float Force;
  264. float Gunkyness;
  265. float Recentness;
  266. };
  267. STRUCTURE(OurPigmentData){
  268. real Reflectance[16];
  269. real Absorption[16];
  270. real PreviewColor[3][4];
  271. };
  272. STRUCTURE(OurBrushData140){
  273. float Reflectance[64];
  274. float Absorption[64];
  275. };
  276. STRUCTURE(OurPigmentData140){
  277. float Reflectance[64];
  278. float Absorption[64];
  279. float PaperReflectance[64];
  280. float PaperAbsorption[64];
  281. };
  282. STRUCTURE(OurPigment){
  283. laListItem Item;
  284. laSafeString* Name;
  285. OurPigmentData Pigment;
  286. };
  287. STRUCTURE(OurLight){
  288. laListItem Item;
  289. laSafeString* Name;
  290. OurPigmentData Emission;
  291. };
  292. STRUCTURE(OurCanvasSurface){
  293. laListItem Item;
  294. laSafeString* Name;
  295. OurPigmentData Reflectance;
  296. };
  297. NEED_STRUCTURE(OurColorPallette);
  298. STRUCTURE(OurColorItem){
  299. laListItem Item;
  300. tnsVector3d Color;
  301. OurColorPallette* Parent;
  302. };
  303. STRUCTURE(OurColorPallette){
  304. laListItem Item;
  305. laSafeString* Name;
  306. laListHandle Colors;
  307. };
  308. STRUCTURE(OurUndoTile){
  309. laListItem Item;
  310. int col,row;
  311. OUR_PIX_COMPACT* CopyData;
  312. int l,r,u,b;
  313. };
  314. STRUCTURE(OurUndo){
  315. OurLayer* Layer;
  316. laListHandle Tiles;
  317. };
  318. STRUCTURE(OurMoveUndo){
  319. OurLayer* Layer;
  320. int dx,dy;
  321. };
  322. #define OUR_TOOL_PAINT 0
  323. #define OUR_TOOL_CROP 1
  324. #define OUR_TOOL_MOVE 2
  325. #define OUR_PNG_READ_INPUT_FLAT 0
  326. #define OUR_PNG_READ_INPUT_ICC 1
  327. #define OUR_PNG_READ_INPUT_SRGB 2
  328. #define OUR_PNG_READ_INPUT_LINEAR_SRGB 3
  329. #define OUR_PNG_READ_INPUT_CLAY 4
  330. #define OUR_PNG_READ_INPUT_LINEAR_CLAY 5
  331. #define OUR_PNG_READ_INPUT_D65_P3 6
  332. #define OUR_PNG_READ_INPUT_LINEAR_D65_P3 7
  333. #define OUR_PNG_READ_OUTPUT_CANVAS 0
  334. #define OUR_PNG_READ_OUTPUT_LINEAR_SRGB OUR_PNG_READ_INPUT_LINEAR_SRGB
  335. #define OUR_PNG_READ_OUTPUT_LINEAR_CLAY OUR_PNG_READ_INPUT_LINEAR_CLAY
  336. #define OUR_PNG_READ_OUTPUT_LINEAR_D65_P3 OUR_PNG_READ_INPUT_LINEAR_D65_P3
  337. #define OUR_CANVAS_INTERPRETATION_SRGB 0
  338. #define OUR_CANVAS_INTERPRETATION_CLAY 1
  339. #define OUR_CANVAS_INTERPRETATION_D65_P3 2
  340. #define OUR_EXPORT_BIT_DEPTH_8 0
  341. #define OUR_EXPORT_BIT_DEPTH_16 1
  342. #define OUR_EXPORT_COLOR_MODE_SRGB 0
  343. #define OUR_EXPORT_COLOR_MODE_CLAY 1
  344. #define OUR_EXPORT_COLOR_MODE_FLAT 2
  345. #define OUR_EXPORT_COLOR_MODE_D65_P3 3
  346. #define OUR_BRUSH_PAGE_LIST 128
  347. STRUCTURE(OurPNGReadExtra){
  348. int Confirming;
  349. laSafeString* FilePath;
  350. laSafeString* iccName;
  351. int HassRGB;
  352. int HasProfile;
  353. int InputMode;
  354. int OutputMode;
  355. int Offsets[2];
  356. };
  357. STRUCTURE(OurPNGWriteExtra){
  358. int Confirming;
  359. laSafeString* FilePath;
  360. int BitDepth;
  361. int ColorProfile;
  362. int Transparent;
  363. int PigmentConversionMethod;
  364. int CropX,CropY,CropW,CropH;
  365. };
  366. STRUCTURE(OurThreadExportPNGData){
  367. uint32_t* r_sizes;
  368. void** pointers;
  369. int i;
  370. int segy,h;
  371. int fail;
  372. };
  373. typedef void (*our_XYZ2RGBFunc)(tnsVector3d xyz, tnsVector3d rgb);
  374. typedef void (*our_2LogRGBFunc)(tnsVector3d rgb);
  375. STRUCTURE(OurPigmentConversionData){
  376. int RowStart,RowCount;
  377. int cols;
  378. uint16_t *ImageConversionBuffer;
  379. our_XYZ2RGBFunc XYZ2RGB;
  380. };
  381. NEED_STRUCTURE(OurThreadImportPNGDataMain);
  382. STRUCTURE(OurThreadImportPNGData){
  383. OurThreadImportPNGDataMain* main;
  384. void* data;
  385. OurLayer* l;
  386. int starty;
  387. };
  388. STRUCTURE(OurThreadImportPNGDataMain){
  389. OurThreadImportPNGData* data;
  390. int next,max;
  391. SYSLOCK lock;
  392. };
  393. STRUCTURE(OurUsePigment){
  394. laListItem Item;
  395. OurPigment* pigment;
  396. };
  397. STRUCTURE(BrushUniforms){
  398. GLint uCanvasType;
  399. GLint uCanvasRandom;
  400. GLint uCanvasFactor;
  401. GLint uImageOffset;
  402. GLint uBrushCorner;
  403. GLint uBrushCenter;
  404. GLint uBrushSize;
  405. GLint uBrushHardness;
  406. GLint uBrushSmudge;
  407. GLint uBrushRecentness;
  408. GLint uBrushColor;
  409. GLint uBrushSlender;
  410. GLint uBrushAngle;
  411. GLint uBrushDirection;
  412. GLint uBrushForce;
  413. GLint uBrushGunkyness;
  414. GLint uBrushRoutineSelection;
  415. GLint uBrushRoutineSelectionES;
  416. GLint uMixRoutineSelection;
  417. GLint uMixRoutineSelectionES;
  418. GLint uBrushErasing;
  419. GLint uBrushMix;
  420. GLint RoutineDoDabs;
  421. GLint RoutineDoSample;
  422. GLint RoutineDoMixNormal;
  423. GLint RoutineDoMixSpectral;
  424. GLint uBlendMode;
  425. GLint uAlphaTop;
  426. GLint uAlphaBottom;
  427. GLsizei SubroutineUniformLocations;
  428. };
  429. STRUCTURE(OurPaint){
  430. real pad;
  431. laListHandle CanvasSaverDummyList;
  432. laProp* CanvasSaverDummyProp;
  433. laListHandle BadEvents;
  434. tnsImage* SplashImage;
  435. tnsImage* SplashImageHigh;
  436. laListHandle Pallettes;
  437. OurColorPallette* CurrentPallette;
  438. laListHandle Layers;
  439. OurLayer* CurrentLayer;
  440. laListHandle Brushes;
  441. OurBrush* CurrentBrush;
  442. laListHandle Pigments;
  443. OurPigment* CurrentPigment;
  444. laListHandle Lights;
  445. laListHandle CanvasSurfaces;
  446. real SaveBrushSize,SaveEraserSize;
  447. OurDab* Dabs; int NextDab,MaxDab;
  448. float LastBrushCenter[2];
  449. int CanvasVersion;
  450. laSafeString* Notes;
  451. real Smoothness,Hardness;
  452. real LastX, LastY;
  453. real CurrentScale;
  454. real DefaultScale;
  455. int BrushNumber;
  456. real BrushBaseSize;
  457. real BrushSize;
  458. int BrushPage;
  459. int Tool,ActiveTool,Erasing,EventErasing,BrushMix;
  460. int LockBackground;
  461. int BackgroundType;
  462. int BackgroundRandom;
  463. real BackgroundFactor;
  464. int PenID,EraserID;
  465. int X,Y,W,H; //border
  466. real BorderFadeWidth;
  467. int ColorInterpretation;
  468. int ShowBorder,UseBorder;
  469. int ShowTiles;
  470. int BrushCircleTiltMode;
  471. int AllowNonPressure,PaintProcessedEvents;
  472. int BadEventsLimit,BadEventCount,BadEventsGiveUp;
  473. int EnableBrushCircle,ShowBrushName,ShowBrushNumber;
  474. int EventHasTwist; real EventTwistAngle; real EventTiltOrientation;
  475. int DefaultBitDepth;
  476. int DefaultColorProfile;
  477. int PaintUndoLimit;
  478. int SpectralMode;
  479. int PigmentMode;
  480. int BrushNumbersOnHeader;
  481. int MixModeOnHeader;
  482. int ToolsOnHeader;
  483. int UndoOnHeader;
  484. int LightsOnHeader;
  485. int SketchMode;
  486. int SegmentedWrite;
  487. int PigmentDisplayMethod;
  488. tnsTexture* SmudgeTexture;
  489. GLuint CanvasShader; GLuint CanvasProgram;
  490. GLuint CanvasStraightShader; GLuint CanvasStraightProgram;
  491. GLuint CanvasPigmentShader; GLuint CanvasPigmentProgram;
  492. GLuint CompositionShader; GLuint CompositionProgram;
  493. GLuint CompositionStraightShader; GLuint CompositionStraightProgram;
  494. GLuint LayerShader; GLuint LayerProgram;
  495. GLuint DisplayShader; GLuint DisplayProgram;
  496. GLuint PigmentLayeringShader; tnsShader* PigmentLayeringProgramT;
  497. GLuint PigmentDisplayShader; tnsShader* PigmentDisplayProgramT;
  498. GLuint uPigmentFragOffset,uPigmentTextureScale,uPigmentDisplayMode;
  499. GLint uboBrushPigment,uboBrushPigmentLocation;
  500. GLint uboCanvasPigment,uboCanvasPigmentLocation;
  501. BrushUniforms *u,uRGBA,uRGBStraightA,uPigment;
  502. int AlphaMode;
  503. OurCanvasSurface *CanvasSurface; // not ptr to list
  504. OurLight *CanvasLight;
  505. OurPigmentData PickedPigment;
  506. OurPigmentData MixedPigment;
  507. laListHandle UsePigments;
  508. real CurrentColor[3];
  509. real BackgroundColor[3];
  510. uint16_t BColorU16[4];
  511. uint8_t BColorU8[4];
  512. real BorderAlpha;
  513. int ShowStripes;
  514. int ShowGrid;
  515. int ShowRef;
  516. int RefSize;
  517. int RefCategory;
  518. int RefOrientation;
  519. int RefCutHalf;
  520. real RefMargins[3],RefPaddings[2];
  521. int RefBiases[2];
  522. real RefAlpha;
  523. real xmin,xmax,ymin,ymax; // stroke bbox for undo region
  524. int ResetBrush;
  525. int SaveFailed;
  526. int FileRegistered;
  527. uint16_t *ImageBuffer;
  528. int ImageW,ImageH,ImageX,ImageY,LoadX,LoadY,TempLoadX,TempLoadY;
  529. uint8_t* ThumbnailBuffer;
  530. void* icc_LinearsRGB; int iccsize_LinearsRGB;
  531. void* icc_LinearClay; int iccsize_LinearClay;
  532. void* icc_LinearD65P3; int iccsize_LinearD65P3;
  533. void* icc_sRGB; int iccsize_sRGB;
  534. void* icc_Clay; int iccsize_Clay;
  535. void* icc_D65P3; int iccsize_D65P3;
  536. void* ProofTablesRGB, *ProofTableClay, *ProofTableD65;
  537. };
  538. int ourProcessInitArgs(int argc, char* argv[]);
  539. int ourInit();
  540. void ourFinalize();
  541. void ourRegisterNodes();
  542. int ourRebuildBrushEval();
  543. int ourEvalBrush();
  544. void ourMakeTranslations_zh_hans();
  545. void ourMakeTranslations_es_ES();
  546. void our_EnableSplashPanel();