Commit Graph

37 Commits

Author SHA1 Message Date
David Capello 4fc28d5639 Add zoom out (related to issue #33)
Before the zoom was handle as a bits shift (scaled = value << zoom),
now the zoom is a fraction (scaled = value * zoom.num / zoom.den).

Changes:
* Add Zoom class to apply/remove zoom factor
* Split merge_zoomed_image template function into
  merge_zoomed_image_scale_down and merge_zoomed_image_scale_up
  to handle the special case where zoom.num/zoom.den < 1.0
2014-11-24 17:18:30 -03:00
David Capello 17b0bee0ae Refactor: Use gfx::Point in several places instead of two x,y integers
Changes:
* Add doc::Sprite::bounds()
* Use gfx::Point to store the doc::Cel position
* Replace "int x, int y" with a "const gfx::Point&" param
* Fix Mask::intersect(const gfx::Rect&) and Mask::crop(const Image*)
2014-11-24 00:09:22 -03:00
David Capello cc889f2b2f Minor refactor to doc::Layer flags 2014-11-16 23:03:30 -03:00
David Capello acfe155b24 Merge branch '1.0'
Conflicts:
	src/app/color_picker.cpp
	src/raster/sprite.h
2014-11-16 18:59:30 -03:00
David Capello c64ee5729b Add "Auto Select Layer" check box to Move Tool (close #527) 2014-11-16 18:33:31 -03:00
David Capello c0078809f7 Merge branch '1.0'
Conflicts:
	data/gui.xml
	src/config.h
	src/main/resources_win32.rc
2014-11-16 13:26:02 -03:00
David Capello 3ba3b48fd7 Fix crash using eyedropper above a (hidden) selection handle
We need to be in a Selection ink to start moving pixels from transform
handles.
2014-11-13 11:23:45 -03:00
David Capello 7615c22827 Merge branch '1.0'
Conflicts:
	src/app/color_utils.cpp
	src/app/tools/ink_processing.h
2014-11-02 22:38:14 -03:00
David Capello 9fb3396392 Fix problems with multiple editors in MovingPixelsState (fix #419) 2014-11-02 16:15:52 -03:00
David Capello 63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello e133c341ff Add fixmath library 2014-09-21 11:51:24 -03:00
David Capello 64a841a1d6 Remove unused variables 2014-09-09 08:49:52 -03:00
David Capello 0b3ec08987 Fix crash trying to move the selection from a empty cel 2014-08-24 19:37:24 -03:00
David Capello 9a15126682 Fix issue 188: Pick foreground color with right mouse button 2014-08-19 08:17:57 -03:00
David Capello 5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello dfc1ecd2da Use #pragma warning only in MSC compiler 2014-08-14 23:38:06 -03:00
David Capello 6db36fe30b Add ZoomCommand so zoom keys are configured in gui.xml file 2014-08-13 00:22:29 -03:00
David Capello 1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello 1e84c63042 Use ui::Window to show the animation playback instead of a custom event loop 2014-08-09 17:14:56 -03:00
David Capello 7632e83046 Don't show selection handles in the MiniEditor 2014-08-09 12:24:04 -03:00
David Capello 626ec1d2ba Add MoveTaskCommand: now you can move the selection with Shift+arrow keys 2014-08-08 01:00:02 -03:00
David Capello 91b0c2d071 Refactor: Remove "get" part for member functions that act like a simple getter
Additional change:
- Added Cel::image() to get the related image of the cel directly
2014-07-30 01:28:15 -03:00
David Capello 0b8d88d6ee Add "slice" ink and tool (it is not yet implemented) 2014-06-27 22:58:38 -03:00
David Capello 331688bd86 Add "Zoom with Scroll Wheel" option (on/true by default) 2014-06-22 22:35:51 -03:00
David Capello ec61c6b972 Add support for horizontal mouse wheel and scroll bar notifications (better support for trackpads)
WM_HSCROLL/WM_VSCROLL messages are used by some trackpads drivers to
notify about horizontal/vertical pan gestures.
2014-04-28 22:02:56 -03:00
David Capello 2c0642d1f1 It's better if mouse wheel doesn't center the scroll on zoom-in/out 2014-04-19 20:43:23 -03:00
David Capello 4c706afb90 New zoom tool 2014-04-19 20:08:21 -03:00
David Capello dd2ce20e25 Win32: Add support to convert mouse messages (WM_) to ui::Messages (using she::Events)
On Windows, instead of polling Allegro mouse position/buttons we can use
the mouse messages (WM_*) directly to generate she::Events. Those events
are received by the ui::Manager and converted to ui::Messages.
Maybe this is a possible fix for issue #133 (Wacom tablets don't work
properly).

Changes:
- Don't use jmouse_z() directly (new ui::MouseMessage::wheelDelta() member)
- Add ui::_internal_set_mouse_position() to change the jmouse_x/y(0)
  from the new mouse position received in she::Events. The same for
  ui::_internal_set_mouse_buttons().
- Modify the ui::Manager to generate mouse events in any case: using old
  Allegro 4 polling method, or from she::Events.
2014-04-17 22:23:12 -03:00
David Capello c558d664e8 Don't use C++11 enum class style yet 2014-02-24 08:31:02 -03:00
David Capello 43b2be4f0d Fix issue 347: Eyedropper tool changes in gui.xml (pick_fg ink) not working 2014-02-24 08:08:34 -03:00
David Capello e671508d85 Change infinite scroll implementation
Remove necessity of jmouse_x(1) and jmouse_y(1) calls.

- Renamed jmouse_control_infinite_scroll() -> ui::control_infinite_scroll()
- Renamed jmouse_set_position() -> ui::set_mouse_position()
- Added ui::get_delta_outside_box()
2014-02-02 18:46:19 -03:00
David Capello c8c099864c Added "Grab Alpha" option to eye dropper (issue 134) 2014-01-28 23:56:44 -03:00
David Capello fe552f60de Temporal fix for issue 299: Don't allow moving the selection from other editor than the current one 2013-12-29 19:53:28 -03:00
David Capello d6533d8a3f StandbyState::onUpdateStatusBar(): show frame duration 2013-12-22 12:28:07 -03:00
David Capello e5ba8e0922 Encapsulate Image implementation (private members, accessors, iterators, etc.)
- Rename _rgba/_graya to raster::rgba()/graya()
- Add raster::color_t type (alias for uint32_t)
- Rename raster::GfxObj to Object. And GfxObj::getType() to Object::type()
- Move conversion from raster::Image/Palette to Allegro BITMAP/RGB
  to raster/conversion_alleg.h file
- Add raster/color_scales.h
- Rename image_* functions to raster/primitives.h
- Reimplement ink processing with templates instead of macros
2013-11-09 19:59:05 -03:00
David Capello cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -03:00
David Capello c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem
2013-08-05 21:20:19 -03:00