├── .gitignore ├── CHANGELOG.md ├── COPYING ├── README.md ├── architecture.markdown ├── build-windows.sh ├── data ├── default.gpl ├── examples │ ├── cairo_triptych.png │ ├── dave.gif │ ├── mad_hedgehog.gif │ └── penguin.png ├── help.html └── icons │ ├── brush1.xpm │ ├── brush2.xpm │ ├── brush3.xpm │ ├── brush4.xpm │ ├── brushcustom.png │ ├── brushpickuptool.png │ ├── circletool.png │ ├── cursor_crosshair.png │ ├── cursor_eyedropper.png │ ├── eyedroppertool.png │ ├── filledcircletool.png │ ├── filledrecttool.png │ ├── filltool.png │ ├── linetool.png │ ├── magnify.png │ ├── penciltool.png │ └── recttool.png ├── icon_128x128.png ├── meson.build ├── packaging ├── README.md ├── evilpixie.desktop └── icons │ ├── evilpixie128.png │ └── evilpixie48.png ├── resources.qrc ├── src ├── app.cpp ├── app.h ├── blit.cpp ├── blit.h ├── blit_keyed.cpp ├── blit_keyed.h ├── blit_matte.cpp ├── blit_matte.h ├── blit_range.cpp ├── blit_range.h ├── blit_zoom.cpp ├── blit_zoom.h ├── box.cpp ├── box.h ├── brush.cpp ├── brush.h ├── cmd.cpp ├── cmd.h ├── cmd_changefmt.cpp ├── cmd_changefmt.h ├── cmd_remap.cpp ├── cmd_remap.h ├── colours.cpp ├── colours.h ├── config.h.in ├── draw.cpp ├── draw.h ├── editor.cpp ├── editor.h ├── editview.cpp ├── editview.h ├── exception.cpp ├── exception.h ├── file_load.cpp ├── file_load.h ├── file_save.cpp ├── file_save.h ├── file_type.cpp ├── file_type.h ├── global.h ├── img.cpp ├── img.h ├── img_convert.cpp ├── img_convert.h ├── layer.cpp ├── layer.h ├── lexer.cpp ├── lexer.h ├── macpaths.m ├── mousestyle.h ├── palette.cpp ├── palette.h ├── palettesupport.cpp ├── point.h ├── project.cpp ├── project.h ├── projectlistener.h ├── qt │ ├── changefmtdialog.cpp │ ├── changefmtdialog.h │ ├── editorwindow.cpp │ ├── editorwindow.h │ ├── editviewwidget.cpp │ ├── editviewwidget.h │ ├── griddialog.cpp │ ├── griddialog.h │ ├── guistuff.cpp │ ├── guistuff.h │ ├── hsvwidget.cpp │ ├── hsvwidget.h │ ├── layerswidget.cpp │ ├── layerswidget.h │ ├── main.cpp │ ├── miscwindows.cpp │ ├── miscwindows.h │ ├── newprojectdialog.cpp │ ├── newprojectdialog.h │ ├── paletteeditor.cpp │ ├── paletteeditor.h │ ├── palettewidget.cpp │ ├── palettewidget.h │ ├── qtapp.cpp │ ├── qtapp.h │ ├── rangeswidget.cpp │ ├── rangeswidget.h │ ├── resizeprojectdialog.cpp │ ├── resizeprojectdialog.h │ ├── rgbpickerwidget.cpp │ ├── rgbpickerwidget.h │ ├── rgbwidget.cpp │ ├── rgbwidget.h │ ├── spritesheetdialogs.cpp │ └── spritesheetdialogs.h ├── quantise.cpp ├── quantise.h ├── ranges.cpp ├── ranges.h ├── scale2x.cpp ├── scale2x.h ├── sheet.cpp ├── sheet.h ├── test │ └── colours_test.cpp ├── tool.cpp ├── tool.h ├── util.cpp ├── util.h └── version.h ├── todo.txt └── win32 ├── build.sh ├── evilpixie.ico └── evilpixie.rc /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | /moc_*.cpp 3 | /evilpixie 4 | /Makefile 5 | *.swp 6 | tags 7 | *.exe 8 | *.dll 9 | *~ 10 | *.pro.user 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## WIP 4 | 5 | - Use Qt 6 instead of Qt 5. 6 | - Add brush rotate-by-90-degrees-clockwise. 7 | - Colour quantising: preserve colour order within image if no colour reduction required. 8 | 9 | ## v0.3.1 (Dec 2022) 10 | 11 | - Fixed up .desktop file (fgaz) 12 | 13 | ## v0.3 (Dec 2022) - "Your in test" TCE Shanghai Gutter Edition 14 | 15 | - New panel to define colour ranges 16 | - New drawmode: range 17 | - Palette: show little black/white triangles on currently-selected colours. 18 | - Change image format (with colour quantisation if needed) 19 | - Brush scale2x 20 | - Option to change grid settings. 21 | - Palette editor improvements 22 | - Add hex widget (#rrggbb) 23 | - Add HSV sliders 24 | - Improved "spread" function using HSV 25 | - drag & drop colours (internally, and between other apps) 26 | - Magnify view ('m' to split screen) 27 | - "Use brush palette"/"load palette" now offer to remap image to new colours. 28 | - Add "Remap Brush", to remap brush into current image palette. 29 | - Bugfix: don't crash when using brushes with different palette size. 30 | - Switch build system from cmake to meson 31 | - add icons/.desktop files to linux install 32 | - Fix next/prev pen shortcut keys ('[' and ']'). 33 | - Sync colour picking between palette editor and main editor window. 34 | - Stash spritesheet info in PNG metadata to ease reloading 35 | - Stash grid settings in PNG metadata 36 | - Add spare 'scratch' frame (toggle with 'j' key). 37 | - Add "Save Palette". 38 | 39 | ## v0.2.1 (Jan 2021) 40 | 41 | - Fix build error with Qt 5.15+ 42 | 43 | ## v0.2 (March 2017) 44 | 45 | - Support for 24 bit images and alpha (RGB and RGBA) 46 | - Can now undo drawing which spans multiple animation frames 47 | - Palette modifications are now undoable 48 | - Convert anim to/from spritesheet 49 | - Palette colours can now have transparency 50 | - Add "colour" drawmode - brush paints with current pen 51 | - Update from Qt4 to Qt5 (thanks, caiwan!) 52 | - Add support for loading IFF anim5 animations 53 | - Allow dragging files onto window to open them 54 | - File dialogs now default to user home directory 55 | - Reduced file format support (just png,bmp,gif,pcx,iff for now). 56 | - Mac and Windows builds (App bundle & .msi respectively) 57 | 58 | 59 | ## v0.1 (May 2011) 60 | 61 | - first release. Paletted images only. 62 | 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EvilPixie 2 | 3 | Homepage: 4 | 5 | ## Overview 6 | 7 | A pixel-oriented paint program. If you ever used Deluxe Paint, this should 8 | be familiar :-) 9 | 10 | 11 | ## Requirements 12 | 13 | Depends upon: 14 | 15 | - Qt 6 16 | - [libimpy](http://github.com/bcampbell/impy) 17 | - libpng 18 | - giflib (version 5) 19 | - libjpeg 20 | 21 | For Debian/Unbuntu, this means something like: 22 | ``` 23 | $ sudo apt install qt6-base-dev qt6-tools-dev libjpeg-dev libpng-dev libgif-dev 24 | ``` 25 | 26 | ## Building from source 27 | 28 | Under Linux, Mac and Windows (under msys2): 29 | 30 | $ git clone https://github.com/bcampbell/evilpixie.git 31 | $ cd evilpixie 32 | $ meson setup --buildtype release build 33 | $ meson compile -C build 34 | 35 | Under Linux, you can then install it with: 36 | 37 | $ meson install -C build 38 | 39 | By default the install prefix is /usr/local, but you can specify a different install location during setup: 40 | 41 | $meson setup --prefix /tmp/epinstall build 42 | 43 | 44 | -------------------------------------------------------------------------------- /architecture.markdown: -------------------------------------------------------------------------------- 1 | # EvilPixie Architecture 2 | 3 | 4 | EvilPixie is split up into two layers: the core and the GUI. 5 | The GUI uses the core layer, but the core knows nothing about the GUI. 6 | 7 | 8 | ## Notable Core classes (below the GUI level) 9 | 10 | (note: this isn't 100% accurate currently, but it's what I'm aiming for ;-) 11 | 12 | ### Project 13 | 14 | The core store of data. 15 | ProjectListeners can be registered with the project. 16 | The project can be directly modified, but the thing doing the modifying 17 | needs to call appropriate notification functions to let any listeners know 18 | what has been changed (to keep the display up to date, for example). 19 | Usually, all project modifications are performed within a Cmd class 20 | (see below). These are held by the Editor on the undo stack to implement 21 | undo/redo. 22 | 23 | ### ProjectListener 24 | 25 | An interface for concrete listeners to derive from. 26 | Defines functions which are called when the project is 27 | modified (eg drawing, palette changes, frame insertion/deletion...) 28 | 29 | ### Editor 30 | 31 | The editor coordinates the user interaction with a project. 32 | It has an undo stack which holds Cmds. 33 | It keeps track of the grid and other settings. 34 | 35 | The Editor can have multiple views. 36 | 37 | ### EditView 38 | 39 | An editview is a viewport upon the project. 40 | 41 | The offset and zoom level can be modified. 42 | 43 | It handles some of the user interaction - drawing in particular - 44 | coordinating with the Editor and using Tools. 45 | 46 | ### Cmd 47 | 48 | A Cmd encapsulates a reversable operation upon a Project. 49 | 50 | The base Cmd class defines Do() and Undo() methods which 51 | must be implemented. 52 | 53 | A Cmd should be used for any Undoable operation the user might 54 | want to perform upon a project - drawing, resizing, adding/removing 55 | frames, editing palettes... 56 | 57 | Cmd-based classes are usually the only ones which actually modify the 58 | Project data. 59 | 60 | ### Tool 61 | 62 | Tools are owned by the editor and handle interactive operations 63 | upon a project. 64 | 65 | They are responsible for drawing visual feedback to the editview 66 | (eg rubber-banding). 67 | 68 | Some tools (eg PencilTool) generate Cmds and apply them to 69 | the project. 70 | 71 | Other tools fetch information for the Editor (eg EyeDropperTool). 72 | 73 | -------------------------------------------------------------------------------- /build-windows.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Script to build and package evilpixie on windows with MSYS2 MinGW x64. 4 | 5 | set -e 6 | 7 | # First, compile it. 8 | 9 | BUILD=$(mktemp -d) 10 | meson setup --buildtype release ${BUILD} 11 | meson compile -C ${BUILD} 12 | 13 | # Now package it into a dir. 14 | 15 | VER=$(grep VERSION_STRING src/version.h | grep -o "[0-9.]*") 16 | 17 | PACKAGE=$(mktemp -d)/evilpixie-${VER} 18 | mkdir -p ${PACKAGE} 19 | 20 | cp -r data ${PACKAGE}/ 21 | cp ${BUILD}/evilpixie.exe ${PACKAGE} 22 | 23 | echo "run windeployqt to copy in DLLs and Qt gubbins..." 24 | windeployqt.exe --compiler-runtime --no-translations ${PACKAGE}/evilpixie.exe 25 | 26 | echo "copy in extra DLLs missed by windeployqt..." 27 | for l in `ldd ${PACKAGE}/evilpixie.exe | grep -vi WINDOWS | awk '{print $3}'`; do cp -n $l ${PACKAGE}; done 28 | 29 | echo "Build successful: ${PACKAGE}" 30 | 31 | -------------------------------------------------------------------------------- /data/default.gpl: -------------------------------------------------------------------------------- 1 | GIMP Palette 2 | Name: evilpixie_default 3 | Columns: 16 4 | # 5 | 0 0 0 Index 0 6 | 160 160 160 Index 1 7 | 224 0 0 Index 2 8 | 160 0 0 Index 3 9 | 208 128 0 Index 4 10 | 240 224 0 Index 5 11 | 128 240 0 Index 6 12 | 0 128 0 Index 7 13 | 0 176 96 Index 8 14 | 0 208 208 Index 9 15 | 0 160 240 Index 10 16 | 0 112 192 Index 11 17 | 0 0 240 Index 12 18 | 112 0 240 Index 13 19 | 192 0 224 Index 14 20 | 192 0 128 Index 15 21 | 96 32 0 Index 16 22 | 224 80 32 Index 17 23 | 160 80 32 Index 18 24 | 240 192 160 Index 19 25 | 48 48 48 Index 20 26 | 64 64 64 Index 21 27 | 80 80 80 Index 22 28 | 96 96 96 Index 23 29 | 112 112 112 Index 24 30 | 128 128 128 Index 25 31 | 144 144 144 Index 26 32 | 160 160 160 Index 27 33 | 192 192 192 Index 28 34 | 208 208 208 Index 29 35 | 224 224 224 Index 30 36 | 240 240 240 Index 31 37 | -------------------------------------------------------------------------------- /data/examples/cairo_triptych.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bcampbell/evilpixie/a031491d1e014d01ee5ef4e8cabdcf49a49aa646/data/examples/cairo_triptych.png -------------------------------------------------------------------------------- /data/examples/dave.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bcampbell/evilpixie/a031491d1e014d01ee5ef4e8cabdcf49a49aa646/data/examples/dave.gif -------------------------------------------------------------------------------- /data/examples/mad_hedgehog.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bcampbell/evilpixie/a031491d1e014d01ee5ef4e8cabdcf49a49aa646/data/examples/mad_hedgehog.gif -------------------------------------------------------------------------------- /data/examples/penguin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bcampbell/evilpixie/a031491d1e014d01ee5ef4e8cabdcf49a49aa646/data/examples/penguin.png -------------------------------------------------------------------------------- /data/help.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |