Commit Graph

207 Commits

Author SHA1 Message Date
Axel Dörfler
4efb3cc0f4 Now also support reading in cursor images (.CUR files seem to have the same
format as .ICO files). Now ignores the alpha channel mask if it couldn't be
read completely instead of not being able to read the image at all.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-14 15:09:46 +00:00
Axel Dörfler
9cbe0af410 Identify() returned wrong MIME type.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 04:35:44 +00:00
Axel Dörfler
fbef8d31d3 Added support for the "/documentCount" and "/documentIndex" extension used
by the TIFF translator. Thanks again to BiPolar for the note about this.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 03:38:15 +00:00
Axel Dörfler
5fa46a457c Reading 24 bit images was broken - thanks to BiPolar for finding and reporting this.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 03:18:07 +00:00
Axel Dörfler
5ff65f9b40 Added a work-around for broken ICO files that report a wrong icon height.
Fixed a wrong return code in case writing file data failed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-10 18:52:52 +00:00
Axel Dörfler
c59cdc87d9 Added some not-yet-connected configuration check boxes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-09 18:28:55 +00:00
Axel Dörfler
36129be090 Fixed/implemented support for reading and writing true color ICO images.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-09 16:52:39 +00:00
Axel Dörfler
79b649126a Fine tuned the alpha channel handling - it should now work as expected,
even with stupid apps like ArtPaint that use the alpha channel with
B_RGB32 bitmaps.
May now need some work for apps that use B_RGB32 as it should be used, though :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-08 16:58:16 +00:00
Axel Dörfler
2b05778c88 Translator for Windows ICO files with read/write support. Not yet complete, but
seems to work for all cases I tested it with :)
Now you can finally create favicon.ico files under BeOS :))


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-08 15:12:57 +00:00
Matthew Wilber
dfb8c585c6 Updated with new Translation Kit version macro names.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-05 18:22:17 +00:00
Axel Dörfler
b0e067b804 Fixed a bug in write_unicode_char() - it returned the size of the character
not how many bytes were actually written (which could differ with newlines
and indention).
Now use the new rgb_color == operator instead of a memcmp().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-21 02:00:16 +00:00
Axel Dörfler
0bf9534d45 Now stacks up group text_runs correctly - previously, the run on the stack could
still be changed by the new group (which lead, surprisingly, to wrong results :).
Added \line and \'hh commands (first part of charset support beyond plain ASCII).
Renamed GetStyle() to PrepareTextRun().
Added some support functions to copy and compare text_runs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 23:55:39 +00:00
Axel Dörfler
37ec8144ed The \'hh command is now also correctly interpreted (it's not a standard command).
The Text class no longer likes '\n' and '\r' and will throw those away happily.
parse_integer() can now parse integers with different radix.
Improved debug output a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 23:46:08 +00:00
Axel Dörfler
8bf6d9ff50 No longer uses the RTF::Iterator to process the document; it now subclasses
the RTF::Worker for this task (TextOutput).
Cleaned the sources a bit, TextOutput now also contains the functionality
of the former AppServerConnection class.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 10:13:32 +00:00
Axel Dörfler
63c6a88ba0 Added a simple RTF::Worker class that can be subclassed in order to work
with the RTF document step by step.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 10:10:46 +00:00
Axel Dörfler
9932029846 Extended support of RTF features. Ie. the conversion/group context is now
maintained, and should work more or less correctly.
Monospaced fonts can now be chosen (the font table is partially parsed),
italics works, and many other things.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10567 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 08:38:48 +00:00
Axel Dörfler
e815584a4f We're not really yet version 1.0.0 :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 08:34:23 +00:00
Axel Dörfler
e709e3665e The parser now uses a BBufferIO stream to speed things up.
Text::Parse() now converts bigger chunks at once.
Default RTF element destination is visible in text now, only known
other destinations are marked that way (using a lookup table).
Added virtual method IsDefinitionDelimiter() to Element to make
definition iterating nicer.
";" now always forms a separated Text object - this fixes the
definition handling.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10565 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 08:33:19 +00:00
Axel Dörfler
64214d4cce Mostly adapted to the refactored RTF classes hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 02:04:44 +00:00
Axel Dörfler
a7e0bca0f7 Refactored the code: put everything in the RTF namespace, separated group
functions from the former RTFElement (now RTF::Element).
Put the parsing basics into a separate class RTF::Parser (used to be in
the static RTFHeader::Parse()).
RTF::Header is now always correctly set to RTF::TEXT_DESTINATION.
Some minor other related changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-03 02:03:34 +00:00
Axel Dörfler
40d9768b92 Added a simple RTF translator.
It only supports colors and bold fonts beside plain ASCII text, but it's a
start.
The RTF* class hierarchy should get a cleanup, though (and will soon).
You'll need Haiku's StyledEdit to make use of this translator.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-02 23:28:30 +00:00
shatty
202669bf0c suppress warnings for imported code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-22 00:48:40 +00:00
shatty
a680194343 suppress warnings on imported code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-21 09:12:08 +00:00
shatty
4d13b0dee0 openbeos packages become haiku packages
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-17 00:39:28 +00:00
Matthew Wilber
846b4a22f5 Corrected comment to match new location of StreamBuffer
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-24 16:42:45 +00:00
Matthew Wilber
8a2b9ae571 Updated with the new location of the StreamBuffer files
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-13 21:31:29 +00:00
Matthew Wilber
7fb3685ba6 Fixed low-depth grayscale issue, PNGTranslator can now read grayscale PNG images that are less than 8 bpp
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 23:09:19 +00:00
Matthew Wilber
efbdb56bb0 Added comments to clarify transparency features of PNG images
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-23 21:48:17 +00:00
Matthew Wilber
e2ed67d283 removed debugger call
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7272 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 00:08:28 +00:00
Matthew Wilber
9f33f8e014 Disabled support for grayscale images with bit depths less than 8. This is because libpng does not support these images when it does gray to RGB conversion. Will need to enhance libpng or add workarounds to PNGTranslator to fix this issue.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 19:59:10 +00:00
Matthew Wilber
5a253979d3 Fixed window title to match Be's version, removed bits->bits translation code (this should be handled in the BaseTranslator.cpp anyway) and removed hardcoding of config view bg color
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:12:13 +00:00
Matthew Wilber
2058c6c754 Changed window title to be consistent with the other translators
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:09:40 +00:00
Matthew Wilber
3d5b4968bd Fixed window title to match Be's version
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:08:35 +00:00
Matthew Wilber
c1a96ad26c Made window title just like Be's, removed bits->bits translation code (should never be called, this case should be handled in BaseTranslator.cpp), fixed hardcoding of config view bg color
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:06:40 +00:00
Matthew Wilber
edd8878638 Changed to use shared translator code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:03:52 +00:00
Matthew Wilber
54abea93f0 Changed to use shared translator code, these files are no longer needed
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-02 23:49:10 +00:00
Matthew Wilber
862e3ac371 Changed to use shared translator code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-02 23:48:26 +00:00
Matthew Wilber
a1fd38b277 changed to use shared translator code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 04:38:21 +00:00
Matthew Wilber
c36e6575c8 moved translate_direct_copy function from PNGTranslator to BaseTranslator
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6841 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 04:23:26 +00:00
Matthew Wilber
d02fdb8eb5 Fixed bug preventing PNGTranslator from opening PNG images, fixed version number text in config panel
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 03:16:34 +00:00
Matthew Wilber
40bf8c0ae5 Changed to use shared translator code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 02:58:18 +00:00
Matthew Wilber
8d21fd135f Corrected a few comments
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 01:43:25 +00:00
Matthew Wilber
ec5034e71f Changed to use shared translator code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 01:42:01 +00:00
Matthew Wilber
8241861213 improved magic number variable names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-01 01:40:02 +00:00
Matthew Wilber
51c15c1cad Changed TGATranslator to use shared translator code instead of duplicating code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6818 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-29 19:32:34 +00:00
Matthew Wilber
c56079fb22 Initial checking for shared translator code. Many of the translators share many lines of the same code. This code helps eliminate duplicate code, and should help the process of making translators easier
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-29 19:29:57 +00:00
Matthew Wilber
8dee39bf9a Removed GPL text as permission was obtained from Michael Sweet to allow this derivative work to be distributed under the OpenBeOS license.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-03 00:52:18 +00:00
Matthew Wilber
b309d0de79 Fixed version number calculations, disabled headerOnly and dataOnly options
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6474 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-03 00:29:01 +00:00
Matthew Wilber
f29673f8ae Initial check in for Stephan Assmus' SGITranslator
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-02 23:55:38 +00:00
Matthew Wilber
fbf9f5c51e added SGITranslator
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-02 23:53:54 +00:00