Merge branch 'master' into beta

This commit is contained in:
David Capello 2016-12-07 12:14:28 -03:00
commit dc19c4b589
43 changed files with 1921 additions and 1241 deletions

3
.gitmodules vendored
View File

@ -39,3 +39,6 @@
[submodule "laf"]
path = laf
url = https://github.com/aseprite/laf.git
[submodule "third_party/cmark"]
path = third_party/cmark
url = https://github.com/aseprite/cmark.git

View File

@ -73,23 +73,7 @@ It tries to replicate some pixel-art algorithms:
* [RotSprite](http://forums.sonicretro.org/index.php?showtopic=8848&st=15&p=159754&#entry159754) by Xenowhirl.
* [Pixel perfect drawing algorithm](http://deepnight.net/pixel-perfect-drawing/) by [Sébastien Bénard](https://twitter.com/deepnightfr) and [Carduus](https://twitter.com/CarduusHimself/status/420554200737935361).
And it uses the following third-party libraries:
* [Allegro 4](http://alleg.sourceforge.net/) - [allegro4 license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/allegro4-LICENSE.txt)
* [FreeType](http://www.freetype.org/) - [FTL license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/FTL.txt)
* [Google Test](https://github.com/google/googletest) - [BSD-like license](https://github.com/aseprite/googletest/blob/master/googletest/LICENSE)
* [curl](http://curl.haxx.se/) - [curl license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/curl-LICENSE.txt)
* [duktape](http://duktape.org/) - [MIT license](https://github.com/aseprite/aseprite/tree/master/third_party/duktape/LICENSE.txt)
* [giflib](http://sourceforge.net/projects/giflib/) - [giflib license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/giflib-LICENSE.txt)
* [libjpeg](http://www.ijg.org/) - [libjpeg license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/libjpeg-LICENSE.txt)
* [libpng](http://www.libpng.org/pub/png/) - [libpng license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/libpng-LICENSE.txt)
* [libwebp](https://developers.google.com/speed/webp/) - [libwebp license](https://chromium.googlesource.com/webm/libwebp/+/master/COPYING)
* [loadpng](http://tjaden.strangesoft.net/loadpng/) - [zlib license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/ZLIB.txt)
* [pixman](http://www.pixman.org/) - [MIT license](http://cgit.freedesktop.org/pixman/plain/COPYING)
* [simpleini](https://github.com/aseprite/simpleini/) - [MIT license](https://github.com/aseprite/simpleini/blob/aseprite/LICENCE.txt)
* [stringencoders](https://github.com/client9/stringencoders) - [MIT license](https://github.com/aseprite/stringencoders/blob/master/LICENSE)
* [tinyxml](http://www.sourceforge.net/projects/tinyxml) - [zlib license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/ZLIB.txt)
* [zlib](http://www.gzip.org/zlib/) - [ZLIB license](https://github.com/aseprite/aseprite/tree/master/docs/licenses/ZLIB.txt)
Aseprite uses [several third-party open source projects](docs/LICENSES.md).
## License

View File

@ -806,9 +806,8 @@
<item command="Refresh" text="&amp;Refresh &amp;&amp; Reload Skin" />
</menu>
<menu text="&amp;Help">
<item command="Launch" text="Readme">
<param name="type" value="url" />
<param name="path" value="https://github.com/aseprite/aseprite#readme" />
<item command="OpenBrowser" text="Readme">
<param name="filename" value="README.md" />
</item>
<separator />
<item command="Launch" text="Quick &amp;Reference">

View File

@ -32,6 +32,7 @@
<color id="desktop" value="#968275" />
<color id="textbox_text" value="#000000" />
<color id="textbox_face" value="#ffffff" />
<color id="textbox_code_face" value="#eeeeee" />
<color id="entry_suffix" value="#c6c6c6" />
<color id="link_text" value="#2c4c91" />
<color id="link_hover" value="#ff5555" />

931
docs/LICENSES.md Normal file
View File

@ -0,0 +1,931 @@
Aseprite uses the following open source projects:
# [Allegro 4](http://liballeg.org/)
```
Allegro is gift-ware. It was created by a number of people working in
cooperation, and is given to you freely as a gift. You may use,
modify, redistribute, and generally hack it about in any way you like,
and you do not have to give us anything in return.
However, if you like this product you are encouraged to thank us by
making a return gift to the Allegro community. This could be by
writing an add-on package, providing a useful bug report, making an
improvement to the library, or perhaps just releasing the sources of
your program so that other people can learn from them. If you
redistribute parts of this code or make a game using it, it would be
nice if you mentioned Allegro somewhere in the credits, but you are
not required to do this. We trust you not to abuse our generosity.
By Shawn Hargreaves, 18 October 1998.
DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER
LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
# [cmark](https://github.com/jgm/cmark)
```
Copyright (c) 2014, John MacFarlane
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-----
houdini.h, houdini_href_e.c, houdini_html_e.c, houdini_html_u.c
derive from https://github.com/vmg/houdini (with some modifications)
Copyright (C) 2012 Vicent Martí
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----
buffer.h, buffer.c, chunk.h
are derived from code (C) 2012 Github, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-----
utf8.c and utf8.c
are derived from utf8proc
(<http://www.public-software-group.org/utf8proc>),
(C) 2009 Public Software Group e. V., Berlin, Germany.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-----
The normalization code in normalize.py was derived from the
markdowntest project, Copyright 2013 Karl Dubost:
The MIT License (MIT)
Copyright (c) 2013 Karl Dubost
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-----
The CommonMark spec (test/spec.txt) is
Copyright (C) 2014-15 John MacFarlane
Released under the Creative Commons CC-BY-SA 4.0 license:
<http://creativecommons.org/licenses/by-sa/4.0/>.
-----
The test software in test/ is
Copyright (c) 2014, John MacFarlane
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
# [curl](http://curl.haxx.se/)
```
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>
All rights reserved.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.
```
# [duktape](http://duktape.org/)
```
===============
Duktape license
===============
(http://opensource.org/licenses/MIT)
Copyright (c) 2013-2016 by Duktape authors (see AUTHORS.rst)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
# [FreeType](http://www.freetype.org/)
```
The FreeType Project LICENSE
----------------------------
2000-Feb-08
Copyright 1996-2000 by
David Turner, Robert Wilhelm, and Werner Lemberg
Introduction
============
The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.
This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.
This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:
o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)
o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)
o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')
We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.
Legal Terms
===========
0. Definitions
--------------
Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.
`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.
This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.
The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.
1. No Warranty
--------------
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.
2. Redistribution
-----------------
This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:
o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.
o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.
These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.
3. Advertising
--------------
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.
As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.
4. Contacts
-----------
There are two mailing lists related to FreeType:
o freetype@freetype.org
Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.
o devel@freetype.org
Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.
o http://www.freetype.org
Holds the current FreeType web page, which will allow you to
download our latest development version and read online
documentation.
You can also contact us individually at:
David Turner <david.turner@freetype.org>
Robert Wilhelm <robert.wilhelm@freetype.org>
Werner Lemberg <werner.lemberg@freetype.org>
--- end of LICENSE.TXT ---
```
# [giflib](http://sourceforge.net/projects/giflib/)
```
The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
# [Google Test](https://github.com/google/googletest)
```
Copyright 2008, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
# [libjpeg](http://www.ijg.org/)
```
The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
This software is copyright (C) 1991-1998, Thomas G. Lane.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".
We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.
ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
by the usual distribution terms of the Free Software Foundation; principally,
that you must include source code if you redistribute it. (See the file
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
of any program generated from the IJG code, this does not limit you more than
the foregoing paragraphs do.
The Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
ltconfig, ltmain.sh). Another support script, install-sh, is copyright
by M.I.T. but is also freely distributable.
It appears that the arithmetic coding option of the JPEG spec is covered by
patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
legally be used without obtaining one or more licenses. For this reason,
support for arithmetic coding has been removed from the free JPEG software.
(Since arithmetic coding provides only a marginal gain over the unpatented
Huffman mode, it is unlikely that very many implementations will support it.)
So far as we are aware, there are no patent restrictions on the remaining
code.
The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
been removed altogether, and the GIF writer has been simplified to produce
"uncompressed GIFs". This technique does not use the LZW algorithm; the
resulting GIF files are larger than usual, but are readable by all standard
GIF decoders.
We are required to state that
"The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated."
```
# [libpng](http://www.libpng.org/pub/png/)
```
This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.22beta06, April 27, 2016 are
Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
added to the list of Contributing Authors:
Simon-Pierre Cadieux
Eric S. Raymond
Mans Rullgard
Cosmin Truta
Gilles Vollant
James Yu
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
the user.
Some files in the "contrib" directory and some configure-generated
files that are distributed with libpng have other copyright owners and
are released under other open source licenses.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
libpng-0.96, and are distributed according to the same disclaimer and
license as libpng-0.96, with the following individuals added to the list
of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
and are distributed according to the same disclaimer and license as
libpng-0.88, with the following individuals added to the list of
Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
Some files in the "scripts" directory have other copyright owners
but are released under this license.
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
TRADEMARK:
The name "libpng" has not been registered by the Copyright owner
as a trademark in any jurisdiction. However, because libpng has
been distributed and maintained world-wide, continually since 1995,
the Copyright owner claims "common-law trademark protection" in any
jurisdiction where common-law trademark is recognized.
OSI CERTIFICATION:
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is
a certification mark of the Open Source Initiative. OSI has not addressed
the additional disclaimers inserted at version 1.0.7.
EXPORT CONTROL:
The Copyright owner believes that the Export Control Classification
Number (ECCN) for libpng is EAR99, which means not subject to export
controls or International Traffic in Arms Regulations (ITAR) because
it is open source, publicly available software, that does not contain
any encryption software. See the EAR, paragraphs 734.3(b)(3) and
734.7(b).
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
April 27, 2016
```
# [libwebp](https://developers.google.com/speed/webp/)
```
Copyright (c) 2010, Google Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
# [loadpng](http://tjaden.strangesoft.net/loadpng/)
```
Copyright (C) 1999-2012 Peter Wang
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
```
# [pixman](http://www.pixman.org/)
```
The following is the MIT license, agreed upon by most contributors.
Copyright holders of new code should use this license statement where
possible. They may also add themselves to the list below.
/*
* Copyright 1987, 1988, 1989, 1998 The Open Group
* Copyright 1987, 1988, 1989 Digital Equipment Corporation
* Copyright 1999, 2004, 2008 Keith Packard
* Copyright 2000 SuSE, Inc.
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
* Copyright 2004, 2005, 2007, 2008, 2009, 2010 Red Hat, Inc.
* Copyright 2004 Nicholas Miell
* Copyright 2005 Lars Knoll & Zack Rusin, Trolltech
* Copyright 2005 Trolltech AS
* Copyright 2007 Luca Barbato
* Copyright 2008 Aaron Plattner, NVIDIA Corporation
* Copyright 2008 Rodrigo Kumpera
* Copyright 2008 André Tupinambá
* Copyright 2008 Mozilla Corporation
* Copyright 2008 Frederic Plourde
* Copyright 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009, 2010 Nokia Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
```
# [simpleini](https://github.com/aseprite/simpleini/)
```
The MIT License (MIT)
Copyright (c) 2006-2013 Brodie Thiesfield
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
# [stringencoders](https://github.com/client9/stringencoders)
```
The MIT License (MIT)
Copyright (c) 2016 Nick Galbreath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
# [tinyxml](http://www.grinninglizard.com/tinyxml/)
```
TinyXML is released under the zlib license:
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
--
TinyXML was originally written by Lee Thomason. Lee reviews changes
and releases new versions, with the help of Yves Berquin, Andrew
Ellerton, and the tinyXml community.
```
# [Wintab API](http://www.wacomeng.com/windows/docs/WintabBackground.htm)
```
Copyright (c) 2010, Wacom Technology Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
```
# [zlib](http://www.zlib.net/)
```
(C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
```

View File

@ -1,124 +1,114 @@
ASE Files (.ASE) Format description
Copyright (C) 2001-2016 by David Capello
----------------------------------------------------------------------
Aseprite File Format (.ase/.aseprite) Specifications
====================================================
> Copyright (C) 2001-2016 by David Capello
1. [References](#1-references)
2. [Introduction](#2-introduction)
3. [Header](#3-header)
4. [Frames](#4-frames)
5. [Chunk Types](#5-chunk-types)
6. [File Format Changes](#6-file-format-changes)
1. References
2. Introduction
3. Header
4. Frames
5. New chunk types
6. File Format Changes
========================================
1. References
========================================
-------------
ASE files use Intel (little-endian) byte order.
BYTE An 8-bit unsigned integer value
WORD A 16-bit unsigned integer value
SIGNED WORD A 16-bit signed integer value
DWORD A 32-bit unsigned integer value
FIXED A 32-bit fixed point (16.16) value
BYTE[n] "n" bytes.
STRING length=WORD (how many characters to read next)
string=BYTE[length]
The \0 character isn't included.
PIXEL Pixel format:
- In RGB images, each pixel have 4 bytes in
this order Red, Green, Blue, Alpha.
- In Grayscale images, each pixel have 2 bytes
in the order Value, Alpha.
- In Indexed images, each pixel uses 1 byte (the index).
Data Type | Details |
--------------- | -------------------------------- |
BYTE | An 8-bit unsigned integer value
WORD | A 16-bit unsigned integer value
SIGNED WORD | A 16-bit signed integer value
DWORD | A 32-bit unsigned integer value
FIXED | A 32-bit fixed point (16.16) value
BYTE[n] | "n" bytes.
STRING | WORD: string length (number of bytes)
| BYTE[length]: characters (in UTF-8)
| The \0 character is not included.
PIXEL | One pixel, depending on the image pixel format:
| **RGB**: Each pixel have 4 bytes in this order Red, Green, Blue, Alpha.
| **Grayscale**: Each pixel have 2 bytes in the order Value, Alpha.
| **Indexed**: Each pixel uses 1 byte (the index).
========================================
2. Introduction
========================================
---------------
The format is much like FLI/FLC files, but with different magic number
and differents chunks. Also, the color depth can be 8, 16 or 32 for
Indexed, Grayscale and RGB respectively, and images are compressed
images with zlib. Color palettes are in FLI color chunks (it could be
type=11 or type=4). For color depths more than 8bpp, palettes are
optional. See fli.txt for details.
optional.
To read the sprite:
* Read the ASE header (section 3)
* For each frame do (how many frames? the ASE header has that
information):
+ Read the frame header (section 4)
+ For each chunk in this frame (how many chunks? the frame header
has that information)
- Read the chunk (it should be layer information, a cel or a
palette)
* Read the [ASE header](#3-header)
* For each frame do (how many frames? the ASE header has that information):
+ Read the [frame header](#4-frames)
+ For each chunk in this frame (how many chunks? the frame header has that information)
- Read the chunk (it should be layer information, a cel or a palette)
========================================
3. Header
========================================
---------
A 128-byte header (same as FLC/FLI header, but with other magic
number):
A 128-byte header (same as FLC/FLI header, but with other magic number):
DWORD File size
WORD Magic number (0xA5E0)
WORD Frames
WORD Width in pixels
WORD Height in pixels
WORD Color depth (bits per pixel)
32 bpp = RGBA
16 bpp = Grayscale
8 bpp = Indexed
DWORD Flags:
1 = Layer opacity has valid value
WORD Speed (milliseconds between frame, like in FLC files)
DEPRECATED: You should use the frame duration
field from each frame header
DWORD Set be 0
DWORD Set be 0
BYTE Palette entry (index) which represent transparent
color in all non-background layers (only for Indexed
sprites).
BYTE[3] Ignore these bytes
WORD Number of colors (0 means 256 for old sprites)
BYTE Pixel width (pixel ratio is "pixel width/pixel height")
If this or pixel height field is zero, pixel ratio is 1:1
BYTE Pixel height
BYTE[92] For future (set to zero)
Field | Details |
------------- | -------------------------------- |
DWORD | File size
WORD | Magic number (0xA5E0)
WORD | Frames
WORD | Width in pixels
WORD | Height in pixels
WORD | Color depth (bits per pixel)
| 32 bpp = RGBA
| 16 bpp = Grayscale
| 8 bpp = Indexed
DWORD | Flags:
| 1 = Layer opacity has valid value
WORD | Speed (milliseconds between frame, like in FLC files) **DEPRECATED:** You should use the frame duration field from each frame header
DWORD | Set be 0
DWORD | Set be 0
BYTE | Palette entry (index) which represent transparent color in all non-background layers (only for Indexed sprites).
BYTE[3] | Ignore these bytes
WORD | Number of colors (0 means 256 for old sprites)
BYTE | Pixel width (pixel ratio is "pixel width/pixel height"). If this or pixel height field is zero, pixel ratio is 1:1
BYTE | Pixel height
BYTE[92] | For future (set to zero)
========================================
4. Frames
========================================
---------
After the header come the "frames" data. Each frame has this little
header of 16 bytes:
DWORD Bytes in this frame
WORD Magic number (always 0xF1FA)
WORD Number of "chunks" in this frame
WORD Frame duration (in milliseconds)
BYTE[6] For future (set to zero)
Field | Details |
----------- | -------------------------------- |
DWORD | Bytes in this frame
WORD | Magic number (always 0xF1FA)
WORD | Number of "chunks" in this frame
WORD | Frame duration (in milliseconds)
BYTE[6] | For future (set to zero)
Then each chunk format is:
DWORD Chunk size
WORD Chunk type
BYTE[] Chunk data
Field | Details |
----------- | -------------------------------- |
DWORD | Chunk size
WORD | Chunk type
BYTE[] | Chunk data
5. Chunk Types
--------------
========================================
5. Chunk types
========================================
Old palette chunk (0x0004)
----------------------------------------
### Old palette chunk (0x0004)
Ignore this chunk if you find the new palette chunk (0x2019) Aseprite
v1.1 saves both chunks 0x0004 and 0x2019 just for backward
compatibility.
```
WORD Number of packets
+ For each packet
BYTE Number of palette entries to skip from the last packet (start from 0)
@ -127,13 +117,13 @@ compatibility.
BYTE Red (0-255)
BYTE Green (0-255)
BYTE Blue (0-255)
```
Old palette chunk (0x0011)
----------------------------------------
### Old palette chunk (0x0011)
Ignore this chunk if you find the new palette chunk (0x2019)
```
WORD Number of packets
+ For each packet
BYTE Number of palette entries to skip from the last packet (start from 0)
@ -142,14 +132,14 @@ Ignore this chunk if you find the new palette chunk (0x2019)
BYTE Red (0-63)
BYTE Green (0-63)
BYTE Blue (0-63)
```
Layer Chunk (0x2004)
----------------------------------------
### Layer Chunk (0x2004)
In the first frame should be a set of layer chunks to determine the
entire layers layout:
```
WORD Flags:
1 = Visible
2 = Editable
@ -185,14 +175,14 @@ Layer Chunk (0x2004)
Note: valid only if file header flags field has bit 1 set
BYTE[3] For future (set to zero)
STRING Layer name
```
Cel Chunk (0x2005)
----------------------------------------
### Cel Chunk (0x2005)
This chunk determine where to put a cel in the specified
layer/frame.
```
WORD Layer index (see NOTE.2)
SIGNED WORD X position
SIGNED WORD Y position
@ -218,13 +208,13 @@ Cel Chunk (0x2005)
BYTE[] Compressed "Raw Cel" data. Details about the
compression method:
http://www.ietf.org/rfc/rfc1951.txt
```
Cel Extra Chunk (0x2006)
----------------------------------------
### Cel Extra Chunk (0x2006)
Adds extra information to the latest read cel.
```
DWORD Flags (set to zero)
1 - precise bounds are set
FIXED Precise X position
@ -232,11 +222,11 @@ Adds extra information to the latest read cel.
FIXED Width of the cel in the sprite (scaled in real-time)
FIXED Height of the cel in the sprite
BYTE[16] For future use (set to zero)
```
### Mask Chunk (0x2016) DEPRECATED
Mask Chunk (0x2016) DEPRECATED
----------------------------------------
```
SIGNED WORD X position
SIGNED WORD Y position
WORD Width
@ -246,17 +236,15 @@ Mask Chunk (0x2016) DEPRECATED
BYTE[] Bit map data (size = height*((width+7)/8))
Each byte contains 8 pixels (the leftmost pixels are
packed into the high order bits)
```
Path Chunk (0x2017)
----------------------------------------
### Path Chunk (0x2017)
Never used.
### Frame Tags Chunk (0x2018)
Frame Tags Chunk (0x2018)
----------------------------------------
```
WORD Number of tags
BYTE[8] For future (set to zero)
+ For each tag
@ -270,11 +258,11 @@ Frame Tags Chunk (0x2018)
BYTE[3] RGB values of the tag color
BYTE Extra byte (zero)
STRING Tag name
```
### Palette Chunk (0x2019)
Palette Chunk (0x2019)
----------------------------------------
```
DWORD New palette size (total number of entries)
DWORD First color index to change
DWORD Last color index to change
@ -288,15 +276,15 @@ Palette Chunk (0x2019)
BYTE Alpha (0-255)
+ If has name bit in entry flags
STRING Color name
```
User Data Chunk (0x2020)
----------------------------------------
### User Data Chunk (0x2020)
Insert this user data in the last read chunk. E.g. If we've read a
layer, this user data belongs to that layer, if we've read a cel, it
belongs to that cel, etc.
```
DWORD Flags
1 = Has text
2 = Has color
@ -307,14 +295,16 @@ belongs to that cel, etc.
BYTE Color Green (0-255)
BYTE Color Blue (0-255)
BYTE Color Alpha (0-255)
```
### Notes
Notes
----------------------------------------
#### NOTE.1
NOTE.1: The child level is used to show the relationship of this
layer with the last one read, for example:
The child level is used to show the relationship of this layer with
the last one read, for example:
```
Layer name and hierarchy Child Level
-----------------------------------------------
- Background 0
@ -323,11 +313,14 @@ NOTE.1: The child level is used to show the relationship of this
|- My set1 1
| `- Layer2 2
`- Layer3 1
```
#### NOTE.2
NOTE.2: The layer index is a number to identify any layer in the
sprite, for example:
The layer index is a number to identify any layer in the sprite, for
example:
```
Layer name and hierarchy Layer index
-----------------------------------------------
- Background 0
@ -336,18 +329,17 @@ NOTE.2: The layer index is a number to identify any layer in the
|- My set1 3
| `- Layer2 4
`- Layer3 5
```
6. File Format Changes
----------------------
========================================
File Format Changes
========================================
1. The first change from the first release of the new .ase format,
is the new frame duration field. This is because now each frame
can have different duration.
1) The first change from the first release of the new .ase format,
is the new frame duration field. This is because now each frame
can have different duration.
How to read both formats (old and new one)? You should set all
frames durations to the "speed" field read from the main ASE
header. Then, if you found a frame with the frame-duration
field > 0, you should update the duration of the frame with
that value.
How to read both formats (old and new one)? You should set all
frames durations to the "speed" field read from the main ASE
header. Then, if you found a frame with the frame-duration
field > 0, you should update the duration of the frame with
that value.

View File

@ -1,243 +0,0 @@
Flic Files (.FLI) Format description:
The details of a FLI file are moderately complex, but the
idea behind it is simple: don't bother storing the parts of a
frame that are the same as the last frame. Not only does this
save space, but it's very quick. It's faster to leave a pixel
alone than to set it.
A FLI file has a 128-byte header followed by a sequence of
frames. The first frame is compressed using a bytewise run-length
compression scheme. Subsequent frames are stored as the
difference from the previous frame. (Occasionally the first
frame and/or subsequent frames are uncompressed.) There is one
extra frame at the end of a FLI which contains the difference
between the last frame and the first frame.
The FLI header:
byte size name meaning
offset
0 4 size Length of file, for programs that want
to read the FLI all at once if possible.
4 2 magic Set to hex AF11. Please use another
value here if you change format (even to
a different resolution) so Autodesk
Animator won't crash trying to read it.
6 2 frames Number of frames in FLI. FLI files have
a maxium length of 4000 frames.
8 2 width Screen width (320).
10 2 height Screen height (200).
12 2 depth Depth of a pixel (8).
14 4 flags Must be 0.
18 2 speed Number of video ticks between frames.
20 4 next Set to 0.
24 4 frit Set to 0.
28 100 expand All zeroes -- for future enhancement.
Next are the frames, each of which has a header:
byte size name meaning
offset
0 4 size Bytes in this frame. Autodesk Animator
demands that this be less than 64K.
4 2 magic Always hexadecimal F1FA
6 2 chunks Number of 'chunks' in frame.
8 8 expand Space for future enhancements. All
zeros.
After the frame header come the chunks that make up the
frame. First comes a color chunk if the color map has changed
from the last frame. Then comes a pixel chunk if the pixels have
changed. If the frame is absolutely identical to the last frame
there will be no chunks at all.
A chunk itself has a header, followed by the data. The
chunk header is:
byte size name meaning
offset
0 4 size Bytes in this chunk.
4 2 type Type of chunk (see below).
There are currently five types of chunks you'll see in a FLI
file.
number name meaning
11 FLI_COLOR Compressed color map
12 FLI_LC Line compressed -- the most common type
of compression for any but the first
frame. Describes the pixel difference
from the previous frame.
13 FLI_BLACK Set whole screen to color 0 (only occurs
on the first frame).
15 FLI_BRUN Bytewise run-length compression -- first
frame only
16 FLI_COPY Indicates uncompressed 64000 bytes soon
to follow. For those times when
compression just doesn't work!
The compression schemes are all byte-oriented. If the
compressed data ends up being an odd length a single pad byte is
inserted so that the FLI_COPY's always start at an even address
for faster DMA.
FLI_COLOR Chunks
The first word is the number of packets in this chunk. This
is followed directly by the packets. The first byte of a packet
says how many colors to skip. The next byte says how many colors
to change. If this byte is zero it is interpreted to mean 256.
Next follows 3 bytes for each color to change (one each for red,
green and blue).
FLI_LC Chunks
This is the most common, and alas, most complex chunk. The
first word (16 bits) is the number of lines starting from the top
of the screen that are the same as the previous frame. (For
example, if there is motion only on the bottom line of screen
you'd have a 199 here.) The next word is the number of lines
that do change. Next there is the data for the changing lines
themselves. Each line is compressed individually; among other
things this makes it much easier to play back the FLI at a
reduced size.
The first byte of a compressed line is the number of packets
in this line. If the line is unchanged from the last frame this
is zero. The format of an individual packet is:
skip_count
size_count
data
The skip count is a single byte. If more than 255 pixels
are to be skipped it must be broken into 2 packets. The size
count is also a byte. If it is positive, that many bytes of data
follow and are to be copied to the screen. If it's negative a
single byte follows, and is repeated -size_count times.
In the worst case a FLI_LC frame can be about 70K. If it
comes out to be 60000 bytes or more Autodesk Animator decides
compression isn't worthwhile and saves the frame as FLI_COPY.
FLI_BLACK Chunks
These are very simple. There is no data associated with
them at all. In fact they are only generated for the first frame
in Autodesk Animator after the user selects NEW under the FLIC
menu.
FLI_BRUN Chunks
These are much like FLI_LC chunks without the skips. They
start immediately with the data for the first line, and go line-
by-line from there. The first byte contains the number of
packets in that line. The format for a packet is:
size_count
data
If size_count is positive the data consists of a single byte
which is repeated size_count times. If size_count is negative
there are -size_count bytes of data which are copied to the
screen. In Autodesk Animator if the "compressed" data shows signs
of exceeding 60000 bytes the frame is stored as FLI_COPY instead.
FLI_COPY Chunks
These are 64000 bytes of data for direct reading onto the
screen.
-----------------------------------------------------------------------
And here's the PRO extensions:
-----------------------------------------------------------------------
This is supplemental info on the AutoDesk Animator FLI and FLC formats.
The following is an attempt at describing the newer chunks and frames
that are not described in the Turbo C FLI library documentation.
Chunk type Chunk ID
---------- -----------
FLI_DELTA 7 (decimal)
First WORD (16 bits) is the number of compressed lines to follow. Next
is the data for the changing lines themselves, always starting with the
first line. Each line is compressed individually.
The first WORD (16 bits) of a compressed line is the number of packets in
the line. If the number of packets is a negative skip -packets lines.
If the number of packets is positive, decode the packets. The format of
an individual packet is:
skip_count
size_count
data
The skip count is a single byte. If more than 255 pixels are to be
skipped, it must be broken into 2 packets. The size_count is also a byte.
If it is positive, that many WORDS of data follow and are to be copied to
the screen. If it is negative, a single WORDS value follows, and is to be
repeated -size_count times.
Chunk type Chunk ID
---------- -----------
FLI_256_COLOR 4 (decimal)
The first WORD is the number of packets in this chunk. This is followed
directly by the packets. The first byte of a packet is how many colors
to skip. The next byte is how many colors to change. If this number is
0, (zero), it means 256. Next follow 3 bytes for each color to change.
(One each for red, green and blue).
The only difference between a FLI_256_COLOR chunk (type 4 decimal) and a
FLI_COLOR chunk (type 11 decimal) is that the values in the type 4 chunk
range from 0 to 255, and the values in a type 11 chunk range from 0 to 63.
NOTE: WORD refer to a 16 bit int in INTEL (Little Endian) format.
WORDS refer to two-bytes (16 bits) of consecutive data. (Big Endian)
.FLC special frames and chunks
FLC's may contain all the above chunks plus one other:
Chunk type Chunk ID
---------- -----------
FLI_MINI 18 (decimal) 12 (Hex)
From what I understand, this is a miniture 64 x 32 version of the first
frame in FLI_BRUN format, used as an button for selecting flc's from
within Animator Pro. Simply do nothing with this chunk.
FLC New Frame
FLC's also contains a frame with the magic bytes set to hex 00A1. This
is the first frame in the .flc file. Actually it isn't a frame at all
but to have several chunks within it that specify file location info
specific to Animator Pro. IE: filepath, font to use, and .COL file info.
This FRAME may be skipped while loading. That's right! Ignore it! The
frame header is the same length as all other frames. So you may read the
frame header, then skip past the rest of the frame.
NOTE: When reading the FLI header on the newer FLI and FLC files, the
FLI signature bytes are AF12 instead of AF11 used in the older FLI files.
Also, you cannot ignore the screen width and height they may not be
320 x 200.
Allowable screen sizes include:
320 x 200, 640 x 480, 800 x 600, 1280 x 1024
NOTE: the delay value between frames appears to be in 1000th's of a
second instead of 70th's.
If you have any questions or more info on the FLI or FLC formats,
please let me know.
Mike Haaland
(corrected by P. Oliver 30 May 1997 using information supplied by Reeves Hall)
CompuServe : 72300,1433
Delphi : MikeHaaland
Internet : mike@htsmm1.las-vegas.nv.us
Usenet : ...!htsmm1.las-vegas.nv.us!mike

View File

@ -1,51 +0,0 @@
MSK Format
Intel byte order
Information from File Format List 2.0 by Max Maischein.
--------!-CONTACT_INFO----------------------
If you notice any mistakes or omissions, please let me know! It is only
with YOUR help that the list can continue to grow. Please send
all changes to me rather than distributing a modified version of the list.
This file has been authored in the style of the INTERxxy.* file list
by Ralf Brown, and uses almost the same format.
Please read the file FILEFMTS.1ST before asking me any questions. You may find
that they have already been addressed.
Max Maischein
Max Maischein, 2:244/1106.17
Max_Maischein@spam.fido.de
corion@informatik.uni-frankfurt.de
Corion on #coders@IRC
--------!-DISCLAIMER------------------------
DISCLAIMER: THIS MATERIAL IS PROVIDED "AS IS". I verify the information
contained in this list to the best of my ability, but I cannot be held
responsible for any problems caused by use or misuse of the information,
especially for those file formats foreign to the PC, like AMIGA or SUN file
formats. If an information it is marked "guesswork" or undocumented, you
should check it carefully to make sure your program will not break with
an unexpected value (and please let me know whether or not it works
the same way).
Information marked with "???" is known to be incomplete or guesswork.
Some file formats were not released by their creators, others are regarded
as proprietary, which means that if your programs deal with them, you might
be looking for trouble. I don't care about this.
--------------------------------------------
The MSK files are mask files used by the Autodesk Animator and Animator Pro
packages. Two types of MSK files exist. The Animator Pro version is simply a PIC
file with the depth 1; A MSK file created by the original Animator is exactly
8000 bytes long. There is no file header or other control information in the
file. It contains the image bit map, 1 bit per pixel, with the leftmost pixels
packed into the high order bits of each byte. The size of the image is fixed at
320x200. The image is stored left-to-right, top-to-bottom.
EXTENSION:MSK
OCCURENCES:PC
PROGRAMS:Autodesk Animator
SEE ALSO:PIC,FLIc

View File

@ -1,71 +0,0 @@
PIC Format
Intel byte order
Information from File Format List 2.0 by Max Maischein.
--------!-CONTACT_INFO----------------------
If you notice any mistakes or omissions, please let me know! It is only
with YOUR help that the list can continue to grow. Please send
all changes to me rather than distributing a modified version of the list.
This file has been authored in the style of the INTERxxy.* file list
by Ralf Brown, and uses almost the same format.
Please read the file FILEFMTS.1ST before asking me any questions. You may find
that they have already been addressed.
Max Maischein
Max Maischein, 2:244/1106.17
Max_Maischein@spam.fido.de
corion@informatik.uni-frankfurt.de
Corion on #coders@IRC
--------!-DISCLAIMER------------------------
DISCLAIMER: THIS MATERIAL IS PROVIDED "AS IS". I verify the information
contained in this list to the best of my ability, but I cannot be held
responsible for any problems caused by use or misuse of the information,
especially for those file formats foreign to the PC, like AMIGA or SUN file
formats. If an information it is marked "guesswork" or undocumented, you
should check it carefully to make sure your program will not break with
an unexpected value (and please let me know whether or not it works
the same way).
Information marked with "???" is known to be incomplete or guesswork.
Some file formats were not released by their creators, others are regarded
as proprietary, which means that if your programs deal with them, you might
be looking for trouble. I don't care about this.
--------------------------------------------
PIC files contain images in an uncompressed format. Both the original Animator
and Animator Pro from Autodesk produce PIC files. The file formats are
different; Animator Pro produces a hierarchial block oriented file, while the
original Animator file is a simpler fixed format. See PIC(Pro) for further
information on the Animator Pro PIC format.
The original Animator uses this format to store a single-frame picture image.
This format description applies to both PIC and original Animator CEL files. The
file begins with a 32 byte header, as follows:
OFFSET Count TYPE Description
0000h 1 word ID=9119h
0002h 1 word Width of image; PIC files have always a width
of 320, CEL images may have any value.
0004h 1 word Height of image, 200 for a PIC, any value for
a CEL file.
0006h 1 word X offset of image, always 0 for a PIC image,
may be nonzero in a CEL image.
0008h 1 word Y offset of image. Zero for a PIC file.
000Ah 1 byte Bits per pixel (8)
000Bh 1 byte Compresion flag, always zero
000Ch 1 dword Size of the image data in bytes
0010h 16 byte reserved(0)
Immediately following the header is the color map. It contains all 256 palette
entries in rgb order. Each of the r, g, and b components is a single byte in the
range of 0-63. Following the color palette is the image data, one byte per
pixel, from left to right, top to bottom.
EXTENSION:PIC,CEL
OCCURENCES:PC
PROGRAMS:Autodesk Animator
SEE ALSO:CEL,FLIc,PIC(PRO)

View File

@ -1,92 +0,0 @@
PIC(PRO) Format
Intel byte order
Information from File Format List 2.0 by Max Maischein.
--------!-CONTACT_INFO----------------------
If you notice any mistakes or omissions, please let me know! It is only
with YOUR help that the list can continue to grow. Please send
all changes to me rather than distributing a modified version of the list.
This file has been authored in the style of the INTERxxy.* file list
by Ralf Brown, and uses almost the same format.
Please read the file FILEFMTS.1ST before asking me any questions. You may find
that they have already been addressed.
Max Maischein
Max Maischein, 2:244/1106.17
Max_Maischein@spam.fido.de
corion@informatik.uni-frankfurt.de
Corion on #coders@IRC
--------!-DISCLAIMER------------------------
DISCLAIMER: THIS MATERIAL IS PROVIDED "AS IS". I verify the information
contained in this list to the best of my ability, but I cannot be held
responsible for any problems caused by use or misuse of the information,
especially for those file formats foreign to the PC, like AMIGA or SUN file
formats. If an information it is marked "guesswork" or undocumented, you
should check it carefully to make sure your program will not break with
an unexpected value (and please let me know whether or not it works
the same way).
Information marked with "???" is known to be incomplete or guesswork.
Some file formats were not released by their creators, others are regarded
as proprietary, which means that if your programs deal with them, you might
be looking for trouble. I don't care about this.
--------------------------------------------
This format description applies to both PIC and MSK files created with the
Autodesk Animator Pro package. The file begins with a 64-byte header defined
as follows:
Offset Length Name Description
0000h 1 dword The size of the whole file including the size
of this header.
0004h 1 word ID=9500h
0006h 1 word Width of the image
0008h 1 word Height of the image
000Ah 1 word X offset of image
000Ch 1 word Y offset of image
000Eh 1 dword User ID, set to zero
0012h 1 byte Bits per pixel (8 for PIC, 1 for MSK)
0013h 45 byte reserved (0)
Following the file header are the data blocks for the image. Each data block
within a PIC or MSK file is formatted as follows:
OFFSET Count TYPE Description
0000h 1 dword The size of the block, including this header.
0004h 1 word Data type ID :
0 - Color palette info
1 - Byte-per-pixel image data
2 - Bit-per-pixel mask data
0006h ? byte Data
The type values in the block headers indicate what type of graphics data the
block contains.
In a PIC_CMAP block, the first 2-byte word is a version code;
currently this is set to zero. Following the version word are all 256 palette
entries in rgb order. Each of the r, g, and b components is a single byte in the
range of 0-255. This type of block appears in PIC files; there will generally be
no color map block in a MSK file.
In a PIC_BYTEPIXELS block, the image data appears immediately following the
6-byte block header. The data is stored as one byte per pixel, in left-to-right,
topD to-bottom sequence.
In a PIC_BITPIXELS block, the bitmap data appears immediately following the
6-byte block header. The data is stored as bits packed into bytes such that the
leftmost bits appear in the high-order positions of each byte. The bits are
stored in left-to-right, top-to bottom sequence. When the width of the bitmap is
not a multiple of 8, there will be unused bits in the low order positions of the
last byte on each line. The number of bytes per line is ((width+7)/8). This type
of block appears in MSK files.
EXTENSION:PIC,MSK
OCCURENCES:PC
PROGRAMS:Autodesk Animator Pro
REFERENCE:
SEE ALSO:PIC,FLT

View File

@ -1,29 +0,0 @@
Jinete - a GUI library
Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of the author nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,164 +0,0 @@
The FreeType Project LICENSE
----------------------------
2000-Feb-08
Copyright 1996-2000 by
David Turner, Robert Wilhelm, and Werner Lemberg
Introduction
============
The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.
This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.
This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:
o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)
o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)
o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')
We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.
Legal Terms
===========
0. Definitions
--------------
Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.
`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.
This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.
The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.
1. No Warranty
--------------
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.
2. Redistribution
-----------------
This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:
o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.
o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.
These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.
3. Advertising
--------------
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.
As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.
4. Contacts
-----------
There are two mailing lists related to FreeType:
o freetype@freetype.org
Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.
o devel@freetype.org
Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.
o http://www.freetype.org
Holds the current FreeType web page, which will allow you to
download our latest development version and read online
documentation.
You can also contact us individually at:
David Turner <david.turner@freetype.org>
Robert Wilhelm <robert.wilhelm@freetype.org>
Werner Lemberg <werner.lemberg@freetype.org>
--- end of LICENSE.TXT ---

View File

@ -1,17 +0,0 @@
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,18 +0,0 @@
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.

View File

@ -1,24 +0,0 @@
Allegro is gift-ware. It was created by a number of people working in
cooperation, and is given to you freely as a gift. You may use,
modify, redistribute, and generally hack it about in any way you like,
and you do not have to give us anything in return.
However, if you like this product you are encouraged to thank us by
making a return gift to the Allegro community. This could be by
writing an add-on package, providing a useful bug report, making an
improvement to the library, or perhaps just releasing the sources of
your program so that other people can learn from them. If you
redistribute parts of this code or make a game using it, it would be
nice if you mentioned Allegro somewhere in the credits, but you are
not required to do this. We trust you not to abuse our generosity.
By Shawn Hargreaves, 18 October 1998.
DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER
LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,21 +0,0 @@
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1996 - 2011, Daniel Stenberg, <daniel@haxx.se>.
All rights reserved.
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization of the copyright holder.

View File

@ -1,19 +0,0 @@
The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -1,28 +0,0 @@
Copyright 2008, Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -1,71 +0,0 @@
The authors make NO WARRANTY or representation, either express or implied,
with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
This software is copyright (C) 1991-1998, Thomas G. Lane.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
software (or portions thereof) for any purpose, without fee, subject to these
conditions:
(1) If any part of the source code for this software is distributed, then this
README file must be included, with this copyright and no-warranty notice
unaltered; and any additions, deletions, or changes to the original files
must be clearly indicated in accompanying documentation.
(2) If only executable code is distributed, then the accompanying
documentation must state that "this software is based in part on the work of
the Independent JPEG Group".
(3) Permission for use of this software is granted only if the user accepts
full responsibility for any undesirable consequences; the authors accept
NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code,
not just to the unmodified library. If you use our work, you ought to
acknowledge us.
Permission is NOT granted for the use of any IJG author's name or company name
in advertising or publicity relating to this software or products derived from
it. This software may be referred to only as "the Independent JPEG Group's
software".
We specifically permit and encourage the use of this software as the basis of
commercial products, provided that all warranty or liability claims are
assumed by the product vendor.
ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,
sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.
ansi2knr.c is NOT covered by the above copyright and conditions, but instead
by the usual distribution terms of the Free Software Foundation; principally,
that you must include source code if you redistribute it. (See the file
ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part
of any program generated from the IJG code, this does not limit you more than
the foregoing paragraphs do.
The Unix configuration script "configure" was produced with GNU Autoconf.
It is copyright by the Free Software Foundation but is freely distributable.
The same holds for its supporting scripts (config.guess, config.sub,
ltconfig, ltmain.sh). Another support script, install-sh, is copyright
by M.I.T. but is also freely distributable.
It appears that the arithmetic coding option of the JPEG spec is covered by
patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot
legally be used without obtaining one or more licenses. For this reason,
support for arithmetic coding has been removed from the free JPEG software.
(Since arithmetic coding provides only a marginal gain over the unpatented
Huffman mode, it is unlikely that very many implementations will support it.)
So far as we are aware, there are no patent restrictions on the remaining
code.
The IJG distribution formerly included code to read and write GIF files.
To avoid entanglement with the Unisys LZW patent, GIF reading support has
been removed altogether, and the GIF writer has been simplified to produce
"uncompressed GIFs". This technique does not use the LZW algorithm; the
resulting GIF files are larger than usual, but are readable by all standard
GIF decoders.
We are required to state that
"The Graphics Interchange Format(c) is the Copyright property of
CompuServe Incorporated. GIF(sm) is a Service Mark property of
CompuServe Incorporated."

View File

@ -1,111 +0,0 @@
This copy of the libpng notices is provided for your convenience. In case of
any discrepancy between this copy and the notices in the file png.h that is
included in the libpng distribution, the latter shall prevail.
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
If you modify libpng you may insert additional notices immediately following
this sentence.
This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.5.2, March 31, 2011, are
Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
Cosmin Truta
libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.0.6
with the following individuals added to the list of Contributing Authors
Simon-Pierre Cadieux
Eric S. Raymond
Gilles Vollant
and with the following additions to the disclaimer:
There is no warranty against interference with your enjoyment of the
library or against infringement. There is no warranty that our
efforts or the library will fulfill any of your particular purposes
or needs. This library is provided with all faults, and the entire
risk of satisfactory quality, performance, accuracy, and effort is with
the user.
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-0.96,
with the following individuals added to the list of Contributing Authors:
Tom Lane
Glenn Randers-Pehrson
Willem van Schaik
libpng versions 0.89, June 1996, through 0.96, May 1997, are
Copyright (c) 1996, 1997 Andreas Dilger
Distributed according to the same disclaimer and license as libpng-0.88,
with the following individuals added to the list of Contributing Authors:
John Bowler
Kevin Bracey
Sam Bushell
Magnus Holmgren
Greg Roelofs
Tom Tanner
libpng versions 0.5, May 1995, through 0.88, January 1996, are
Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
For the purposes of this copyright and license, "Contributing Authors"
is defined as the following set of individuals:
Andreas Dilger
Dave Martindale
Guy Eric Schalnat
Paul Schmidt
Tim Wegner
The PNG Reference Library is supplied "AS IS". The Contributing Authors
and Group 42, Inc. disclaim all warranties, expressed or implied,
including, without limitation, the warranties of merchantability and of
fitness for any purpose. The Contributing Authors and Group 42, Inc.
assume no liability for direct, indirect, incidental, special, exemplary,
or consequential damages, which may result from the use of the PNG
Reference Library, even if advised of the possibility of such damage.
Permission is hereby granted to use, copy, modify, and distribute this
source code, or portions hereof, for any purpose, without fee, subject
to the following restrictions:
1. The origin of this source code must not be misrepresented.
2. Altered versions must be plainly marked as such and must not
be misrepresented as being the original source.
3. This Copyright notice may not be removed or altered from any
source or altered source distribution.
The Contributing Authors and Group 42, Inc. specifically permit, without
fee, and encourage the use of this source code as a component to
supporting the PNG file format in commercial products. If you use this
source code in a product, acknowledgment is not required but would be
appreciated.
A "png_get_copyright" function is available, for convenient use in "about"
boxes and the like:
printf("%s",png_get_copyright(NULL));
Also, the PNG logo (in PNG format, of course) is supplied in the
files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a
certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
March 31, 2011

View File

@ -1,78 +0,0 @@
/* $XFree86: xc/programs/Xserver/mi/miregion.c,v 1.9 2003/04/23 21:51:53 tsi Exp $ */
/***********************************************************
Copyright 1987, 1988, 1989, 1998, 2007 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987, 1988, 1989 by
Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $Xorg: miregion.c,v 1.4 2001/02/09 02:05:21 xorgcvs Exp $ */
/* The panoramix components contained the following notice */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/

View File

@ -132,6 +132,24 @@ foreach(fn ${src_data_files})
list(APPEND out_data_files ${CMAKE_BINARY_DIR}/bin/data/${fn})
endforeach()
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/bin/data/README.md
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/README.md ${CMAKE_BINARY_DIR}/bin/data/README.md
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/README.md)
list(APPEND out_data_files ${CMAKE_BINARY_DIR}/bin/data/README.md)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/bin/data/EULA.txt
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/EULA.txt ${CMAKE_BINARY_DIR}/bin/data/EULA.txt
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/EULA.txt)
list(APPEND out_data_files ${CMAKE_BINARY_DIR}/bin/data/EULA.txt)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/bin/data/docs/LICENSES.md
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/docs/LICENSES.md ${CMAKE_BINARY_DIR}/bin/data/docs/LICENSES.md
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/docs/LICENSES.md)
list(APPEND out_data_files ${CMAKE_BINARY_DIR}/bin/data/docs/LICENSES.md)
add_custom_target(copy_data DEPENDS ${out_data_files})
######################################################################

View File

@ -60,6 +60,9 @@ if(WITH_WEBP_SUPPORT)
add_definitions(-DASEPRITE_WITH_WEBP_SUPPORT)
endif()
# cmark include files
include_directories(${CMAKE_BINARY_DIR}/third_party/cmark)
######################################################################
# app-lib target
@ -251,7 +254,7 @@ add_library(app-lib
commands/cmd_new_layer.cpp
commands/cmd_new_sprite_from_selection.cpp
commands/cmd_onionskin.cpp
commands/cmd_toggle_timeline_thumbnails.cpp
commands/cmd_open_browser.cpp
commands/cmd_open_file.cpp
commands/cmd_open_in_folder.cpp
commands/cmd_open_with_app.cpp
@ -290,6 +293,7 @@ add_library(app-lib
commands/cmd_tiled_mode.cpp
commands/cmd_timeline.cpp
commands/cmd_toggle_preview.cpp
commands/cmd_toggle_timeline_thumbnails.cpp
commands/cmd_undo.cpp
commands/cmd_undo_history.cpp
commands/cmd_unlink_cel.cpp
@ -366,6 +370,7 @@ add_library(app-lib
ui/ani_controls.cpp
ui/app_menuitem.cpp
ui/backup_indicator.cpp
ui/browser_view.cpp
ui/brush_popup.cpp
ui/button_set.cpp
ui/color_bar.cpp
@ -480,6 +485,7 @@ target_link_libraries(app-lib
she
ui-lib
undo
libcmark_static
${TINYXML_LIBRARY}
${JPEG_LIBRARIES}
${GIF_LIBRARIES}

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
@ -8,8 +8,10 @@
#include "config.h"
#endif
#include "app/app.h"
#include "app/commands/command.h"
#include "app/modules/gui.h"
#include "app/ui/main_window.h"
#include "base/bind.h"
#include "ui/ui.h"
@ -36,23 +38,26 @@ AboutCommand::AboutCommand()
void AboutCommand::onExecute(Context* context)
{
base::UniquePtr<Window> window(new Window(Window::WithTitleBar, "About " PACKAGE));
Box* box1 = new Box(VERTICAL);
Grid* grid = new Grid(2, false);
Label* title = new Label(PACKAGE " v" VERSION);
Label* subtitle = new Label("Animated sprite editor & pixel art tool");
Separator* authors_separator1 = new Separator("Authors:", HORIZONTAL | TOP);
Separator* authors_separator2 = new Separator("", HORIZONTAL);
Label* author1 = new LinkLabel("http://davidcapello.com/", "David Capello");
Label* author1_desc = new Label("- Lead developer, graphics & maintainer");
Label* author2 = new LinkLabel("http://ilkke.blogspot.com/", "Ilija Melentijevic");
Label* author2_desc = new Label("- Default skin & graphics introduced in v0.8");
Label* author3 = new LinkLabel(WEBSITE_CONTRIBUTORS, "Contributors");
Box* bottom_box1 = new Box(HORIZONTAL);
Box* bottom_box2 = new Box(HORIZONTAL);
Box* bottom_box3 = new Box(HORIZONTAL);
Label* copyright = new Label(COPYRIGHT);
Label* website = new LinkLabel(WEBSITE);
Button* close_button = new Button("&Close");
auto box1 = new Box(VERTICAL);
auto grid = new Grid(2, false);
auto title = new Label(PACKAGE " v" VERSION);
auto subtitle = new Label("Animated sprite editor & pixel art tool");
auto authors_separator1 = new Separator("Authors:", HORIZONTAL | TOP);
auto authors_separator2 = new Separator("", HORIZONTAL);
auto author1 = new LinkLabel("http://davidcapello.com/", "David Capello");
auto author1_desc = new Label("- Lead developer, graphics & maintainer");
auto author2 = new LinkLabel("http://ilkke.blogspot.com/", "Ilija Melentijevic");
auto author2_desc = new Label("- Default skin & graphics introduced in v0.8");
auto author3 = new LinkLabel(WEBSITE_CONTRIBUTORS, "Contributors");
auto author4 = new Label("and");
auto author5 = new LinkLabel("", "Open Source Projects");
auto author3_line = new Box(HORIZONTAL);
auto bottom_box1 = new Box(HORIZONTAL);
auto bottom_box2 = new Box(HORIZONTAL);
auto bottom_box3 = new Box(HORIZONTAL);
auto copyright = new Label(COPYRIGHT);
auto website = new LinkLabel(WEBSITE);
auto close_button = new Button("&Close");
grid->addChildInCell(title, 2, 1, 0);
grid->addChildInCell(subtitle, 2, 1, 0);
@ -61,7 +66,7 @@ void AboutCommand::onExecute(Context* context)
grid->addChildInCell(author1_desc, 1, 1, 0);
grid->addChildInCell(author2, 1, 1, 0);
grid->addChildInCell(author2_desc, 1, 1, 0);
grid->addChildInCell(author3, 2, 1, 0);
grid->addChildInCell(author3_line, 2, 1, 0);
grid->addChildInCell(authors_separator2, 2, 1, 0);
grid->addChildInCell(copyright, 2, 1, 0);
grid->addChildInCell(website, 2, 1, 0);
@ -69,6 +74,10 @@ void AboutCommand::onExecute(Context* context)
close_button->setFocusMagnet(true);
author3_line->addChild(author3);
author3_line->addChild(author4);
author3_line->addChild(author5);
bottom_box2->setExpansive(true);
bottom_box3->setExpansive(true);
@ -88,6 +97,12 @@ void AboutCommand::onExecute(Context* context)
close_button->Click.connect(base::Bind<void>(&Window::closeWindow, window.get(), close_button));
author5->Click.connect(
[&window]{
window->closeWindow(nullptr);
App::instance()->mainWindow()->showBrowser("docs/LICENSES.md");
});
window->openWindowInForeground();
}

View File

@ -0,0 +1,54 @@
// Aseprite
// Copyright (C) 2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "app/app.h"
#include "app/commands/command.h"
#include "app/commands/params.h"
#include "app/context.h"
#include "app/ui/main_window.h"
namespace app {
class OpenBrowserCommand : public Command {
public:
OpenBrowserCommand();
Command* clone() const override { return new OpenBrowserCommand(*this); }
protected:
void onLoadParams(const Params& params) override;
void onExecute(Context* context) override;
private:
std::string m_filename;
};
OpenBrowserCommand::OpenBrowserCommand()
: Command("OpenBrowser",
"Open Browser",
CmdUIOnlyFlag)
{
}
void OpenBrowserCommand::onLoadParams(const Params& params)
{
m_filename = params.get("filename");
}
void OpenBrowserCommand::onExecute(Context* context)
{
App::instance()->mainWindow()->showBrowser(m_filename);
}
Command* CommandFactory::createOpenBrowserCommand()
{
return new OpenBrowserCommand;
}
} // namespace app

View File

@ -80,6 +80,7 @@ FOR_EACH_COMMAND(NewFrame)
FOR_EACH_COMMAND(NewFrameTag)
FOR_EACH_COMMAND(NewLayer)
FOR_EACH_COMMAND(NewSpriteFromSelection)
FOR_EACH_COMMAND(OpenBrowser)
FOR_EACH_COMMAND(OpenFile)
FOR_EACH_COMMAND(OpenInFolder)
FOR_EACH_COMMAND(OpenWithApp)

View File

@ -10,7 +10,7 @@
#include "app/commands/filters/filter_manager_impl.h"
#include "app/cmd/copy_rect.h"
#include "app/cmd/copy_region.h"
#include "app/cmd/patch_cel.h"
#include "app/cmd/unlink_cel.h"
#include "app/context_access.h"
@ -189,12 +189,22 @@ void FilterManagerImpl::apply(Transaction& transaction)
gfx::Rect output;
if (algorithm::shrink_bounds2(m_src.get(), m_dst.get(),
m_bounds, output)) {
// Patch "m_cel"
transaction.execute(
new cmd::PatchCel(
m_cel, m_dst.get(),
gfx::Region(output),
position()));
if (m_cel->layer()->isBackground()) {
transaction.execute(
new cmd::CopyRegion(
m_cel->image(),
m_dst.get(),
gfx::Region(output),
position()));
}
else {
// Patch "m_cel"
transaction.execute(
new cmd::PatchCel(
m_cel, m_dst.get(),
gfx::Region(output),
position()));
}
}
}
}

570
src/app/ui/browser_view.cpp Normal file
View File

@ -0,0 +1,570 @@
// Aseprite
// Copyright (C) 2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "app/app.h"
#include "app/app_menus.h"
#include "app/resource_finder.h"
#include "app/ui/browser_view.h"
#include "app/ui/main_window.h"
#include "app/ui/skin/skin_style_property.h"
#include "app/ui/skin/skin_theme.h"
#include "app/ui/workspace.h"
#include "base/file_handle.h"
#include "base/fs.h"
#include "base/split_string.h"
#include "she/font.h"
#include "ui/alert.h"
#include "ui/link_label.h"
#include "ui/menu.h"
#include "ui/message.h"
#include "ui/paint_event.h"
#include "ui/resize_event.h"
#include "ui/size_hint_event.h"
#include "ui/system.h"
#include "ui/textbox.h"
#include "cmark.h"
#include <array>
#include <cstring>
#include <string>
#include <vector>
namespace app {
using namespace ui;
using namespace app::skin;
namespace {
RegisterMessage kLoadFileMessage;
class LoadFileMessage : public Message {
public:
LoadFileMessage(const std::string& file)
: Message(kLoadFileMessage)
, m_file(file) {
}
const std::string& file() const { return m_file; }
private:
std::string m_file;
};
} // annonymous namespace
// TODO This is not the best implementation, but it's "good enough"
// for a first version.
class BrowserView::CMarkBox : public Widget {
class Break : public Widget {
public:
Break() {
setMinSize(gfx::Size(0, font()->height()));
}
};
class OpenList : public Widget { };
class CloseList : public Widget { };
class Item : public Label {
public:
Item(const std::string& text) : Label(text) { }
};
public:
obs::signal<void()> FileChange;
CMarkBox() {
setBgColor(SkinTheme::instance()->colors.textboxFace());
setBorder(gfx::Border(4*guiscale()));
}
const std::string& file() {
return m_file;
}
void loadFile(const std::string& inputFile) {
std::string file = inputFile;
{
ResourceFinder rf;
rf.includeDataDir(file.c_str());
if (rf.findFirst())
file = rf.filename();
}
m_file = file;
cmark_parser* parser = cmark_parser_new(CMARK_OPT_DEFAULT);
FILE* fp = base::open_file_raw(file, "rb");
if (fp) {
std::array<char, 4096> buffer;
size_t bytes;
bool isTxt = (base::get_file_extension(file) == "txt");
if (isTxt)
cmark_parser_feed(parser, "```\n", 4);
while ((bytes = std::fread(&buffer[0], 1, buffer.size(), fp)) > 0) {
cmark_parser_feed(parser, &buffer[0], bytes);
if (bytes < buffer.size()) {
break;
}
}
if (isTxt)
cmark_parser_feed(parser, "\n```\n", 5);
cmark_node* root = cmark_parser_finish(parser);
if (root) {
processNode(root);
cmark_node_free(root);
}
fclose(fp);
}
else {
clear();
addText("File not found:");
addBreak();
addCodeBlock(file);
}
cmark_parser_free(parser);
relayout();
FileChange();
}
private:
void layoutElements(int width,
std::function<void(const gfx::Rect& bounds,
Widget* child)> callback) {
const WidgetsList& children = this->children();
const gfx::Rect cpos = childrenBounds();
gfx::Point p = cpos.origin();
int maxH = 0;
int itemLevel = 0;
Widget* prevChild = nullptr;
for (auto child : children) {
gfx::Size sz = child->sizeHint(gfx::Size(width, 0));
bool isBreak = (dynamic_cast<Break*>(child) ? true: false);
bool isOpenList = (dynamic_cast<OpenList*>(child) ? true: false);
bool isCloseList = (dynamic_cast<CloseList*>(child) ? true: false);
bool isItem = (dynamic_cast<Item*>(child) ? true: false);
if (isOpenList) {
++itemLevel;
}
else if (isCloseList) {
--itemLevel;
}
else if (isItem) {
p.x -= sz.w;
}
if (child->isExpansive() ||
p.x+sz.w > cpos.x+width ||
isBreak || isOpenList || isCloseList) {
p.x = cpos.x + itemLevel*font()->textLength(" - ");
p.y += maxH;
maxH = 0;
prevChild = nullptr;
}
if (child->isExpansive())
sz.w = std::max(sz.w, width);
callback(gfx::Rect(p, sz), child);
if (!isItem) prevChild = child;
if (isBreak) prevChild = nullptr;
maxH = std::max(maxH, sz.h);
p.x += sz.w;
}
}
void onSizeHint(SizeHintEvent& ev) override {
gfx::Size sz;
layoutElements(
View::getView(this)->viewportBounds().w - border().width(),
[&](const gfx::Rect& rc, Widget* child) {
sz.w = std::max(sz.w, rc.x+rc.w-this->bounds().x);
sz.h = std::max(sz.h, rc.y+rc.h-this->bounds().y);
});
sz.w += border().right();
sz.h += border().bottom();
ev.setSizeHint(sz);
}
void onResize(ResizeEvent& ev) override {
setBoundsQuietly(ev.bounds());
layoutElements(
View::getView(this)->viewportBounds().w - border().width(),
[](const gfx::Rect& rc, Widget* child) {
child->setBounds(rc);
});
}
void onPaint(PaintEvent& ev) override {
Graphics* g = ev.graphics();
gfx::Rect rc = clientBounds();
auto skin = (SkinTheme*)theme();
g->fillRect(skin->colors.textboxFace(), rc);
}
bool onProcessMessage(Message* msg) override {
if (msg->type() == kLoadFileMessage) {
loadFile(static_cast<LoadFileMessage*>(msg)->file());
return true;
}
switch (msg->type()) {
case kMouseWheelMessage: {
View* view = View::getView(this);
if (view) {
auto mouseMsg = static_cast<MouseMessage*>(msg);
gfx::Point scroll = view->viewScroll();
if (mouseMsg->preciseWheel())
scroll += mouseMsg->wheelDelta();
else
scroll += mouseMsg->wheelDelta() * textHeight()*3;
view->setViewScroll(scroll);
}
break;
}
}
return Widget::onProcessMessage(msg);
}
void clear() {
// Delete all children
while (firstChild())
delete firstChild();
}
void processNode(cmark_node* root) {
clear();
m_content.clear();
bool inHeading = false;
bool inImage = false;
const char* inLink = nullptr;
cmark_iter* iter = cmark_iter_new(root);
cmark_event_type ev_type;
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cmark_node* cur = cmark_iter_get_node(iter);
switch (cmark_node_get_type(cur)) {
case CMARK_NODE_TEXT: {
const char* text = cmark_node_get_literal(cur);
if (!inImage && text) {
if (inLink) {
if (!m_content.empty() &&
m_content[m_content.size()-1] != ' ') {
m_content += " ";
}
m_content += text;
}
else {
m_content += text;
if (inHeading)
closeContent();
}
}
break;
}
case CMARK_NODE_INLINE_HTML: {
const char* text = cmark_node_get_literal(cur);
if (text && std::strncmp(text, "<br />", 6) == 0) {
closeContent();
addBreak();
}
break;
}
case CMARK_NODE_CODE: {
const char* text = cmark_node_get_literal(cur);
if (text) {
closeContent();
addCodeInline(text);
}
break;
}
case CMARK_NODE_CODE_BLOCK: {
const char* text = cmark_node_get_literal(cur);
if (text) {
closeContent();
addCodeBlock(text);
}
break;
}
case CMARK_NODE_SOFTBREAK: {
m_content += " ";
break;
}
case CMARK_NODE_LINEBREAK: {
closeContent();
addBreak();
break;
}
case CMARK_NODE_LIST: {
if (ev_type == CMARK_EVENT_ENTER) {
closeContent();
addChild(new OpenList);
}
else if (ev_type == CMARK_EVENT_EXIT) {
closeContent();
addChild(new CloseList);
}
break;
}
case CMARK_NODE_ITEM: {
if (ev_type == CMARK_EVENT_ENTER) {
closeContent();
addChild(new Item(" - "));
}
break;
}
case CMARK_NODE_THEMATIC_BREAK: {
if (ev_type == CMARK_EVENT_ENTER) {
closeContent();
addSeparator();
}
else if (ev_type == CMARK_EVENT_EXIT) {
closeContent();
addBreak();
addBreak();
}
break;
}
case CMARK_NODE_HEADING: {
if (ev_type == CMARK_EVENT_ENTER) {
inHeading = true;
closeContent();
addSeparator();
}
else if (ev_type == CMARK_EVENT_EXIT) {
inHeading = false;
closeContent();
addBreak();
addBreak();
}
break;
}
case CMARK_NODE_PARAGRAPH: {
if (ev_type == CMARK_EVENT_EXIT) {
closeContent();
addBreak();
}
break;
}
case CMARK_NODE_IMAGE: {
if (ev_type == CMARK_EVENT_ENTER)
inImage = true;
else if (ev_type == CMARK_EVENT_EXIT)
inImage = false;
}
case CMARK_NODE_LINK: {
if (ev_type == CMARK_EVENT_ENTER) {
inLink = cmark_node_get_url(cur);
if (inLink)
closeContent();
}
else if (ev_type == CMARK_EVENT_EXIT) {
if (inLink) {
if (!m_content.empty()) {
addLink(inLink, m_content);
m_content.clear();
}
}
inLink = nullptr;
}
}
}
}
cmark_iter_free(iter);
closeContent();
}
void closeContent() {
if (!m_content.empty()) {
addText(m_content);
m_content.clear();
}
}
void addSeparator() {
auto sep = new Separator("", HORIZONTAL);
sep->setBorder(gfx::Border(0, font()->height(), 0, font()->height()));
sep->setBgColor(SkinTheme::instance()->colors.textboxFace());
sep->setExpansive(true);
addChild(sep);
}
void addBreak() {
addChild(new Break);
}
void addText(const std::string& content) {
std::vector<std::string> words;
base::split_string(content, words, " ");
for (const auto& word : words)
if (!word.empty()) {
Label* label;
if (word.size() > 4 &&
std::strncmp(word.c_str(), "http", 4) == 0)
label = new LinkLabel(word);
else
label = new Label(word);
// Uncomment this line to debug labels
//label->setBgColor(gfx::rgba((rand()%128)+128, 128, 128));
addChild(label);
}
}
void addCodeInline(const std::string& content) {
auto label = new Label(content);
label->setBgColor(SkinTheme::instance()->colors.textboxCodeFace());
addChild(label);
}
void addCodeBlock(const std::string& content) {
auto textBox = new TextBox(content, LEFT);
textBox->setBorder(gfx::Border(4*guiscale()));
textBox->setBgColor(SkinTheme::instance()->colors.textboxCodeFace());
addChild(textBox);
}
void addLink(const std::string& url, const std::string& text) {
auto label = new LinkLabel(url, text);
if (url.find(':') == std::string::npos) {
label->setUrl("");
label->Click.connect(
[this, url]{
Message* msg = new LoadFileMessage(url);
msg->addRecipient(this);
Manager::getDefault()->enqueueMessage(msg);
});
}
// Uncomment this line to debug labels
//label->setBgColor(gfx::rgba((rand()%128)+128, 128, 128));
addChild(label);
}
void relayout() {
layout();
auto view = View::getView(this);
if (view) {
view->updateView();
view->setViewScroll(gfx::Point(0, 0));
}
invalidate();
}
std::string m_file;
std::string m_content;
};
BrowserView::BrowserView()
: m_textBox(new CMarkBox)
{
SkinTheme* theme = static_cast<SkinTheme*>(this->theme());
addChild(&m_view);
m_view.attachToView(m_textBox);
m_view.setExpansive(true);
m_view.setProperty(SkinStylePropertyPtr(
new SkinStyleProperty(theme->styles.workspaceView())));
m_textBox->FileChange.connect(
[]{
App::instance()->workspace()->updateTabs();
});
}
BrowserView::~BrowserView()
{
delete m_textBox;
}
void BrowserView::loadFile(const std::string& file)
{
m_textBox->loadFile(file);
}
std::string BrowserView::getTabText()
{
return base::get_file_title(m_textBox->file());
}
TabIcon BrowserView::getTabIcon()
{
return TabIcon::NONE;
}
WorkspaceView* BrowserView::cloneWorkspaceView()
{
return new BrowserView();
}
void BrowserView::onWorkspaceViewSelected()
{
}
bool BrowserView::onCloseView(Workspace* workspace, bool quitting)
{
workspace->removeView(this);
return true;
}
void BrowserView::onTabPopup(Workspace* workspace)
{
Menu* menu = AppMenus::instance()->getTabPopupMenu();
if (!menu)
return;
menu->showPopup(ui::get_mouse_position());
}
} // namespace app

46
src/app/ui/browser_view.h Normal file
View File

@ -0,0 +1,46 @@
// Aseprite
// Copyright (C) 2016 David Capello
//
// This program is distributed under the terms of
// the End-User License Agreement for Aseprite.
#ifndef APP_UI_BROWSER_VIEW_H_INCLUDED
#define APP_UI_BROWSER_VIEW_H_INCLUDED
#pragma once
#include "app/ui/tabs.h"
#include "app/ui/workspace_view.h"
#include "ui/view.h"
namespace app {
class BrowserView : public ui::Widget
, public TabView
, public WorkspaceView {
public:
BrowserView();
~BrowserView();
void loadFile(const std::string& file);
// TabView implementation
std::string getTabText() override;
TabIcon getTabIcon() override;
// WorkspaceView implementation
ui::Widget* getContentWidget() override { return this; }
bool canCloneWorkspaceView() override { return true; }
WorkspaceView* cloneWorkspaceView() override;
void onWorkspaceViewSelected() override;
bool onCloseView(Workspace* workspace, bool quitting) override;
void onTabPopup(Workspace* workspace) override;
private:
class CMarkBox;
ui::View m_view;
CMarkBox* m_textBox;
};
} // namespace app
#endif

View File

@ -170,6 +170,7 @@ Editor::Editor(Document* document, EditorFlags flags)
, m_flags(flags)
, m_secondaryButton(false)
, m_aniSpeed(1.0)
, m_isPlaying(false)
{
m_proj.setPixelRatio(m_sprite->pixelRatio());
@ -1775,8 +1776,11 @@ void Editor::play(const bool playOnce,
if (!m_state)
return;
if (!dynamic_cast<PlayState*>(m_state.get()))
setState(EditorStatePtr(new PlayState(playOnce, playAll)));
if (m_isPlaying)
stop();
m_isPlaying = true;
setState(EditorStatePtr(new PlayState(playOnce, playAll)));
}
void Editor::stop()
@ -1785,13 +1789,21 @@ void Editor::stop()
if (!m_state)
return;
if (dynamic_cast<PlayState*>(m_state.get()))
backToPreviousState();
if (m_isPlaying) {
while (m_state && !dynamic_cast<PlayState*>(m_state.get()))
backToPreviousState();
m_isPlaying = false;
ASSERT(m_state && dynamic_cast<PlayState*>(m_state.get()));
if (m_state)
backToPreviousState();
}
}
bool Editor::isPlaying() const
{
return (dynamic_cast<PlayState*>(m_state.get()) != nullptr);
return m_isPlaying;
}
void Editor::showAnimationSpeedMultiplierPopup(Option<bool>& playOnce,

View File

@ -336,6 +336,7 @@ namespace app {
// Animation speed multiplier.
double m_aniSpeed;
bool m_isPlaying;
static doc::ImageBufferPtr m_renderBuffer;

View File

@ -17,6 +17,7 @@
#include "app/modules/editors.h"
#include "app/notification_delegate.h"
#include "app/pref/preferences.h"
#include "app/ui/browser_view.h"
#include "app/ui/color_bar.h"
#include "app/ui/context_bar.h"
#include "app/ui/document_view.h"
@ -94,6 +95,7 @@ MainWindow::MainWindow()
: m_mode(NormalMode)
, m_homeView(nullptr)
, m_scalePanic(nullptr)
, m_browserView(nullptr)
#ifdef ENABLE_SCRIPTING
, m_devConsoleView(nullptr)
#endif
@ -167,6 +169,12 @@ MainWindow::~MainWindow()
}
#endif
if (m_browserView) {
if (m_browserView->parent())
m_workspace->removeView(m_browserView);
delete m_browserView;
}
if (m_homeView) {
if (m_homeView->parent())
m_workspace->removeView(m_homeView);
@ -247,6 +255,19 @@ bool MainWindow::isHomeSelected()
return (m_tabsBar->getSelectedTab() == m_homeView && m_homeView);
}
void MainWindow::showBrowser(const std::string& filename)
{
if (!m_browserView)
m_browserView = new BrowserView;
m_browserView->loadFile(filename);
if (!m_browserView->parent()) {
m_workspace->addView(m_browserView);
m_tabsBar->selectTab(m_browserView);
}
}
void MainWindow::showDevConsole()
{
#ifdef ENABLE_SCRIPTING

View File

@ -23,6 +23,7 @@ namespace app {
class CheckUpdateDelegate;
#endif
class BrowserView;
class ColorBar;
class ContextBar;
class DevConsoleView;
@ -70,6 +71,7 @@ namespace app {
void showHome();
bool isHomeSelected();
void showDevConsole();
void showBrowser(const std::string& filename);
Mode getMode() const { return m_mode; }
void setMode(Mode mode);
@ -116,6 +118,7 @@ namespace app {
HomeView* m_homeView;
Notifications* m_notifications;
INotificationDelegate* m_scalePanic;
BrowserView* m_browserView;
#ifdef ENABLE_SCRIPTING
DevConsoleView* m_devConsoleView;
#endif

View File

@ -686,8 +686,9 @@ void SkinTheme::initWidget(Widget* widget)
break;
case kTextBoxWidget:
BORDER(0);
BORDER(4*guiscale());
widget->setChildSpacing(0);
widget->setBgColor(colors.textboxFace());
break;
case kViewWidget:
@ -1042,20 +1043,24 @@ void SkinTheme::paintLinkLabel(PaintEvent& ev)
Graphics* g = ev.graphics();
Widget* widget = static_cast<Widget*>(ev.getSource());
Style* style = styles.link();
gfx::Rect bounds = widget->clientBounds();
Rect text, rc = widget->clientBounds();
gfx::Color bg = BGCOLOR;
SkinStylePropertyPtr styleProp = widget->getProperty(SkinStyleProperty::Name);
if (styleProp)
style = styleProp->getStyle();
if (!is_transparent(bg))
g->fillRect(bg, rc);
rc.shrink(widget->border());
Style::State state;
if (widget->hasMouseOver()) state += Style::hover();
if (widget->isSelected()) state += Style::clicked();
if (!widget->isEnabled()) state += Style::disabled();
g->fillRect(bg, bounds);
style->paint(g, bounds, widget->text().c_str(), state);
widget->getTextIconInfo(nullptr, &text);
style->paint(g, text, widget->text().c_str(), state);
}
void SkinTheme::paintListBox(PaintEvent& ev)
@ -1528,8 +1533,7 @@ void SkinTheme::paintTextBox(ui::PaintEvent& ev)
Widget* widget = static_cast<Widget*>(ev.getSource());
drawTextBox(g, widget, NULL, NULL,
colors.textboxFace(),
colors.textboxText());
BGCOLOR, colors.textboxText());
}
void SkinTheme::paintView(PaintEvent& ev)

View File

@ -1319,6 +1319,7 @@ void Timeline::onAddLayer(doc::DocumentEvent& ev)
regenerateLayers();
showCurrentCel();
clearClipboardRange();
invalidate();
}
@ -1346,6 +1347,7 @@ void Timeline::onAfterRemoveLayer(doc::DocumentEvent& ev)
regenerateLayers();
showCurrentCel();
clearClipboardRange();
invalidate();
}

View File

@ -352,6 +352,17 @@ void ToolBar::onPaint(ui::PaintEvent& ev)
}
}
void ToolBar::onVisible(bool visible)
{
Widget::onVisible(visible);
if (!visible) {
if (m_popupWindow) {
closePopupWindow();
closeTipWindow();
}
}
}
int ToolBar::getToolGroupIndex(ToolGroup* group)
{
ToolBox* toolbox = App::instance()->toolBox();
@ -377,11 +388,7 @@ void ToolBar::openPopupWindow(int group_index, ToolGroup* tool_group)
m_closeConn.disconnect();
onClosePopup();
// Close the current popup window
m_popupWindow->closeWindow(NULL);
delete m_popupWindow;
m_popupWindow = NULL;
closePopupWindow();
}
// Close tip window
@ -435,6 +442,15 @@ void ToolBar::openPopupWindow(int group_index, ToolGroup* tool_group)
toolstrip->setBounds(rc);
}
void ToolBar::closePopupWindow()
{
if (m_popupWindow) {
m_popupWindow->closeWindow(nullptr);
delete m_popupWindow;
m_popupWindow = nullptr;
}
}
Rect ToolBar::getToolGroupBounds(int group_index)
{
ToolBox* toolbox = App::instance()->toolBox();

View File

@ -51,10 +51,12 @@ namespace app {
bool onProcessMessage(ui::Message* msg) override;
void onSizeHint(ui::SizeHintEvent& ev) override;
void onPaint(ui::PaintEvent& ev) override;
void onVisible(bool visible) override;
private:
int getToolGroupIndex(tools::ToolGroup* group);
void openPopupWindow(int group_index, tools::ToolGroup* group);
void closePopupWindow();
gfx::Rect getToolGroupBounds(int group_index);
gfx::Point getToolPositionInGroup(int group_index, tools::Tool* tool);
void openTipWindow(int group_index, tools::Tool* tool);

View File

@ -120,7 +120,7 @@ bool handle_dde_messages(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, LRES
case WM_DDE_INITIATE: {
HWND clienthwnd = (HWND)wparam;
UINT appAtom = 0, topicAtom = 0;
UINT_PTR appAtom = 0, topicAtom = 0;
if (!UnpackDDElParam(msg, lparam,
&appAtom,
&topicAtom))

View File

@ -85,7 +85,7 @@ void drawTextBox(Graphics* g, Widget* widget,
View* view = View::getView(widget);
char* text = const_cast<char*>(widget->text().c_str());
char* beg, *end;
int x1, y1, x2, y2;
int x1, y1;
int x, y, chr, len;
gfx::Point scroll;
int textheight = widget->textHeight();
@ -100,14 +100,10 @@ void drawTextBox(Graphics* g, Widget* widget,
}
else {
vp = widget->clientBounds();
vp.w -= widget->border().width();
vp.h -= widget->border().height();
scroll.x = scroll.y = 0;
}
x1 = widget->clientBounds().x;
y1 = widget->clientBounds().y;
x2 = vp.x + vp.w;
y2 = vp.y + vp.h;
x1 = widget->clientBounds().x + widget->border().left();
y1 = widget->clientBounds().y + widget->border().top();
// Fill background
if (g)
@ -117,7 +113,7 @@ void drawTextBox(Graphics* g, Widget* widget,
// Without word-wrap
if (!(widget->align() & WORDWRAP)) {
width = widget->clientBounds().w;
width = widget->clientChildrenBounds().w;
}
// With word-wrap
else {
@ -139,6 +135,7 @@ void drawTextBox(Graphics* g, Widget* widget,
else {
width = vp.w;
}
width -= widget->border().width();
#endif
}
}
@ -167,7 +164,7 @@ void drawTextBox(Graphics* g, Widget* widget,
}
// To here we can print
if ((old_end) && (x+font->textLength(beg) > x1-scroll.x+width)) {
if ((old_end) && (x+font->textLength(beg) > x1+width-scroll.x)) {
if (end)
*end = chr;
@ -206,7 +203,7 @@ void drawTextBox(Graphics* g, Widget* widget,
else // Left align
xout = x;
g->drawUIString(beg, fg, gfx::ColorNone, gfx::Point(xout, y));
g->drawString(beg, fg, gfx::ColorNone, gfx::Point(xout, y));
}
if (w)

View File

@ -192,12 +192,16 @@ void Widget::setVisible(bool state)
if (hasFlags(HIDDEN)) {
disableFlags(HIDDEN);
invalidate();
onVisible(true);
}
}
else {
if (!hasFlags(HIDDEN)) {
manager()->freeWidget(this); // Free from manager
enableFlags(HIDDEN);
onVisible(false);
}
}
}
@ -1443,6 +1447,11 @@ void Widget::onSetDecorativeWidgetBounds()
}
}
void Widget::onVisible(bool visible)
{
// Do nothing
}
void Widget::onEnable(bool enabled)
{
// Do nothing

View File

@ -372,6 +372,7 @@ namespace ui {
virtual void onBroadcastMouseMessage(WidgetsList& targets);
virtual void onInitTheme(InitThemeEvent& ev);
virtual void onSetDecorativeWidgetBounds();
virtual void onVisible(bool visible);
virtual void onEnable(bool enabled);
virtual void onSelect(bool selected);
virtual void onSetText();

View File

@ -86,3 +86,21 @@ if(NOT USE_SHARED_FREETYPE)
endif()
add_subdirectory(simpleini)
# Add cmark without tests
set(CMARK_TESTS OFF CACHE BOOL "Build cmark tests and enable testing")
add_subdirectory(cmark)
set(cmark_headers
${CMAKE_CURRENT_SOURCE_DIR}/cmark/src/cmark.h
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_export.h
${CMAKE_CURRENT_BINARY_DIR}/cmark/src/cmark_version.h)
foreach(fn ${cmark_headers})
get_filename_component(fn_name "${fn}" NAME)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
COMMAND ${CMAKE_COMMAND} -E copy ${fn} ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name}
MAIN_DEPENDENCY ${fn})
list(APPEND copy_cmark_headers ${CMAKE_CURRENT_BINARY_DIR}/cmark/${fn_name})
endforeach()
add_custom_target(copy_cmark_headers DEPENDS ${copy_cmark_headers})
add_dependencies(libcmark_static copy_cmark_headers)

1
third_party/cmark vendored Submodule

@ -0,0 +1 @@
Subproject commit 5255e2d5717dc7a265ca79404d387ef8abe8c004