1851 Commits

Author SHA1 Message Date
Adrien Destugues
8ce30de525 Add 32 null bytes at end of PI1 files to make ST Deluxe Paint happy (reported by tobe)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@361 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-25 18:58:50 +00:00
Yves Rizoud
436e3f15fd Help screens show the keyboard shortcuts from current configuration
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@359 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-24 00:07:49 +00:00
Yves Rizoud
a723537d94 Fix incomplete display of brush at screen edges in zoom mode (issue 53
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@358 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-23 16:54:18 +00:00
Yves Rizoud
d71d7d701d Fixed 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)


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@357 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-22 00:56:21 +00:00
Adrien Destugues
fc0bd94113 Fixed 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 ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@356 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-19 22:04:32 +00:00
Yves Rizoud
b49cbc3acf grafx2 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.

Tested on Win98 and Linux.



git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@355 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-18 22:53:28 +00:00
Yves Rizoud
6e7fa8690c Icon: gfx2.ico now contains 2 more versions, re-pixelled in 16x16 and 48x48
(win32): When compiled, the icon is embedded in executable.

Tested on win98 and linux.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@354 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-18 20:39:34 +00:00
Yves Rizoud
54ca84e094 Text: 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.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@353 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-17 23:44:19 +00:00
Yves Rizoud
3c06848a8f Enabled OTF fonts for all platforms (tested OK on Windows)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@351 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-16 17:52:59 +00:00
Yves Rizoud
1a44350060 Fixes missing refresh when grabbing a brush with RMB (issue 50)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@350 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-16 17:20:45 +00:00
Franck Charlet
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.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@349 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-16 00:50:14 +00:00
Yves Rizoud
9f8381593a Fonts 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


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@348 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-16 00:26:50 +00:00
Adrien Destugues
a60b2bfd01 Some more work on HLS colors. Broken...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@347 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 22:43:12 +00:00
Adrien Destugues
48979bf251 Fixed the last bug remaining in the gradiation rectangle. Again caused by loss of precision by not using floats :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@346 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 18:33:27 +00:00
Yves Rizoud
c4f6cf7762 Changed 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.
 
Tested fine on Linux (without TTF) and Windows


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@345 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 16:25:37 +00:00
Adrien Destugues
b511ceafdb Slightly modified the operation hadling of the gradiation rectangle to avoid erasing the rectangle footprint while drawing the vector.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@344 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 15:53:42 +00:00
Adrien Destugues
a6774e5d73 Fixed the remaining bugs from r339. Now we have a fully working gradiation rectangle system !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@343 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-15 15:35:02 +00:00
Adrien Destugues
d016b8ba48 Some 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


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@339 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 21:56:03 +00:00
Adrien Destugues
14536f17d1 whoops... memory leak... always red the manpages :)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@338 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 20:23:58 +00:00
Adrien Destugues
d5143b5f82 Implemented 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.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@337 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-13 20:20:47 +00:00
Yves Rizoud
038303721c Fix long filenames, and cursor keys while editing text
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@336 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 23:39:05 +00:00
Adrien Destugues
bf7e4a53dd We are now officially running under BeOS !
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@335 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 21:21:26 +00:00
Franck Charlet
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.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@334 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 13:30:22 +00:00
Franck Charlet
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.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@333 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-12 12:55:54 +00:00
Franck Charlet
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.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@332 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-10 17:51:01 +00:00
Yves Rizoud
3e04f68127 FIX screen refresh with large brushes and in zoomed mode
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@330 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-08 20:54:00 +00:00
Yves Rizoud
83bfd14393 Text: Help screen (F1), and font detection by file extension (unknown files are ignored)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@329 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 23:37:24 +00:00
Adrien Destugues
746b000d06 small fix to the beos/haiku compile options. still crash ...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@328 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-06 16:31:20 +00:00
Yves Rizoud
863f5111f0 Text: You can now type long lines (250car).
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@327 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 23:59:05 +00:00
Yves Rizoud
29dae934f1 Text: tweaked and debugged the screen, Up/Down/Home/End allow easily changing the font
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@326 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 23:22:33 +00:00
Adrien Destugues
3422eeff46 Patch 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...

This should also fix watcom build (very untested as i'm using mingw to cross compile windows builds now)
Also added begasus to the credits screen.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@325 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-05 18:59:55 +00:00
Yves Rizoud
b11d9e3ff9 Fix tiny compilation problem with mingw-gcc 3.4.2, and standardized tabs
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@324 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 22:42:48 +00:00
Adrien Destugues
8dd0113697 Fixed the key release handling. Avoid to mess with global variables... or the shortcut keys will trigger the actions twice (both when pressed and released)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@323 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 17:03:30 +00:00
Adrien Destugues
2e163fb5af Fixed drawing with the keyboard. Space key release wasn't taken into account. Now you can plot a single pixel.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@322 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-03 15:59:18 +00:00
Yves Rizoud
c5a3b7b3c8 Text tool: now has a preview.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@321 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-02 20:33:36 +00:00
Yves Rizoud
de2f95863d Text tool: corrected colors, various fixes.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@320 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-11-02 19:03:11 +00:00
Yves Rizoud
3b4149be49 Text: Fonts are scanned in fonts/ and Windows own directory
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@319 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-31 20:03:58 +00:00
Yves Rizoud
bd23cc6f76 Text with SFont, unfinished. Also merged in some Makefile tweaks by xeron
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@318 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-29 20:04:25 +00:00
Adrien Destugues
a6ab2465fc Fixed some warnings reported by gcc under linux.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@317 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-29 15:51:42 +00:00
Franck Charlet
af9e862b5d - Enabled the support for text in macosx version albeit it doesn't seem to do anything yet beside displaying a dialog window (updated the xcode project accordingly by installing SDL_ttf with the application).
.- Added a Backup() in Rectangle_Degrade_12_0() so the undo command should work.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@316 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 10:34:46 +00:00
Adrien Destugues
72c42b92ce fixed crash when drawing a vertical gradiation or a single-point (nonsense) gradiation.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@315 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 09:59:58 +00:00
Yves Rizoud
cc81845f7b work in progress on Text menu
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@314 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-28 00:02:48 +00:00
Yves Rizoud
3fb9a91c8f Fixed a memory leak on each directory scan
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@313 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:35:41 +00:00
Yves Rizoud
b49fde7015 OS4, OSX: Centralized the part which determined which directory contains the program's files.
Owners of these platforms, please check if I did it ok. It should crash spectacularly on program init or shutdown if I messed up.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@312 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:27:05 +00:00
Yves Rizoud
392f5f13d0 (AmigaOS4) Volume list implemented, courtesy of xeron.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@311 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 18:02:36 +00:00
Adrien Destugues
d72897e93d Some more fixes for the gradiation rectangles. The position is now calculated in an int, you should not experience any problem with the circle limit.
Also fixed the operation handling. The rectangle is now drawn properly when you finish sizing it.
The vector line still leaves some artifact on screen, however...


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@310 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-27 09:02:33 +00:00
Yves Rizoud
cf54d4a460 Load/Save: "Select Drive" button. Allows a way for the AmigaOS4 version to display the list of drives / volume names.
Peter, you can plug in Lire_liste_des_lecteurs(void) to enumerate the drives.

Additionally, if you want to display drive icons as well, you have a spot in
Rechercher_drives(void) :
For each drive, call Ajouter_lecteur(car, icon, string);
* car is the displayed character
* string is the drive name "df0:", "mypictures:" etc. (string will be copied)
* icon is one of :
    LECTEUR_FLOPPY_3_5
    LECTEUR_FLOPPY_5_25
    LECTEUR_HDD
    LECTEUR_CDROM
    LECTEUR_NETWORK


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@309 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 18:20:31 +00:00
Yves Rizoud
aeda49b9bb Stats screen: report if TTF is enabled
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@308 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 13:35:28 +00:00
Yves Rizoud
c28a01522a (linux) Makefile: fixed dependencies checking
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@307 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-25 13:15:26 +00:00
Yves Rizoud
f2b551a3da Makefile: version.o in right directory now, ziprelease now adds -nottf to
archive names if TrueType support was disabled. Otherwise, the 435Kb DLLs are 
included in the win32 archive. The sample font is archived, too.

TODO: texte.c should expose a public function that reports if texte.o was
compiled with TTF off. This way, the stats screen can display the information.


git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@306 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2008-10-23 23:10:59 +00:00