Commit Graph

32 Commits

Author SHA1 Message Date
David Capello
65da03d181 Use an internal ImageBuffer inside Mask class 2014-12-13 19:43:14 -03:00
David Capello
f66b48c698 Change Mask member functions to use gfx::Rect instead of x,y,w,h args 2014-12-13 19:10:54 -03:00
David Capello
e79314d4e5 Critical fix in Image::clip_rects() 2014-12-09 11:53:57 -03:00
David Capello
afbd3b2d96 Optimize ToolLoop with modified regions of pixels
Here we avoid copying and clearing pixels that will not be used
in the whole tool loop process.
Changes:
* Add several member functions in ToolLoop to validate/invalidate regions
  of source/destination images so we know what regions are safe to use
  by inks and can be shown in the editor
* Add new DocumentObserver::onExposeSpritePixels() member to validate
  pixels that will be displayed in the editor
* Add Ink::needs/createSpecialSourceArea() member functions to validate
  extra areas for inks like blur or jumble
* Add undoers::ModifiedRegion to save the undo information about the
  modified region
* Add ShowHideDrawingCursor class
* Change "blur" tool policy from overlap to accumulate

(This is a real fix for issue #239)
2014-12-08 14:57:56 -03:00
David Capello
07c7756638 Add Brush::kMax/MinBrushSize constants 2014-12-07 20:50:26 -03:00
David Capello
5aea29348e Merge branch '1.0'
Conflicts:
	data/gui.xml
	src/app/CMakeLists.txt
	src/app/color_utils.cpp
	src/app/color_utils.h
	src/app/commands/cmd_preview.cpp
	src/app/document_exporter.cpp
	src/app/document_exporter.h
	src/app/ui/editor/standby_state.cpp
	src/config.h
	src/main/resources_win32.rc
2014-12-03 11:15:09 -03:00
David Capello
bc9f4b2c9b Don't load a file if it's already open on drop files event
This avoids to open a document two times on Mac OS X
from the command line (the file is loaded when we
process the command line, and by Finder, which send us
an application:openFile: message).
2014-11-30 21:06:29 -03:00
David Capello
adf08ac7df Merge branch '1.0'
Conflicts:
	src/app/commands/cmd_preview.cpp
	src/app/thumbnail_generator.cpp
	src/app/ui/editor/editor.h
	src/app/util/render.h
	src/raster/image_buffer.h
2014-11-27 23:40:14 -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
9bcc552129 Add override modifier to getMemSize() in doc::Object's sub-classes 2014-11-16 21:32:18 -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
aefdf2fd4b Merge branch '1.0'
Conflicts:
	src/app/document.cpp
2014-11-12 23:20:27 -03:00
David Capello
ae9e2d173b Deselect timeline range when we modify sprite selection
Fix a problem selecting one cel in the timeline, using Ctrl+A and then
Ctrl+C to copy the whole image area. (This indicates that the user want
to copy the cel content, not the timeline cel.)
2014-11-12 11:24:26 -03:00
David Capello
5e2cefe212 Merge branch '1.0'
Conflicts:
	src/app/commands/cmd_sprite_size.cpp
	src/app/document_exporter.cpp
2014-11-07 19:30:39 -03:00
David Capello
ce962f4999 Add more command line options to export or convert sprites
Added --save-as, --scale, --split-layers, and --import-layer command line
options.
2014-11-06 21:04:32 -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
39b8e034b5 Merge branch '1.0'
Conflicts:
	.gitmodules
	CMakeLists.txt
	src/CMakeLists.txt
	src/app/app.h
	src/app/app_menus.cpp
	src/app/commands/cmd_move_mask.cpp
	src/app/commands/cmd_rotate.cpp
	src/app/modules/gui.cpp
	src/doc/resize_image_tests.cpp
	src/ui/accelerator.cpp
	third_party/CMakeLists.txt
2014-10-30 01:06:27 -03:00
David Capello
adaab1af98 Fix #507 clang compilation error in layer_io.cpp 2014-10-22 10:53:22 -03:00
David Capello
63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello
07497ec8e5 Use enum class for doc::ColorMode 2014-08-18 01:13:24 -03:00
David Capello
51ab478f49 Fix order of members initialization detected by clang 2014-08-17 20:38:55 -03:00
David Capello
6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello
df3c16b802 Add more options to export sprite sheet (e.g. best fit for texture) 2014-08-11 11:33:17 -03:00
David Capello
dfaf097b88 Rename base/compiler_specific.h to base/override.h 2014-08-09 08:08:20 -03:00
David Capello
c104b4812d Add doc::Settings to get the undo limit (or other settings that will be in the logic/doc layer) 2014-07-31 00:19:58 -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
81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
The objective of these changes is to create a more testable doc/logic API.

Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
  and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
  (to replace app::Document::getSprite()), width/height(), colorMode(),
  name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
  of signals.
- Renamed app::Context::getActiveDocument() with
  doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
  app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
2014-07-29 00:53:24 -03:00
David Capello
78ce233756 Fix header of files distributed under the terms of the MIT license 2014-03-29 20:08:05 -03:00
David Capello
f4b2b47a2c Add #pragma once 2014-03-29 19:40:17 -03:00
David Capello
b16bf981d0 Implement issue #265 - command/keyboard shortcut for "last export" operation
- Add doc::ExportData with information about the last export operation.
- Add RepeatLastExport command.
- Add SaveFileBaseCommand as base Command class, to accept "filename"
  param.
- Add parameters to ExportSpriteSheet so we can call it without UI
  from "repeat last export".
2014-03-29 16:58:35 -03:00
David Capello
2a70e750cd Add a basic model layer (doc-lib) 2014-03-12 19:25:09 -03:00