a27ef05989Fixes missing display of X: Y: in toolbar when closing a window
Adrien Destugues
2008-12-27 21:27:19 +00:00
48b1d75ff5Fixed the remaining problems with the rectangles. The code was really bad, messing up with RBX and RAY... i must have been _very_ tired when i wrote it :)
Adrien Destugues
2008-12-27 17:45:39 +00:00
9bc64e8adbFixes the crash with the gradrect. But there are still some screen corruption (and missing lines) problems...
Adrien Destugues
2008-12-27 17:25:20 +00:00
63d595a3edNo longer include dll in non-windows release archives
Adrien Destugues
2008-12-27 15:13:34 +00:00
79aca71830Fixes issue #78 and some more makefile tuning (ziprelease names the archives according to the platform)
Adrien Destugues
2008-12-27 15:10:35 +00:00
a8ae3672f8Also for Haiku
Adrien Destugues
2008-12-27 14:43:53 +00:00
c4955dd0f0TT font listing for beos
Adrien Destugues
2008-12-27 14:37:47 +00:00
f180b13f29Makefile tuning for beos
Adrien Destugues
2008-12-27 14:17:25 +00:00
321187693cFixes realpath for beos uses. As beos also misses fchdir...
Adrien Destugues
2008-12-27 13:57:53 +00:00
77f745e1f0Oops, i messed up some little things there :)
Adrien Destugues
2008-12-27 11:46:10 +00:00
e2fe9dcd79Added some pathes for AROS operating system. We need someone to test it out now :) Also, there is a realpath implementation there wich may be useful for BeOS too
Adrien Destugues
2008-12-27 11:43:03 +00:00
4c48c74a96Fixed minor issues of r419 when keyboard-drawing in zoom area: "Escaping" the zoom window, and going up at the top warps to the bottom. Also, even with mouse,when you draw downwards into the menu, the cursor no longer blinks into the top line of the menu.
Yves Rizoud
2008-12-27 03:12:21 +00:00
a2324e2cb1Cursor moves faster when using the keyboard shortcuts over the zoomed screen. Feels more natural to me
Adrien Destugues
2008-12-26 21:46:17 +00:00
df33261b59Fix issue 57: Missing refresh in the cross points for the 4-point splines. Also fixed the display of the bottom-right corner of the spline itself. Grad rectangle: The vector line is now drawn as XOR: dragging it no longer erases the screen. SFont.c: Only removed TAB characters in source.
Yves Rizoud
2008-12-26 19:38:21 +00:00
c55c27bd85Fixed the two little issues in button handling.
Adrien Destugues
2008-12-24 15:42:10 +00:00
e7a1152777Fixes some problems of sreen update in smear mode (issue 66) and possibly some others. The various calls to Mettre_Ecran_A_Jour in Afficher_Pinceau could benefit from some cleanup in order to avoid if(sthing)Mettre_Ecran_A_Jour(A,B,C,D)else Mettre_Ecran_A_Jour(A,B,C,D) with same ABCD...
Adrien Destugues
2008-12-24 13:13:06 +00:00
d37b4f44e9X/Y labels weren't displayed in status when leaving magnify mode.
Franck Charlet
2008-12-23 21:48:52 +00:00
273c1b1bf1Removed some useless code due to precedent fix.
Franck Charlet
2008-12-23 20:20:35 +00:00
b0e7f6189fIssue 67 should now be entirely fixed (including the coordinates being displayed while hovering the menu).
Franck Charlet
2008-12-23 20:18:25 +00:00
ad465d6073X & Y labels disappearing (issue 67) should be fixed.
Franck Charlet
2008-12-23 19:35:49 +00:00
7247b83007(Linux and Windows) Fix missing refresh that happened when zoom was on and you were drawing in the left part of screen.
Yves Rizoud
2008-12-22 18:44:02 +00:00
c1af3faac2Fixed 'mouse droppings' when using the Thin cursor. The cursor also didn't look symmetric.
Yves Rizoud
2008-12-21 19:20:26 +00:00
f65820313fFixed a bug which attempted to refresh below the screen when menu is hidden
Yves Rizoud
2008-12-21 18:23:41 +00:00
b5168ffdf7Fixes crash if menu is hidden and mouse cursor touches screen bottom (issue 71) Fixes an off-by-one error in screen refresh which caused the menu bar to not reappear when you press F10. It was since r392 (except MacOSX).
Yves Rizoud
2008-12-21 16:28:24 +00:00
d237b058adFixes SIGSEGV from r406 when loading an image from command-line. oops.
Yves Rizoud
2008-12-20 20:20:32 +00:00
a81bc2c1a4Fixes SIGSEGVs and weird coordinates of viewports when resizing the screen (w/ and w/o zoom, with resolution change or window resize)
Yves Rizoud
2008-12-20 19:06:00 +00:00
8862c1994fFixes a SIGSEGV when using line,polyline,polygon etc. with a starting point below the picture (outside).
Yves Rizoud
2008-12-20 17:50:54 +00:00
4caccac09aFixed issue 70: Kb shortcuts during brush rotation and stretch. Fixed compilation warnings of these functions ("... might be uninitialized")
Yves Rizoud
2008-12-19 00:10:17 +00:00
ccfc83dae3- Updated the xcode project. - Added my email in the credits just in case.
Franck Charlet
2008-12-18 18:17:27 +00:00
77206f2baaSome sources converted from Unicode to ANSI, and removed some warnings for mingw (implicit include of libc)
Yves Rizoud
2008-12-18 15:08:23 +00:00
fb6d1100dcLines will refresh instantly when you press shift, but, strangely, not when you release it.
Adrien Destugues
2008-12-17 20:58:59 +00:00
2825350f17We missed a flush_update there...
Adrien Destugues
2008-12-17 20:52:39 +00:00
294ccbd2d3Allow sliders to scroll more than once when the mouse button is pressed
Adrien Destugues
2008-12-17 20:00:15 +00:00
efd02fbf00Fix compilation warnings of r394
Yves Rizoud
2008-12-17 19:12:58 +00:00
90b3f9b1a1Finished updating the includes for graph.c split. Now we have :
Adrien Destugues
2008-12-16 22:14:08 +00:00
c004c90d90Splitted graph.c in multiple files. Compiles but there is a lot of warnings about declarations. I'm cleaning it up but i wanted to commit that before starting to get conflicts
Adrien Destugues
2008-12-16 22:02:22 +00:00
78df30d844Fix broken characters >127 in the help window. Fix broken characters >127 in normal fonts. (Pkm: I unsigned the characters during gcc port, please don't re-sign them :) Got rid of OEM->ANSI character translation in normal text. Now displays the nice '...' character for filenames that dont fit windows/menus. (dev) Added a sample Amstrad CPC picture with wide pixels. Remember to run grafx2 with '/wide'
Yves Rizoud
2008-12-16 19:26:19 +00:00
22670e7215Fonts re-ordered/redrawn in ANSI order
Yves Rizoud
2008-12-16 17:44:57 +00:00
514eee4f79Fixes the brush roatation missing update. Also switched to cumulative rects method instead of rect-by-rect, as it is faster, and flicker free when working with big brushes. It may makes it harder to diagnose missing refreshes, however.
Adrien Destugues
2008-12-16 16:54:21 +00:00
71c2aa4ce6Fix missing refresh in Spray menu. Fix wrong color selection in Spray menu when clicking between columns.
Yves Rizoud
2008-12-15 23:54:28 +00:00
72738b9e48Sieve menu displays sieve previews with wide/tall aspect ratio if needed.
Yves Rizoud
2008-12-15 23:02:33 +00:00
b6d18a012bBrush menu displays with wide/tall aspect ratio if needed
Yves Rizoud
2008-12-15 22:28:32 +00:00
383bb56366Added the missing text refresh for text in windows.
Adrien Destugues
2008-12-15 22:05:32 +00:00
9510441b7bMissing files from previous commit
Yves Rizoud
2008-12-15 21:45:13 +00:00
d4dcf44f7cSupport for "wide pixel" mode (Each pixel is 2x1). Run the program with "/wide" argument to test. Now you can draw graphics for Amstrad CPC's "mode 0" :)
Yves Rizoud
2008-12-15 21:00:18 +00:00
d81a4a26f0Oops ! Much lower cpu use and keyboard is working again.
Adrien Destugues
2008-12-15 19:36:47 +00:00
c72dcd1840Only displays the coordinates if the mouse moved. Next step is to check the Operations and see wich of them are displaying the coordinates, wich are not, and decide wether we always display them in the main loop (smaller code for operations) or in each atomic action in operation (more code in the atomic actions but allow for displaying anything, like the selected color for the pipette, radius for the circle tool, relative positions for lines and rectangles, and so on. Might be interesting. We may also display the basic corrdinates and let each operation display (or not display) some string in the remaining menubar space.
Adrien Destugues
2008-12-15 16:33:30 +00:00
a5150484e4Removed useless call to UpdateRect.
Adrien Destugues
2008-12-15 15:53:13 +00:00
87d887e240One more small speedup. The coordinates were always printed twice in the menubar. Also added a missing refresh when using the pipette and the color replace tools. Now you get a preview of the color under the cursor in the menubar.
Adrien Destugues
2008-12-15 15:17:47 +00:00
6c8bbfbc56Now idles when there is nothing to do. Much less CPUtime use, but the spray is slowed down. We need to improve the handling of Get_input in Gestion_principale. Get_input now returns 1 if something happened, and 0 if not. So we can chose what to do depending on that. We should try not to wait if the operation needs to be asynchronous, but there is no way to know that for now, and it may be quite complex to determine (i think the shade effect can be asynchronous for example, so it'll affect pretty much all operations).
Adrien Destugues
2008-12-14 11:17:15 +00:00
363ff934fdAdded xman current working mail address to the credits screen
Adrien Destugues
2008-12-13 21:56:09 +00:00
d2300cc2c1Support for "tall pixel" mode (Each pixel is 1x2). Run the program with "/tall" argument to test.
Yves Rizoud
2008-12-13 16:20:37 +00:00
2033f2dfb4Some optimisations to the text drawing (Print_general) unfinished, breaks the OEM special chars for now.
Adrien Destugues
2008-12-10 11:53:56 +00:00
428e1c36cfSome more optimizations to the color reduction algorithm. Now runs in a decent time on my laptop :) There may be some more small optimisations possible in this area... i'm still thinking we could get a better palette by putting more priority on highly saturated clusters, but, as we don't store the saturation property in the clusters, it seems difficult to do. Probably it would require switching to HSL before doing the clustering, and finetune the multiplications done in Cluster_Split. Note: these modifications (and the one in the previous commit) will probably crash badly if using the reduction algorithm with a smaller precision than 24bpp. The program will try to do that if it is unable to malloc the big lookup tables (we need a table of 256^3 = 16Mbytes for the color lookup, and when loading we also have the 24b image in memory, and also the clustermap, and the occurence table, wich is 256^3*4=64Mbytes). So, either we assume every computer out there has 128Mb RAM, or I'll have to change my code back to use a lower precision if the malloc ever fails. Anyways, who's wanting to open files bigger than our marbles.pcx in grafx2 ? and who except me is running a computer without swap memory at all ?
Adrien Destugues
2008-12-09 16:40:36 +00:00
de726cae2fSome small optimisations to speed up the color reduction algorithm... still a little bit slow for me ...
Adrien Destugues
2008-12-08 20:28:38 +00:00
d6d03dc6c7Load/Save: Fixed "Backspace" shortcut (previous directory), broken recently. Load/Save: Fixed "Backspace" shortcut detecting root only on MS filesystems.
Yves Rizoud
2008-12-05 23:28:50 +00:00
09ba984aa6On all screens that display a palette, the grey columns are no longer "dead", you can click them to pick the color to its right. Added help text for HSL mode in Palette, and Grad rectangle Fixed display of colored rectangles in Palette screen (issue 64) Fixed more missing refreshes in the Palette screen Fixed wrong shortcuts in Palette screen Removed an obsolete message ("Sensibilite Souris") and dead code
Yves Rizoud
2008-12-04 21:44:59 +00:00
7c658a6855Some fixes to the floyd steinberg dithering. The error was added to the neughbour pixels, it is now substracted, the results are much better. However, the palette seems to lack saturated colors (in comparison to the one generated b ygimp, wich gives more dithering, but better overall subjective ressemblance to the 24bit image. Maybe having less dithering is fine for us, as we are in a pixelart painting program afterall...
Adrien Destugues
2008-12-03 20:50:52 +00:00
14accb544bPalette now uses RGB components in the full 0-255 range instead of 0-63. All palette functions can be used in HSL color space too (multi-select, etc). Fixed some more missing refreshes in Palette screen.
Yves Rizoud
2008-12-03 01:03:32 +00:00
bee5956c41Enabled .pbf fonts : Opentype fonts, on Debian Fixed a memory leak. Happens once, harmless.
Yves Rizoud
2008-11-29 15:35:31 +00:00
6413bdc474Upload of the Win32 icons and DLLs
Yves Rizoud
2008-11-29 00:49:06 +00:00
ff27c5dcf9BIG change in directory handling: - Unix users can "make install" and "make uninstall" (as root). - Installation creates shortcuts "grafx2" and "gfx2cfg" in /usr/local/bin - Installation puts data files (icon GIFs, gfx2.dat,..) and the actual binaries in /usr/local/share/grafx2 - At runtime, the programs search and create configuration files (gfx2.cfg and gfx2.ini) in ~/.grafx2 (But if there are some present in program's own directory, they override) - Uninstall removes programs and data, but leaves all users' configurations.
Yves Rizoud
2008-11-28 23:50:28 +00:00
3ca05279dbFix program hang in Save/Load (Issue 59)
Yves Rizoud
2008-11-25 20:22:10 +00:00
7ba57b206eAttempt at fixing BeOS build that I broke in r345 -> Issue 61. Completed bugfinders list.
Yves Rizoud
2008-11-25 19:55:06 +00:00
8ce30de525Add 32 null bytes at end of PI1 files to make ST Deluxe Paint happy (reported by tobe)
Adrien Destugues
2008-11-25 18:58:50 +00:00
436e3f15fdHelp screens show the keyboard shortcuts from current configuration
Yves Rizoud
2008-11-24 00:07:49 +00:00
a723537d94Fix incomplete display of brush at screen edges in zoom mode (issue 53
Yves Rizoud
2008-11-23 16:54:18 +00:00
d71d7d701dFixed more missing screen refreshes: - Issue 54: Palette screen, BG color area after picking a BG color by right-click. - All screens that allow the user to press Tilde to hides the window and pick a color on the image. - Stencil screen, the selected colors when you're back after picking a color. - Issue 55: Load/Save, areas with file stats (size, preview) just after changing selection. - Issue 44: Status bar when emptying it (ex: hovering the status bar or the zoom separator)
Yves Rizoud
2008-11-22 00:56:21 +00:00
fc0bd94113Fixed the rgb2hls and hls2rgb functions. But we are losing too much precision when converting the RGB components back to "VGA" 0..63... I think it's time to switch to real 256 colors ...
Adrien Destugues
2008-11-19 22:04:32 +00:00
b49cbc3acfgrafx2 and gfxcfg now have a 32x32 icon while running. (gif image in install dir.) (win32): Added embedded icon for gfxcfg.exe. Only 32x32 version, because lazy.
Yves Rizoud
2008-11-18 22:53:28 +00:00
6e7fa8690cIcon: gfx2.ico now contains 2 more versions, re-pixelled in 16x16 and 48x48 (win32): When compiled, the icon is embedded in executable.
Yves Rizoud
2008-11-18 20:39:34 +00:00
54ca84e094Text: Implemented Bold and Italic, redid the screen layout. GUI: Generalized the system that right-clicking an input area empties it while entering edit mode, since it was indeed a very good idea, it saves a lot of time once you do it intuitively. (Esc still cancels and restores) Added a bitmap font, GrafX2_Classic.gif. Helpful for prototyping GUI screens.
Yves Rizoud
2008-11-17 23:44:19 +00:00
3c06848a8fEnabled OTF fonts for all platforms (tested OK on Windows)
Yves Rizoud
2008-11-16 17:52:59 +00:00
1a44350060Fixes missing refresh when grabbing a brush with RMB (issue 50)
Yves Rizoud
2008-11-16 17:20:45 +00:00
415b878844- Added support for Mac OSX system fonts in texte.c. - Inverted the "AntiAlias" and "No AA" labels so it's more intuitive that way.
Franck Charlet
2008-11-16 00:50:14 +00:00
9f8381593aFonts are now sorted (bitmaps before TrueType, then alphabetically). Duplicate fonts (already same path+filename) are skipped. Font selector allows pageup and pagedown. Windows fonts directory is now determined by WINDIR environment variable
Yves Rizoud
2008-11-16 00:26:50 +00:00
a60b2bfd01Some more work on HLS colors. Broken...
Adrien Destugues
2008-11-15 22:43:12 +00:00
48979bf251Fixed the last bug remaining in the gradiation rectangle. Again caused by loss of precision by not using floats :)
Adrien Destugues
2008-11-15 18:33:27 +00:00
c4f6cf7762Changed a lot of platform-specific code to "simplify" it: A Unix-like system is now considered the default. The number of platform-specific blocks is down to: win32: 13, watcomc: 3, linux: 4, macosx: 16, amigaos4: 8, beos/haiku: 1 Removed linux.c, implemented the relevant functions for all platforms. (win32) In Stats screen, included free memory report (macosx) Conversion_ANSI: Fixed the __macosx__ with wrong case from my former 'fix', sorry. (macosx) readline.c : Removed a manual "Update_necessaire=1", because normally all calls to UpdateRect() will set this flag already. Don't hesitate to call Flush_Update() anywhere where it's lacking, but you shouldn't put it inside a #ifdef __macosx__ (win32) Packaging: 'make ziprelease' now includes libpng13.dll and zlib1.dll (win32) Hacked something to resolve naming conflict of MOD_SHIFT constants with windows.h (all) Resolution: Fixed the black space that appeared between button and label, the memory overwrite also caused resolutions above number 2 to disappear from list.
Yves Rizoud
2008-11-15 16:25:37 +00:00
b511ceafdbSlightly modified the operation hadling of the gradiation rectangle to avoid erasing the rectangle footprint while drawing the vector.
Adrien Destugues
2008-11-15 15:53:42 +00:00
a6774e5d73Fixed the remaining bugs from r339. Now we have a fully working gradiation rectangle system !
Adrien Destugues
2008-11-15 15:35:02 +00:00
d016b8ba48Some tweaks and fixups to the gradiation rectangles. Clipping and zoom mode work better, but : -I introduced some weird bug making lines appear on the screen when drawing outside the limits of the zoom in zoom mode. Seems there is a XOR line function that get called with negative coordinates -The preview rectangle is drawn with XOR-lines on the screen and does not modify the picture. So it is possible to erase it in the zoom screen by moving the cursor around it. -Maybe I missed some testcases, i did not manage to reproduce the problem trigerred by grid clipping, for one. -The gradiation vector is horizontal when it should be inclined. I probably missed something when writing the code for it. Probably a division gets out of precision... i should check if i used floats where needed
Adrien Destugues
2008-11-13 21:56:03 +00:00
14536f17d1whoops... memory leak... always red the manpages :)
Adrien Destugues
2008-11-13 20:23:58 +00:00
d5143b5f82Implemented font listing under linux in a quite hacky way. The directory list returned by XGetFontPath is not really usable, there are some path with appended :unscaled for non-ttf fonts, so i needed to add some null-pointer check to for_each_file after the opendir to avoid a crash. I think most of my ttf fonts gets listed, but at a quick glance i find some duplicates and the list is not alphabetically sorted. That would be a great improvement (sort and remove duplicates). Also renamed Mask to Mask_table because XLib.h already defines some var called Mask.
Adrien Destugues
2008-11-13 20:20:47 +00:00
038303721cFix long filenames, and cursor keys while editing text
Yves Rizoud
2008-11-12 23:39:05 +00:00
bf7e4a53ddWe are now officially running under BeOS !
Adrien Destugues
2008-11-12 21:21:26 +00:00
1b183d5861- Added handling for right mouse button when entering filenames input array (clears it) also using escape key restores old filename. - Clicking the button with default filename in an empty directory wouldn't work.
Franck Charlet
2008-11-12 13:30:22 +00:00
f5d45ade8e- Issue 51 should be fixed. - Patched 2 segfaults in Save_PKM() which were due to the packing routine accessing a byte of a picture beyond the allocated memory block.
Franck Charlet
2008-11-12 12:55:54 +00:00
02bdbd4627- Fixed the display of the current directory size by casting uint64_t for the multiplication (should work for linux too i guess). - Fixed the macosx xcode project. - More aspect ratios added.
Franck Charlet
2008-11-10 17:51:01 +00:00
3e04f68127FIX screen refresh with large brushes and in zoomed mode
Yves Rizoud
2008-11-08 20:54:00 +00:00
83bfd14393Text: Help screen (F1), and font detection by file extension (unknown files are ignored)
Yves Rizoud
2008-11-06 23:37:24 +00:00
746b000d06small fix to the beos/haiku compile options. still crash ...
Adrien Destugues
2008-11-06 16:31:20 +00:00
863f5111f0Text: You can now type long lines (250car).
Yves Rizoud
2008-11-05 23:59:05 +00:00
29dae934f1Text: tweaked and debugged the screen, Up/Down/Home/End allow easily changing the font
Yves Rizoud
2008-11-05 23:22:33 +00:00
3422eeff46Patch from begasus to allow building under haiku and beos. The program is crashing when you launch it (segmentation violation). I'm not sure the way to get the program directory we use is ok for beos, but the official way of doing that is using C++ code. Maybe it's time to switch to some more unix way to store the config files...
Adrien Destugues
2008-11-05 18:59:55 +00:00