Ray Greenwell
79c6427c21
StringBuffer -> StringBuilder.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4191 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-13 22:42:20 +00:00
Michael Bayne
6deb8cd2cf
RandomUtil moved to samskivert library.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4188 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-06-13 18:03:48 +00:00
Mike Thomas
053c1bfe31
Use paint instead of getSnapshot on underlying mirages in composite mirage as it might save us creating an image object.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4092 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-05 01:30:14 +00:00
Mike Thomas
81d26ec622
Dispose of graphics object when done in getSnapshot, and use simpler version of drawImage.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4091 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-05 00:17:42 +00:00
Mike Thomas
2b98453e38
New type of mirage that simply draws a list of mirages one on top of the other(s).
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4090 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-05-04 23:41:41 +00:00
Ray Greenwell
6ddcb0c40e
Remove trailing blank line I added when I was fighting with svn.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-21 23:45:59 +00:00
Ray Greenwell
ba72823bcc
I'm trying to fix the inconsistent line error so that this can be
...
checked out elsewhere.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-18 20:54:56 +00:00
Ray Greenwell
4b384ce89e
re-add
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-18 20:43:37 +00:00
Ray Greenwell
82488226d4
remove/re-add
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-18 20:43:03 +00:00
Ray Greenwell
92f86774ba
Fixed integer overflow that caused incorrect quantization of large images,
...
or an image with a lot of a particular color.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-18 20:35:28 +00:00
Michael Bayne
5a2583470c
Brought code in line with changes to Samskivert. I have not started to
...
genericize Narya data structures, nor make the existing code type safe. That's
going to be an extremely large project.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-10 08:59:30 +00:00
Mike Thomas
95ff914ab6
Deal with blank tiles by returning a 1x1 blank pixel rather than a bunch of invalid values.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3965 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-03-21 02:32:27 +00:00
Michael Bayne
7422b1e986
Expose getColorRecord() as it is needed externally.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3955 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-03-17 00:56:57 +00:00
Michael Bayne
596d2a4708
blank() -> isBlank().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-11-09 04:00:16 +00:00
Michael Bayne
4dba269585
Finished support for shadows. This is all some seriously complicated shit, but
...
the shadows sure look cool.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3740 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-20 22:12:45 +00:00
Ray Greenwell
8ca6e7a17c
Preconcatenate the translation into the transform so that we have
...
that in there for hitTest().
(Note: a lot of what's going on in this class is untested beyond what
I need right now).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3737 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-19 18:46:49 +00:00
Ray Greenwell
4848a3e2ca
A TransformedMirage is another mirage that is transformed by any
...
AffineTransform.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3736 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-19 18:28:40 +00:00
Michael Bayne
dd2468b140
Javadoc tidying up.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3725 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-08 22:21:19 +00:00
Michael Bayne
1631093451
No longer insist that we ask the AWT to create optimal images. Instead an
...
interface is provided that does that in a pluggable manner.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3720 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-10-05 01:39:45 +00:00
Michael Bayne
6474d7de7e
Don't assume we have an image manager or that we care about "compatible"
...
images.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3632 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-06-28 21:18:43 +00:00
Michael Bayne
f00cbd2b3b
Allow outline images to be created without an image manager.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3412 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-17 21:46:43 +00:00
Ted V
ebf4d7cfa2
Now throws the proper type of exception when a color name lookup fails.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-16 22:21:01 +00:00
Ted V
785259a4a8
Quite obviously the parsing should check for integers, not bytes.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 21:44:35 +00:00
Ted V
d618c12c93
Added accessor function that handles color name -> id lookups.
...
Could be made faster with some sort of reverse string lookup table,
but it doesn't seem worth the overhead right now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 20:53:49 +00:00
Michael Bayne
afabea71ad
Big fat Bernie javadoc cleanup.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-24 23:08:21 +00:00
Michael Bayne
f74f390025
Don't modify the array passed in by the caller.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3126 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-09-29 01:54:14 +00:00
Ray Greenwell
9470ab69bd
Color classes can have a default color.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3109 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-30 22:07:33 +00:00
Michael Bayne
1f8c4578b7
LGPLed the library. Hello world.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3098 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:12:55 +00:00
Michael Bayne
1da753e14d
Brought things up to date with the latest Jakarta Commons world order.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-13 16:34:49 +00:00
Michael Bayne
d618d3c771
Eclipse suggested cleanup.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Michael Bayne
7056f6dfac
Log a warning and return null.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-22 19:57:16 +00:00
Michael Bayne
fbd52c2be3
Tone down cache performance reporting; upped image cache size by a meg.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2730 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-28 04:06:14 +00:00
Michael Bayne
25ebfba64f
For some strange reason, reusing Colorization instances causes character
...
creation to break.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2675 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 18:06:57 +00:00
Michael Bayne
28a9441143
Allow the ImageManager to function if we're running in headless mode. It
...
will create all images as 32-bit ARGB.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2674 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 17:59:04 +00:00
Michael Bayne
52e5206ff4
Keep a single colorization record around for each ColorRecord rather than
...
creating the same Colorization instance over and over each time we're
asked for one.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2641 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-05 17:31:21 +00:00
Ray Greenwell
35f7f0806b
Make sure that the transparent color is first in the colormap so that
...
Java's png encoder doesn't get confused and merge black pixels into
the transparency.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2636 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-04 05:56:58 +00:00
Michael Bayne
73a4a02aa1
A few substantial changes:
...
- Tiles are initialized after being constructed which makes life simpler
for custom tiles which no longer have to have their own constructor that
passes Tile's stuff down to it.
- Tiles are no longer LRU cached (because we blow through that cache
instantly on all but the smallest of scenes), and are now tracked by
weak references so that we guarantee that only one instance of a tile is
ever in memory.
- Added code to track and report memory usage of weak cached tiles as well
as "stray" tiles which are created through other means than asking a
TileSet for a tile (fringe tiles being the most prolific example).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:56:38 +00:00
Ray Greenwell
3f0d839400
Noted that I had changed the QUICK constant to false.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2625 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 03:08:37 +00:00
Ray Greenwell
c941c96141
Color reduction algorithm. From web, with modifications to support
...
transparency.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2624 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 03:02:38 +00:00
Michael Bayne
684102f32e
Use mirages in tileImage*.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2550 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 19:14:38 +00:00
Ray Greenwell
e174e71b8a
Subsumed tileImageAcross and tileImageDown into the new tileImage.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 01:48:27 +00:00
Michael Bayne
6669e39a8e
Added other forms of getPreparedImage();
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2529 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:09:28 +00:00
Michael Bayne
c7765a9862
Added getPreparedImage().
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2528 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 22:59:20 +00:00
Michael Bayne
72768a3a9e
More synchronization is needed! The dangers of multithreaded programming.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2485 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 17:38:06 +00:00
Michael Bayne
5c03adbb72
Added support for temporarily disabling image and tile cache flushing.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2483 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 07:33:15 +00:00
Michael Bayne
8973ca0d8c
Make ImageDataProvider responsible for loading the actual image instead of
...
returning an ImageInputStream.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:33:11 +00:00
Michael Bayne
a4e09831c5
The amazing fast image loading extravaganza. Images load in 1/4th the time
...
and generate almost zero garbage during the loading process (unlike the
ImageIO loaders which practically generate an entire image worth of
garbage during the load).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2474 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 06:32:15 +00:00
Michael Bayne
8bab0bd281
Added useful debug logging.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2463 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 22:12:14 +00:00
Michael Bayne
90391aa69d
Synchronize access to the image cache so that we can load images on other
...
threads.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2459 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 18:21:28 +00:00
Michael Bayne
2f80c9b057
Removed obsolete image loaders.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2456 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 15:51:49 +00:00