Commit Graph

3661 Commits

Author SHA1 Message Date
David Capello
78daffba73 Fix shading mode on RGB mode when index 0 is involved (fix #794)
As now the RgbMap is generated correctly depending on the current layer
(if it’s opaque or transparent), we’ve fixed
LockAlpha/Transparent/Merge/Blur/Replace/JumbleInkProcessing for
Indexed images with a background layer, when a transparent layer is the
active one, and when a non-mask index has same RGB values than the mask
index.
2015-11-04 10:33:23 -03:00
ripesunflower
d96c7bff45 Move var to beginnig of scope
I get error without it in VS2013
2015-11-04 09:55:10 +03:00
David Capello
05249dc191 Fix crash closing the window when it's on fullscreen mode on OS X 2015-11-03 16:14:05 -03:00
David Capello
8c781ecd57 Fix crashes switching between fullscreen/windowed mode on OS X 2015-11-03 16:13:45 -03:00
David Capello
2123ecb511 Fix crash calling selectTabInternal() with tab=nullptr 2015-11-03 16:12:13 -03:00
David Capello
91af58dbb0 Don't overwrite clipboard content on Edit > Insert Text (fix #839) 2015-11-02 17:47:56 -03:00
David Capello
9225420eba Minor change in floodfill.h/cpp 2015-11-02 16:45:09 -03:00
David Capello
08a04fcb64 Fix symmetry mode when cel origin != sprite origin (0,0)
Change ToolLoop::getOffset() to getCelOrigin()
2015-11-02 16:44:17 -03:00
David Capello
c12cb26875 Fix filter preview when zoom level < 100% 2015-10-30 17:58:47 -03:00
David Capello
3c97f08e4e Fix symmetry axis position on Editor when tiled mode is enabled 2015-10-29 17:11:23 -03:00
David Capello
ef7defdf72 Minor format change in intertwiners.h 2015-10-29 17:02:11 -03:00
David Capello
f4373ffbc5 Apply symmetry at the doPointshapePoint() level
This fixes the pixel-perfect mode (when symmetry is enabled) as it
expects only one joinPoints() call.
2015-10-29 17:01:43 -03:00
David Capello
e9bfa5168c Remove IntertwineAsPixelPerfect::PPData struct 2015-10-29 16:26:52 -03:00
David Capello
d75ac238e4 Reduce dirty area when symmetry mode is enabled 2015-10-29 16:24:20 -03:00
David Capello
24306589f0 Fix comparison between signed/unsigned ints 2015-10-29 16:22:03 -03:00
David Capello
76bbb53c15 Fix warning about unused local variable 2015-10-29 16:18:51 -03:00
David Capello
e5397d9ad3 Don't show symmetry controls on tools like eyedropper/move/zoom 2015-10-29 12:52:22 -03:00
David Capello
30462637de Merge branch 'issue_#838' of https://github.com/Fojar/aseprite into fix-spray-tool 2015-10-29 09:54:00 -03:00
David Capello
a3deb2063e Add MovingSymmetryState to modify symmetry axis position 2015-10-28 20:00:18 -03:00
David Capello
7c8876dd65 Remove reference to V8 in README.md 2015-10-28 19:45:01 -03:00
Aravin
5c451d2cfd Spray tool now works with small widths and speeds. (fix #838) 2015-10-28 12:13:14 -04:00
David Capello
41f4fcf802 Fix compilation problem using size_t on clang 3.4 and gcc 4.8 2015-10-26 18:36:57 -03:00
David Capello
56854cdb9f Add symmetry mode (fix #208)
This is a first iteration of the feature, it doesn’t have handles to
move the symmetry line and it only contains two symmetry modes:
horizontal or vertical.

As an extra change, we have added the new Stroke type to wrap a vector
of gfx::Points and simplify some existing code in the ToolLoop.
2015-10-26 17:51:32 -03:00
David Capello
2eada35a38 Add "Undo History" command (fix #739)
Added member functions to undo::UndoHistory and
app::DocumentUndo to iterate all states of the undo history.
Also we’ve added app::DocumentUndoObserver to see when new states
are added in the undo history.
2015-10-20 11:27:05 -03:00
David Capello
05b70d2538 Make verbose_log() print on stdout when _DEBUG is enabled 2015-10-20 10:46:15 -03:00
David Capello
76e7d15484 Avoid warning about unused variable on non-OSX platforms 2015-10-19 16:41:41 -03:00
David Capello
3dce633bf6 Remove unused variable 2015-10-19 16:41:25 -03:00
David Capello
3d76639141 Add support to load system fonts on Ubuntu in PasteTextCommand 2015-10-19 16:41:14 -03:00
David Capello
62a16d0525 Improve font selection with keyboard in PasteTextCommand 2015-10-19 15:32:44 -03:00
David Capello
02ef2268fe Remove unnecessary filtering of key events in PopupWindow
In this way Tab key (and other focus movement keys) can be used
in PopupWindows. They aren’t propagated to the main window because
a correct filter was added in 883629b563
2015-10-19 15:31:34 -03:00
David Capello
caf8388ac6 Fix crash resizing the window when we restart the app on OS X and it was closed on fullscreen size 2015-10-19 11:32:33 -03:00
David Capello
6e15553c88 Fix crash when window title is changed on OS X and fullscreen is enabled (fix #833) 2015-10-19 09:26:29 -03:00
David Capello
ec5a6fc8b3 Show font name and text preview on each FontItem 2015-10-16 18:52:52 -03:00
David Capello
2a09990b16 Make viewport bigger when we load a new font on FontPopup 2015-10-16 18:51:35 -03:00
David Capello
fcf3d77be9 Limit font size to 999 2015-10-16 18:40:18 -03:00
David Capello
5e239a0768 Add support for multiple font paths 2015-10-16 18:39:56 -03:00
David Capello
60f0c5bcf7 Avoid warning on clang using side-effect function inside typeid() 2015-10-16 18:39:34 -03:00
David Capello
21a642285d Add folder for system fonts in OS X 2015-10-15 18:33:13 -03:00
David Capello
241aba6370 Don't ref a temporary object 2015-10-15 18:32:55 -03:00
David Capello
7bf6404b85 Add missing <stdexcept> to use std::runtime_error 2015-10-15 18:32:32 -03:00
David Capello
9f8200ea3e Add list of system fonts in PasteTextCommand dialog (on Windows) 2015-10-15 18:16:16 -03:00
David Capello
74c2ce83dc Simplify update_mouse_cursor() code 2015-10-14 19:36:46 -03:00
David Capello
8cba37e36b Return false if the native cursor cannot be change on SkiaWindow::setNativeMouseCursor 2015-10-14 19:31:38 -03:00
David Capello
0900019b1e Minor change in Widget::scrollRegion() to avoid an extra Region::offset() 2015-10-14 18:41:56 -03:00
David Capello
fe6d2f3db0 Minor change in move_region.cpp 2015-10-14 18:39:07 -03:00
David Capello
a16c5b9846 Fix floating tab overlay for Tabs widget on Skia backend 2015-10-14 18:38:53 -03:00
David Capello
ae1861236e Use key modifiers from NSEvents in Skia/OSX 2015-10-14 17:06:23 -03:00
David Capello
bd1a1ffafb Add support to transport key modifiers from she events to UI messages
It’s better if we use the original key modifiers from she::Events (given
by Cocoa or Win32 APIs) instead of asking for the current state of
the modifier when the ui::Message is created (which can be different
from the original value).

This commit adds support to transport the modifiers, but it is not
using the original key modifiers yet.
2015-10-14 16:42:49 -03:00
David Capello
ba194a817f Fix Alt+char on Skia/OSX 2015-10-14 15:53:47 -03:00
David Capello
7e7d3b9dc8 Disable GPU acceleration on Skia/OSX 2015-10-14 13:35:26 -03:00
David Capello
2e5f051e7d Catch exceptions if GL context cannot be created on Skia/OSX 2015-10-14 13:32:15 -03:00
David Capello
11401e9899 Resize NSView with multiples of 4
With this we should avoid seeing scaled pixels on screen with (e.g.) 3
pixels instead of 2 when Screen Scaling = 200%.
2015-10-14 13:11:08 -03:00
David Capello
9e90061e37 Fix first native cursor hiding on Skia backend 2015-10-14 12:44:37 -03:00
David Capello
ee7df1f973 Impl SkiaWindow::setNativeMouseCursor() on Skia/OSX 2015-10-14 12:30:48 -03:00
David Capello
d7d0eeec7f Fix SkiaWindow::updateWindow() on Skia/OSX 2015-10-14 12:00:50 -03:00
David Capello
d5c5c2e1f9 Remove commented line 2015-10-14 12:00:03 -03:00
David Capello
f9d0254d91 Initialize windows with width/height/scale args on Skia port 2015-10-14 10:25:24 -03:00
David Capello
66c5e04a58 Impl OSXWindow::setMousePosition on Skia/OSX port 2015-10-14 09:29:14 -03:00
David Capello
2fe612fd00 Add precise trackpad support on Skia/OSX port 2015-10-14 09:27:20 -03:00
David Capello
47f493df78 Fix window resize on Skia/OSX 2015-10-13 18:49:56 -03:00
David Capello
0a1f492c24 Implement SkiaSurface::setDrawMode() 2015-10-13 18:44:31 -03:00
David Capello
b8f5a0236c Add she::is_key_pressed() impl on Skia/OSX port 2015-10-13 17:12:51 -03:00
David Capello
0508b6fd67 Avoid beeps on keyDown/Up on Skia/OSX port 2015-10-13 17:11:45 -03:00
David Capello
d4e37218e2 Show errors on stderr on Skia port 2015-10-13 17:11:23 -03:00
David Capello
07900c8e48 Enable line that doesn't crash anymore on newer version of Skia 2015-10-13 17:10:59 -03:00
David Capello
4379c6793e Minor changes to Skia/OSX #includes 2015-10-13 16:55:29 -03:00
David Capello
15f4a16294 Add support for right and middle click on Skia/OSX port 2015-10-13 16:02:18 -03:00
David Capello
f818dbc692 Add keyDown/keyUp events to Skia/OSX port 2015-10-13 15:50:25 -03:00
David Capello
9ef3e1e134 Add --list-tags and --list-layers options
Related to #807
2015-10-13 13:23:45 -03:00
David Capello
615e369cc4 Fix closing multiple tabs with middle-click without moving mouse (fix #826) 2015-10-13 12:13:13 -03:00
David Capello
8c97bb1ffa Fix loading gray color (fix #828) 2015-10-13 11:48:08 -03:00
David Capello
250de2257c Complete clock_value() impl for Skia/OSX port w/msecs precision 2015-10-10 13:02:32 -03:00
David Capello
1d69edcced Fix to_skia(gfx::Color) impl 2015-10-10 12:15:40 -03:00
David Capello
7a00a0bfca Add missing #if/endif SK_SUPPORT_GPU 2015-10-09 19:48:31 -03:00
David Capello
324953b2fc Minor rename in skia_window_win.cpp 2015-10-09 19:48:07 -03:00
David Capello
247a8a7174 Make progress in Skia/OSX port
It includes:
- Use ARC instead of GC (compiling with -fobjc-arc flag)
- Implement GLContextCGL::getStencilBits/getSampleCount functions
- Modify OSXEventQueue to avoid creating a thread for app_main()
- NativeDialogs class can be compiled in 10.4 (with GC) and 10.6 (with
ARC)
- Split she/osx/view.h into view.h and view.mm
- get_local_mouse_pos() takes care of the window scale
- Temporal she::clock_value() impl
- Working SkiaWindow with Quartz and some progress with OpenGL
2015-10-09 19:45:39 -03:00
David Capello
f38fd4eb5e Refactor Skia/OSX port
- Moved OSXWindowDelegate to she/osx/window_delegate.h
- Renamed CloseDelegate to OSXWindowImpl
- Added m_ prefix to OSXWindow fields
2015-10-07 17:56:30 -03:00
David Capello
7bde73e2a3 Minor change in skia_window_osx.mm 2015-10-07 17:46:37 -03:00
David Capello
416951f592 Avoid crash when Cmd+Q is pressed on Skia/OSX port 2015-10-07 17:46:04 -03:00
David Capello
8edb0c0a67 Move OSXView to its own file
This new OSXView contains some basic mouse event handlers to generate
some she events.
2015-10-07 16:10:52 -03:00
David Capello
0db4c1c664 Add m_ prefix to OSXWindowDelegate fields 2015-10-07 16:07:14 -03:00
David Capello
6e5271848c Fix crash on resize on Skia/OSX port
Keep NSWindowDelegate reference alive in OSXWindow
2015-10-07 10:43:53 -03:00
David Capello
e3f0688945 Change GPU acceleration setting before the display scale 2015-10-06 17:13:50 -03:00
David Capello
165c7ccca4 Try to initialize the display with GPU acceleration and then without it 2015-10-06 17:04:03 -03:00
David Capello
f98c4df79a Rename SKIA_OPENGL_LIBRARY variable in src/she/CMakeLists.txt 2015-10-06 16:39:56 -03:00
David Capello
066a8dffcc Replace SkGLContext with our own GLContext class 2015-10-06 16:37:01 -03:00
David Capello
9e44818cd8 Move window size fields to OSXWindow 2015-10-06 11:18:21 -03:00
David Capello
580c900fb2 Add SkiaWindow::handle() impl on Skia/OSX port 2015-10-06 11:12:41 -03:00
David Capello
7118251f83 Create NSWindow in main thread/queue on Skia/OSX port
We cannot create/handle UI controls outside the main thread.
2015-10-06 10:57:56 -03:00
David Capello
69bb8fef9b Add flag to improve linking times when we use the Skia port 2015-10-05 21:19:11 -03:00
David Capello
03c0367827 Add option to disable GPU acceleration 2015-10-05 21:18:42 -03:00
David Capello
7434dd053a Avoid beep when Alt+char is pressed on Skia/Win port 2015-10-05 21:16:27 -03:00
David Capello
2bc6a76fd5 Minor change in she/CMakeLists.txt
This was done in case we need to use #include <GLES2/gl.2> in the future,
as this header file is in angle2 repository.
2015-10-05 17:42:07 -03:00
David Capello
9a8b7cd741 Fix UI rendering on Skia/Win port w/GPU when screen scaling >= 200%
If screen scaling is not 1:1, we create a SkSurface using a off-screen
texture, everything is painted there and then a blit to the screen
framebuffer is done in SkiaWindow::paintImpl()
2015-10-05 17:40:55 -03:00
David Capello
cc8b8cf52e Fix SkiaSurface::blitTo() with GPU and without GPU acceleration 2015-10-02 17:14:52 -03:00
David Capello
bb826c681b Add SkiaSurface::clear() impl 2015-10-02 17:13:49 -03:00
David Capello
6d1348c721 Fix SkiaSurface::drawRect() bounds 2015-10-02 16:24:58 -03:00
David Capello
7a747fc144 Add missing "override" to SkiaSurface::setDrawMode() 2015-10-02 12:12:57 -03:00
David Capello
e732297cfb Update Skia port to latest Skia version 2015-10-02 12:12:37 -03:00
David Capello
e8fde930bd Fix EventQueue::instance() for Skia port 2015-10-02 12:08:38 -03:00
David Capello
5033713430 Fix window resize on Skia/Win port 2015-10-02 11:24:04 -03:00
David Capello
311e90c58f Fix WinWindow::updateWindow() when m_scale > 1 2015-10-02 11:08:08 -03:00
David Capello
5d9b7475e0 Add missing #include files 2015-10-02 10:54:15 -03:00
David Capello
be9e0255b6 Fix bug painting Timeline cels in some special cases 2015-10-01 11:52:32 -03:00
David Capello
e4a71b9065 Show she::DisplayCreationException message when she::System::createDisplay() fails 2015-10-01 10:54:47 -03:00
David Capello
f54ba2c59d Fix Skia port to new SkiaDisplay::flip() impl 2015-09-30 19:58:30 -03:00
David Capello
4fbbd75599 Move Skia libraries as she library dependencies 2015-09-30 19:58:04 -03:00
David Capello
6210e0d85c Change she::Capabilities to a enum class 2015-09-30 16:45:04 -03:00
David Capello
460d4b47c9 Add missing "override" modifier on some member functions
These ones were detected by clang-700.0.72
2015-09-30 16:34:43 -03:00
David Capello
e2c0e0a435 Use "alpha" local variable 2015-09-30 16:31:23 -03:00
David Capello
4141adcd23 Avoid warning on Release build in cmd::SetPalette() ctor 2015-09-30 16:30:19 -03:00
David Capello
9c33f46859 Fix GifEncoder for indexed sprites which contain layers w/opacity < 255 2015-09-30 12:53:56 -03:00
David Capello
1c1a55b2d3 Don't reset mask color from doc::Image in Sprite Size and Rotate Sprite commands (fix #820) 2015-09-30 09:20:55 -03:00
David Capello
30b257a8f5 Fix Eraser tool to handle opacity values correctly 2015-09-30 08:59:59 -03:00
David Capello
3d4fdb62b4 Pass opacity value to Eraser, Blur, and Jumble tools 2015-09-30 08:59:32 -03:00
David Capello
1cb8a46e1c Rename PaintInk::Merge to PaintInk::Simple 2015-09-30 08:59:01 -03:00
David Capello
a824fcb5e1 Fix crash on Windows if gfx_directx_acknowledge_resize() fails 2015-09-29 13:58:12 -03:00
David Capello
24133498b0 Don't change WebP format options for each image loaded from a sequence 2015-09-29 12:07:45 -03:00
David Capello
a5bdf461f4 Use RAII helper to avoid calling WebPPictureFree for each return in WebPFormat::onSave() 2015-09-29 12:06:33 -03:00
David Capello
92c2596604 Remove filename from specific webp_format.cpp error messages
The filename is shown by the general encoder/decoder code.
2015-09-29 12:00:31 -03:00
David Capello
c30112ea10 Convert FileOp into a class 2015-09-29 11:27:00 -03:00
David Capello
ee0aae0e3c Replace SEQUENCE_IMAGE() macro with add_image() lambda in fop_operate() 2015-09-28 18:49:34 -03:00
David Capello
79cd0b258f Fix continuous change of Timeline scroll in playback when viewport is too small 2015-09-28 12:34:29 -03:00
David Capello
6550093f1f Minor change in Timeline::showCel() 2015-09-28 12:09:34 -03:00
David Capello
423bf990f9 Fix --border-padding option (fix #815) 2015-09-28 11:46:57 -03:00
David Capello
4ebefd3f13 Fix problem getting pixels in non-32bpp Allegro BITMAPs
Regression introduced in 5e3ba8237a
This changed was needed to load certain .png fonts correctly in the
SkinTheme.
2015-09-25 08:32:50 -03:00
David Capello
d5fea43972 Set as mask color the bg index specified in the GIF file 2015-09-24 23:51:58 -03:00
David Capello
732f527eb1 Remove invalid checks to avoid recalculating the new palette for each frame in GifDecoder 2015-09-24 23:51:31 -03:00
David Capello
dd87c2ef17 Add minor check (bg index != local mask) to avoid checking the whole image 2015-09-24 23:50:44 -03:00
David Capello
43881af1f2 Add comments and DLOG() calls in gif_format.cpp 2015-09-24 23:49:01 -03:00
David Capello
5a339f7f55 Put the local colormap entry in the palette if we need to remap m_bgIndex 2015-09-24 23:47:33 -03:00
David Capello
8db6693136 Add colormap2rgba() helper function in gif_format.cpp 2015-09-24 23:45:10 -03:00
David Capello
e47fa9f045 We don't need to give a RgbMap to convert from RGB -> Indexed 2015-09-24 23:42:51 -03:00
David Capello
3c219571b1 Don't change mask-index entry if it's out of the bound in PaletteOptimizer::calculate() 2015-09-24 23:39:36 -03:00
David Capello
1bb0bca361 doc and gfx libraries depends on fixmath (fix #817) 2015-09-24 10:02:52 -03:00
David Capello
0e07a01a9b Add a color picker in the Insert Text dialog 2015-09-23 17:45:07 -03:00
David Capello
1ac39ff85b Add simple "Edit > Insert Text" menu option (related to #28) 2015-09-23 17:38:45 -03:00
David Capello
ce96a77aae Add required flags to link the application with freetype2 library 2015-09-22 19:27:44 -03:00
David Capello
e15b9aca21 Remove some #includes directives 2015-09-22 17:32:42 -03:00
David Capello
d55017cd17 Use advanced_mode.xml.h in cmd_advanced_mode.cpp 2015-09-22 17:27:47 -03:00
David Capello
52d091810b Use the generated goto_frame.xml.h file in cmd_goto_frame.cpp 2015-09-22 17:25:48 -03:00
David Capello
63aac49f81 Fix #include in webp_format.cpp with new generated files for widgets 2015-09-22 17:08:07 -03:00
David Capello
4a94799d47 Use generated "sprite_size.xml.h" file in "cmd_sprite_size.cpp" 2015-09-22 17:01:36 -03:00
David Capello
e7e9f1d482 Change name of generated files from "generated_file.h" to "file.xml.h" 2015-09-22 16:33:49 -03:00
David Capello
a06e01ff7e Rename ui::Entry::EntryChange to ui::Entry::Change 2015-09-22 16:22:47 -03:00
David Capello
3dfd6de4f0 Fix saving/loading .gif files w/completely opaque images but with local transparent index
There are .gif files that specified a local transparent index
but the frame pixels don't use that index (i.e. the frame is completely
opaque anyway). The same happens when we use a transparent layer but the
transparent color is not used (i.e. the layer is completely opaque anyway).
With this patch we fix loading/saving correctly this kind of files/sprites.

Fix #800
2015-09-22 14:39:47 -03:00
David Capello
bab13c4739 Enable some debugging messages in gif decoder/encoder 2015-09-22 11:42:50 -03:00
David Capello
9d8f859438 Fix minor formatting issues introduced in #812 2015-09-21 17:49:12 -03:00
David Capello
6a0f4afab2 Merge pull request #812 from Fojar/issue#806
Flattening transparent layers shouldn't create a background layer (fix #806)
2015-09-21 17:45:23 -03:00
David Capello
795c4d5a87 Use ctest to run tests 2015-09-21 16:45:25 -03:00