*/}}

ourpaint.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  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. STRUCTURE(OurTexTile){
  122. tnsTexture* Texture;
  123. OUR_PIX_COMPACT* Data;
  124. int l,r,u,b;
  125. OUR_PIX_COMPACT* FullData;
  126. OUR_PIX_COMPACT* CopyBuffer;
  127. int cl,cr,cu,cb;
  128. };
  129. #define OUR_BLEND_NORMAL 0
  130. #define OUR_BLEND_ADD 1
  131. typedef struct OurLayerImageSegmented{
  132. uint32_t Sizes[32];
  133. int H[32];
  134. int Count; int Width,Height;
  135. }OurLayerImageSegmented;
  136. STRUCTURE(OurLayer){
  137. laListItem Item;
  138. laSafeString* Name;
  139. int OffsetX,OffsetY;
  140. real Transparency;
  141. int Lock;
  142. int Hide;
  143. int BlendMode;
  144. int AsSketch;
  145. OurTexTile** TexTiles[OUR_TILES_PER_ROW];
  146. OurLayerImageSegmented ReadSegmented;
  147. };
  148. STRUCTURE(OurLayerWrite){
  149. unsigned char* data;
  150. size_t NextData, MaxData;
  151. };
  152. STRUCTURE(OurLayerRead){
  153. unsigned char* data;
  154. size_t NextData;
  155. };
  156. STRUCTURE(OurBrushSettingsNode){
  157. laBaseNode Base;
  158. laNodeOutSocket* CanvasScale; real rCanvasScale;
  159. laNodeOutSocket* Size; real rSize;
  160. laNodeOutSocket* Transparency; real rTransparency;
  161. laNodeOutSocket* Hardness; real rHardness;
  162. laNodeOutSocket* Smudge; real rSmudge;
  163. laNodeOutSocket* DabsPerSize; real rDabsPerSize;
  164. laNodeOutSocket* SmudgeLength; real rSmudgeLength;
  165. laNodeOutSocket* Slender; real rSlender;
  166. laNodeOutSocket* Angle; real rAngle;
  167. laNodeOutSocket* Gunkyness; real rGunkyness;
  168. laNodeOutSocket* Force; real rForce;
  169. laNodeOutSocket* Color;
  170. laNodeOutSocket* Iteration; int rIteration;
  171. laNodeOutSocket* Custom1; real rCustom1;
  172. laNodeOutSocket* Custom2; real rCustom2;
  173. };
  174. STRUCTURE(OurBrushOutputsNode){
  175. laBaseNode Base;
  176. laNodeInSocket* Offset;
  177. laNodeInSocket* Size;
  178. laNodeInSocket* Transparency;
  179. laNodeInSocket* Hardness;
  180. laNodeInSocket* Smudge;
  181. laNodeInSocket* DabsPerSize;
  182. laNodeInSocket* SmudgeLength;
  183. laNodeInSocket* Slender;
  184. laNodeInSocket* Angle;
  185. laNodeInSocket* Color;
  186. laNodeInSocket* Gunkyness;
  187. laNodeInSocket* Force;
  188. laNodeInSocket* Repeats;
  189. laNodeInSocket* Discard;
  190. };
  191. STRUCTURE(OurBrushDeviceNode){
  192. laBaseNode Base;
  193. laNodeOutSocket* Pressure; real rPressure;
  194. laNodeOutSocket* Position; real rPosition[2];
  195. laNodeOutSocket* Tilt; real rTilt[2];
  196. laNodeOutSocket* Twist; real rTwist;
  197. laNodeOutSocket* IsEraser; int rIsEraser;
  198. laNodeOutSocket* Speed; real rSpeed;
  199. laNodeOutSocket* Angle; real rAngle;
  200. laNodeOutSocket* Length; real rLength;
  201. laNodeOutSocket* LengthAccum; real rLengthAccum;
  202. };
  203. STRUCTURE(OurBrush){
  204. laListItem Item;
  205. laSafeString* Name;
  206. real SizeOffset;
  207. real DabsPerSize;
  208. real Hardness;
  209. real Transparency;
  210. real Smudge;
  211. real SmudgeResampleLength; real SmudgeAccum; int SmudgeRestart; real BrushRemainingDist;
  212. real Slender;
  213. real Angle;
  214. real Force, Gunkyness;
  215. real Smoothness;
  216. real MaxStrokeLength;
  217. real Custom1,Custom2; laSafeString *Custom1Name,*Custom2Name;
  218. int Iteration;
  219. int PressureSize,PressureHardness,PressureTransparency,PressureSmudge,PressureForce,TwistAngle; // the simple way
  220. int Binding,DefaultAsEraser;
  221. int ShowInPages;
  222. real VisualOffset;
  223. real VisualOffsetAngle;
  224. int16_t OffsetFollowPenTilt;
  225. int16_t UseNodes; // the flexible way
  226. laRackPage* Rack;
  227. real LastX,LastY,LastAngle;
  228. real EvalColor[3];
  229. real EvalOffset[2];
  230. real EvalSize;
  231. real EvalDabsPerSize;
  232. real EvalHardness;
  233. real EvalTransparency;
  234. real EvalSmudge;
  235. real EvalSmudgeLength;
  236. real EvalSlender;
  237. real EvalAngle;
  238. real EvalForce, EvalGunkyness;
  239. real EvalSpeed;
  240. real EvalStrokeLength;
  241. real EvalStrokeLengthAccum;
  242. real EvalPressure;
  243. real EvalPosition[2];
  244. real EvalTilt[2];
  245. real EvalTwist;
  246. real EvalStrokeAngle;
  247. int EvalIsEraser;
  248. int EvalRepeats;
  249. int EvalDiscard;
  250. };
  251. STRUCTURE(OurDab){
  252. float X,Y;
  253. float Size;
  254. float Hardness;
  255. float Smudge; int ResampleSmudge;
  256. float Color[4];
  257. float Slender;
  258. float Angle;
  259. float Direction[2];
  260. float Force;
  261. float Gunkyness;
  262. float Recentness;
  263. };
  264. STRUCTURE(OurPigmentData){
  265. real Reflectance[16];
  266. real Absorption[16];
  267. real PreviewColor[3][4];
  268. };
  269. STRUCTURE(OurBrushData140){
  270. float Reflectance[64];
  271. float Absorption[64];
  272. };
  273. STRUCTURE(OurPigmentData140){
  274. float Reflectance[64];
  275. float Absorption[64];
  276. float PaperReflectance[64];
  277. float PaperAbsorption[64];
  278. };
  279. STRUCTURE(OurPigment){
  280. laListItem Item;
  281. laSafeString* Name;
  282. OurPigmentData Pigment;
  283. };
  284. STRUCTURE(OurLight){
  285. laListItem Item;
  286. laSafeString* Name;
  287. OurPigmentData Emission;
  288. };
  289. STRUCTURE(OurCanvasSurface){
  290. laListItem Item;
  291. laSafeString* Name;
  292. OurPigmentData Reflectance;
  293. };
  294. NEED_STRUCTURE(OurColorPallette);
  295. STRUCTURE(OurColorItem){
  296. laListItem Item;
  297. tnsVector3d Color;
  298. OurColorPallette* Parent;
  299. };
  300. STRUCTURE(OurColorPallette){
  301. laListItem Item;
  302. laSafeString* Name;
  303. laListHandle Colors;
  304. };
  305. STRUCTURE(OurUndoTile){
  306. laListItem Item;
  307. int col,row;
  308. OUR_PIX_COMPACT* CopyData;
  309. int l,r,u,b;
  310. };
  311. STRUCTURE(OurUndo){
  312. OurLayer* Layer;
  313. laListHandle Tiles;
  314. };
  315. STRUCTURE(OurMoveUndo){
  316. OurLayer* Layer;
  317. int dx,dy;
  318. };
  319. #define OUR_TOOL_PAINT 0
  320. #define OUR_TOOL_CROP 1
  321. #define OUR_TOOL_MOVE 2
  322. #define OUR_PNG_READ_INPUT_FLAT 0
  323. #define OUR_PNG_READ_INPUT_ICC 1
  324. #define OUR_PNG_READ_INPUT_SRGB 2
  325. #define OUR_PNG_READ_INPUT_LINEAR_SRGB 3
  326. #define OUR_PNG_READ_INPUT_CLAY 4
  327. #define OUR_PNG_READ_INPUT_LINEAR_CLAY 5
  328. #define OUR_PNG_READ_INPUT_D65_P3 6
  329. #define OUR_PNG_READ_INPUT_LINEAR_D65_P3 7
  330. #define OUR_PNG_READ_OUTPUT_CANVAS 0
  331. #define OUR_PNG_READ_OUTPUT_LINEAR_SRGB OUR_PNG_READ_INPUT_LINEAR_SRGB
  332. #define OUR_PNG_READ_OUTPUT_LINEAR_CLAY OUR_PNG_READ_INPUT_LINEAR_CLAY
  333. #define OUR_PNG_READ_OUTPUT_LINEAR_D65_P3 OUR_PNG_READ_INPUT_LINEAR_D65_P3
  334. #define OUR_CANVAS_INTERPRETATION_SRGB 0
  335. #define OUR_CANVAS_INTERPRETATION_CLAY 1
  336. #define OUR_CANVAS_INTERPRETATION_D65_P3 2
  337. #define OUR_EXPORT_BIT_DEPTH_8 0
  338. #define OUR_EXPORT_BIT_DEPTH_16 1
  339. #define OUR_EXPORT_COLOR_MODE_SRGB 0
  340. #define OUR_EXPORT_COLOR_MODE_CLAY 1
  341. #define OUR_EXPORT_COLOR_MODE_FLAT 2
  342. #define OUR_EXPORT_COLOR_MODE_D65_P3 3
  343. #define OUR_BRUSH_PAGE_LIST 128
  344. STRUCTURE(OurPNGReadExtra){
  345. int Confirming;
  346. laSafeString* FilePath;
  347. laSafeString* iccName;
  348. int HassRGB;
  349. int HasProfile;
  350. int InputMode;
  351. int OutputMode;
  352. int Offsets[2];
  353. };
  354. STRUCTURE(OurPNGWriteExtra){
  355. int Confirming;
  356. laSafeString* FilePath;
  357. int BitDepth;
  358. int ColorProfile;
  359. int Transparent;
  360. int PigmentConversionMethod;
  361. int CropX,CropY,CropW,CropH;
  362. };
  363. STRUCTURE(OurThreadExportPNGData){
  364. uint32_t* r_sizes;
  365. void** pointers;
  366. int i;
  367. int segy,h;
  368. int fail;
  369. };
  370. typedef void (*our_XYZ2RGBFunc)(tnsVector3d xyz, tnsVector3d rgb);
  371. typedef void (*our_2LogRGBFunc)(tnsVector3d rgb);
  372. STRUCTURE(OurPigmentConversionData){
  373. int RowStart,RowCount;
  374. int cols;
  375. uint16_t *ImageConversionBuffer;
  376. our_XYZ2RGBFunc XYZ2RGB;
  377. };
  378. NEED_STRUCTURE(OurThreadImportPNGDataMain);
  379. STRUCTURE(OurThreadImportPNGData){
  380. OurThreadImportPNGDataMain* main;
  381. void* data;
  382. OurLayer* l;
  383. int starty;
  384. };
  385. STRUCTURE(OurThreadImportPNGDataMain){
  386. OurThreadImportPNGData* data;
  387. int next,max;
  388. SYSLOCK lock;
  389. };
  390. STRUCTURE(OurUsePigment){
  391. laListItem Item;
  392. OurPigment* pigment;
  393. };
  394. STRUCTURE(BrushUniforms){
  395. GLint uCanvasType;
  396. GLint uCanvasRandom;
  397. GLint uCanvasFactor;
  398. GLint uImageOffset;
  399. GLint uBrushCorner;
  400. GLint uBrushCenter;
  401. GLint uBrushSize;
  402. GLint uBrushHardness;
  403. GLint uBrushSmudge;
  404. GLint uBrushRecentness;
  405. GLint uBrushColor;
  406. GLint uBrushSlender;
  407. GLint uBrushAngle;
  408. GLint uBrushDirection;
  409. GLint uBrushForce;
  410. GLint uBrushGunkyness;
  411. GLint uBrushRoutineSelection;
  412. GLint uBrushRoutineSelectionES;
  413. GLint uMixRoutineSelection;
  414. GLint uMixRoutineSelectionES;
  415. GLint uBrushErasing;
  416. GLint uBrushMix;
  417. GLint RoutineDoDabs;
  418. GLint RoutineDoSample;
  419. GLint RoutineDoMixNormal;
  420. GLint RoutineDoMixSpectral;
  421. GLint uBlendMode;
  422. GLint uAlphaTop;
  423. GLint uAlphaBottom;
  424. GLsizei SubroutineUniformLocations;
  425. };
  426. STRUCTURE(OurPaint){
  427. real pad;
  428. laListHandle CanvasSaverDummyList;
  429. laProp* CanvasSaverDummyProp;
  430. laListHandle BadEvents;
  431. tnsImage* SplashImage;
  432. tnsImage* SplashImageHigh;
  433. laListHandle Pallettes;
  434. OurColorPallette* CurrentPallette;
  435. laListHandle Layers;
  436. OurLayer* CurrentLayer;
  437. laListHandle Brushes;
  438. OurBrush* CurrentBrush;
  439. laListHandle Pigments;
  440. OurPigment* CurrentPigment;
  441. laListHandle Lights;
  442. laListHandle CanvasSurfaces;
  443. real SaveBrushSize,SaveEraserSize;
  444. OurDab* Dabs; int NextDab,MaxDab;
  445. float LastBrushCenter[2];
  446. int CanvasVersion;
  447. laSafeString* Notes;
  448. real Smoothness,Hardness;
  449. real LastX, LastY;
  450. real CurrentScale;
  451. real DefaultScale;
  452. int BrushNumber;
  453. real BrushBaseSize;
  454. real BrushSize;
  455. int BrushPage;
  456. int Tool,ActiveTool,Erasing,EventErasing,BrushMix;
  457. int LockBackground;
  458. int BackgroundType;
  459. int BackgroundRandom;
  460. real BackgroundFactor;
  461. int PenID,EraserID;
  462. int X,Y,W,H; //border
  463. real BorderFadeWidth;
  464. int ColorInterpretation;
  465. int ShowBorder,UseBorder;
  466. int ShowTiles;
  467. int BrushCircleTiltMode;
  468. int AllowNonPressure,PaintProcessedEvents;
  469. int BadEventsLimit,BadEventCount,BadEventsGiveUp;
  470. int EnableBrushCircle,ShowBrushName,ShowBrushNumber;
  471. int EventHasTwist; real EventTwistAngle; real EventTiltOrientation;
  472. int DefaultBitDepth;
  473. int DefaultColorProfile;
  474. int PaintUndoLimit;
  475. int SpectralMode;
  476. int PigmentMode;
  477. int BrushNumbersOnHeader;
  478. int MixModeOnHeader;
  479. int ToolsOnHeader;
  480. int UndoOnHeader;
  481. int LightsOnHeader;
  482. int SketchMode;
  483. int SegmentedWrite;
  484. int PigmentDisplayMethod;
  485. tnsTexture* SmudgeTexture;
  486. GLuint CanvasShader; GLuint CanvasProgram;
  487. GLuint CanvasStraightShader; GLuint CanvasStraightProgram;
  488. GLuint CanvasPigmentShader; GLuint CanvasPigmentProgram;
  489. GLuint CompositionShader; GLuint CompositionProgram;
  490. GLuint CompositionStraightShader; GLuint CompositionStraightProgram;
  491. GLuint LayerShader; GLuint LayerProgram;
  492. GLuint DisplayShader; GLuint DisplayProgram;
  493. GLuint PigmentLayeringShader; tnsShader* PigmentLayeringProgramT;
  494. GLuint PigmentDisplayShader; tnsShader* PigmentDisplayProgramT;
  495. GLuint uPigmentFragOffset,uPigmentTextureScale,uPigmentDisplayMode;
  496. GLint uboBrushPigment,uboBrushPigmentLocation;
  497. GLint uboCanvasPigment,uboCanvasPigmentLocation;
  498. BrushUniforms *u,uRGBA,uRGBStraightA,uPigment;
  499. int AlphaMode;
  500. OurCanvasSurface *CanvasSurface; // not ptr to list
  501. OurLight *CanvasLight;
  502. OurPigmentData PickedPigment;
  503. OurPigmentData MixedPigment;
  504. laListHandle UsePigments;
  505. real CurrentColor[3];
  506. real BackgroundColor[3];
  507. uint16_t BColorU16[4];
  508. uint8_t BColorU8[4];
  509. real BorderAlpha;
  510. int ShowStripes;
  511. int ShowGrid;
  512. int ShowRef;
  513. int RefSize;
  514. int RefCategory;
  515. int RefOrientation;
  516. int RefCutHalf;
  517. real RefMargins[3],RefPaddings[2];
  518. int RefBiases[2];
  519. real RefAlpha;
  520. real xmin,xmax,ymin,ymax; // stroke bbox for undo region
  521. int ResetBrush;
  522. int SaveFailed;
  523. int FileRegistered;
  524. uint16_t *ImageBuffer;
  525. int ImageW,ImageH,ImageX,ImageY,LoadX,LoadY,TempLoadX,TempLoadY;
  526. uint8_t* ThumbnailBuffer;
  527. void* icc_LinearsRGB; int iccsize_LinearsRGB;
  528. void* icc_LinearClay; int iccsize_LinearClay;
  529. void* icc_LinearD65P3; int iccsize_LinearD65P3;
  530. void* icc_sRGB; int iccsize_sRGB;
  531. void* icc_Clay; int iccsize_Clay;
  532. void* icc_D65P3; int iccsize_D65P3;
  533. void* ProofTablesRGB, *ProofTableClay, *ProofTableD65;
  534. };
  535. int ourProcessInitArgs(int argc, char* argv[]);
  536. int ourInit();
  537. void ourFinalize();
  538. void ourRegisterNodes();
  539. int ourRebuildBrushEval();
  540. int ourEvalBrush();
  541. void ourMakeTranslations_zh_hans();
  542. void ourMakeTranslations_es_ES();
  543. void our_EnableSplashPanel();