Commit graph

549 commits

Author SHA1 Message Date
Brad Hards 642a841840 Add document synopsis for XPS.
I don't have a lot of documents that actually have a document
structure - it is optional in XPS. In fact, I did this code on just
one file - the XPS 1.0 spec itself.

CCMAIL: jiri.klement@gmail.com

svn path=/trunk/playground/graphics/okular/; revision=635167
2007-02-19 10:43:40 +00:00
Brad Hards f749c5dc22 Minor rethink on the colour parsing. If we have separate methods for
Pen and Brush, we can make sure that references make sense for the
kind of colour we're providing.

These might be candidates for more shared code later.


svn path=/trunk/playground/graphics/okular/; revision=634451
2007-02-17 11:18:06 +00:00
Brad Hards 999967935e Implement pen colour and size (Stroke and StrokeThickness
attributes). This allows us to correctly show objects that have an
outline (pen) colour that is different to the fill colour.

svn path=/trunk/playground/graphics/okular/; revision=634439
2007-02-17 10:45:07 +00:00
Brad Hards e29e44ff89 Store away the digital signature origin.
This prevents a warning on loading files containing
signatures, and is also a start towards proper handling
of digital signatures.

svn path=/trunk/playground/graphics/okular/; revision=634423
2007-02-17 09:56:08 +00:00
Brad Hards d5ec64e34c Add support for the Opacity attribute.
This allows the WPF_ZTRANS_001 example to render correctly
(with the green of the D showing through the number 2 shape).
There is still a problem with that example - it looks like
we aren't rendering the pen correctly.

CCMAIL: jiri.klement@gmail.com

svn path=/trunk/playground/graphics/okular/; revision=634416
2007-02-17 09:42:15 +00:00
Jiri Klement dbe7fea25a Fix memory leaks
svn path=/trunk/playground/graphics/okular/; revision=633346
2007-02-13 21:13:08 +00:00
Jiri Klement 065287322a Share fonts in whole xpsfile (not only xpspage)
svn path=/trunk/playground/graphics/okular/; revision=633189
2007-02-13 13:26:37 +00:00
Jiri Klement 1c545fb8cb Text extraction support
svn path=/trunk/playground/graphics/okular/; revision=633154
2007-02-13 11:13:35 +00:00
Jiri Klement 4ea8794f52 ImageBrush rendering element: support for Viewbox, Viewport, Transform
svn path=/trunk/playground/graphics/okular/; revision=632844
2007-02-12 13:31:16 +00:00
Pino Toscano 90f1a9f5be properly use of loadDocument()/closeDocument()
svn path=/trunk/playground/graphics/okular/; revision=632333
2007-02-10 17:47:44 +00:00
Jiri Klement c8adc05145 Fix font size
svn path=/trunk/playground/graphics/okular/; revision=632330
2007-02-10 17:41:11 +00:00
Jiri Klement f0eaa1fbff Rewrite of page rendering. Now it respects context and actual work is done at the end of element so child elements are taken into account
svn path=/trunk/playground/graphics/okular/; revision=632324
2007-02-10 17:31:25 +00:00
Jiri Klement 411bf7d873 Fix separation of graphics elements (settings for path could affect glyphs)
svn path=/trunk/playground/graphics/okular/; revision=631815
2007-02-09 08:22:06 +00:00
Jiri Klement 55d67b9034 Fix memory leaks
svn path=/trunk/playground/graphics/okular/; revision=631812
2007-02-09 08:11:47 +00:00
Jiri Klement 03dc9c916c Page is now rendered on screen size so no additional scaling is necessary - better looking and faster rendering
svn path=/trunk/playground/graphics/okular/; revision=631669
2007-02-08 18:09:15 +00:00
Jiri Klement 74e912ea1f SVN_SILENT fix intendation
svn path=/trunk/playground/graphics/okular/; revision=631640
2007-02-08 16:41:53 +00:00
Jiri Klement 1de57323db Optimalize document loading. Now is used SAX instead of DOM for getting page size which reduced time to load document few times
svn path=/trunk/playground/graphics/okular/; revision=631634
2007-02-08 16:20:55 +00:00
Jiri Klement 53122db23d parseAbbreviatedData has be rewritten, now it supports almost all commands(except arc)
svn path=/trunk/playground/graphics/okular/; revision=631602
2007-02-08 15:07:54 +00:00
Brad Hards 8f3336d252 Patch from Jiri Klement, which fixes:
1) Loading of obfuscated fonts
2) Segmentation fault when xps document was opened and then another
xps documen was opend.
3) Load font only once, not everytime it's used

Also some white space changes from xemacs.

CCMAIL: jiri.klement@gmail.com

svn path=/trunk/playground/graphics/okular/; revision=630741
2007-02-06 07:07:23 +00:00
Pino Toscano 6068c76df6 Merge the new functions of ThreadedGenerator into the base Generator: this means that there's again only a single base Generator that can provide the multithreading for the generation of contents, just pixmaps for now.
svn path=/trunk/playground/graphics/okular/; revision=628853
2007-01-31 18:31:19 +00:00
Tobias Koenig baf1fb2870 Several changes:
- renamed signalRequestDone to signalPixmapRequestDone to allow a future signalTextPageRequestDone
  - added error/warning/notice signals to TextDocumentConverter and add meaningful error messages
    to ooo and fictionbook generator
  - code cleanup in chm generator
  - print improvements and error notification in kimgio generator

svn path=/trunk/playground/graphics/okular/; revision=628124
2007-01-29 08:17:45 +00:00
Tobias Koenig d227a94e79 First part of the porting to a threaded api for generators
- made comicbook, tiff and kimgio a threaded generator

svn path=/trunk/playground/graphics/okular/; revision=626761
2007-01-24 15:06:45 +00:00
Pino Toscano f7f9b3df41 create() -> createDevice() as per new kdelibs API
svn path=/trunk/playground/graphics/okular/; revision=626372
2007-01-23 01:02:17 +00:00
Pino Toscano 4b922367e2 Use a proper enum to deal with orientation/rotation all around okular.
svn path=/trunk/playground/graphics/okular/; revision=620312
2007-01-05 17:09:47 +00:00
Tobias Koenig ea51ee18f5 Do a lot of include cleanups... we install all important
header files now

svn path=/trunk/playground/graphics/okular/; revision=619492
2007-01-03 14:30:48 +00:00
Tobias Koenig 86a1fd3b69 Big cleanup of Document API and documentation:
* add full API docs
 * renamed getMetaData -> metaData
 * removed supportsRotation in Document and Generator
 * moved Permission and SearchDirection enums into separated header core/global.h

svn path=/trunk/playground/graphics/okular/; revision=619183
2007-01-02 22:37:55 +00:00
Pino Toscano 69cdc31727 SVN_SILENT unused parameters
svn path=/trunk/playground/graphics/okular/; revision=618233
2006-12-31 17:44:38 +00:00
Pino Toscano 94c9ffa3d7 do not explicitely include document.h in generator.h
svn path=/trunk/playground/graphics/okular/; revision=617283
2006-12-28 16:45:50 +00:00
Pino Toscano 0594e78bdc make it compile correctly everywhere
svn path=/trunk/playground/graphics/okular/; revision=616997
2006-12-27 17:30:38 +00:00
Tobias Koenig a490cc0cd7 Add the following functionality:
* Bring QPixmap* back to make Albert happy ;)
 * Store only one QPixmap per page/size and rotate it directly
 * Rotate ObjectRects (boundary)
 * Rotate Annotations (point coordinates)
 * Don't reload pixmaps, ObjectRects and annotations on rotation

svn path=/trunk/playground/graphics/okular/; revision=606371
2006-11-20 07:53:32 +00:00
Pino Toscano 5adbe4c66f there's no more need for libtool files
svn path=/trunk/playground/graphics/okular/; revision=603923
2006-11-10 20:03:50 +00:00
Tobias Koenig a375953402 Adapt ghostview, kimgio, pdf, dvi, chm, xps and ooo generators to setImage()
svn path=/trunk/playground/graphics/okular/; revision=599090
2006-10-25 17:43:15 +00:00
Tobias Koenig d22b2f1892 A rather big change:
* Hide as much private API as possible in Generator, PixmapRequest and ExportEntry/Format
 * Renamed ExportEntry to ExportFormat and made it value based
 * Removed canExportToText() and exportToText() from Generator API and implemented this
   functionality in exportFormats()/exportTo() in the generators
 * Removed the orientation parameter from PixmapRequest and let the Document handle the rotation
   of the page (pixmap) instead

CCMAIL:okular-devel@kde.org

svn path=/trunk/playground/graphics/okular/; revision=599058
2006-10-25 15:35:53 +00:00
Laurent Montel acb44a49d5 Apply Alex patch (now we can use enable-final argument
some module compiles with enable-final now)
As discussed with Alex it's not necessary to have program name
into automoc macro

svn path=/trunk/playground/graphics/okular/; revision=598341
2006-10-23 09:29:10 +00:00
Pino Toscano 18028a8a2c API change in the Generator: use an empty construct, and set the document for the generator right after its construction.
Add a protected method to get the document, and hide the real document pointer as private, so the generators can't redefine it.

svn path=/trunk/playground/graphics/okular/; revision=598025
2006-10-22 11:25:08 +00:00
Pino Toscano cc3de8c899 fix typo in license
svn path=/trunk/playground/graphics/okular/; revision=597879
2006-10-21 22:10:09 +00:00
Tobias Koenig fccd412d69 * Added documentation to Generator API
* Moved all implementations to generator.cpp
 * Added 'const' where it make sense
 * Adapted all generators (except gs)

svn path=/trunk/playground/graphics/okular/; revision=597525
2006-10-20 16:51:46 +00:00
Laurent Montel 9f317e53ca Port to new kde4_automoc macro
Necessary to change KDE4_AUTOMOC macro to support
enable-final argument

(there was not a dependancy between <name>_final.cpp file and
moc generated files => moc files were never created)

Not necessary to rebuild all kdelibs just cp kdelibs/cmake/modules/KDE4Macros.cmake <path_kde4>/share/apps/cmake/modules

I ported and tested all kde module (without enable-final argument, it compiles fines (test and program))
Don't try to use enable-final argument for the moment it doesn't compile (but dependancy works)

Regards

svn path=/trunk/playground/graphics/okular/; revision=595060
2006-10-13 08:13:52 +00:00
Pino Toscano c52a0e622b Change the way we rotate the pages.
Instead of telling the generators to do the work themselves (that was usually destraoying the ld pages and creating the new ones), now we just rotate the page objects deleting only their "mutable" contents.
This way, generators can just return true in their supportRotation() to make okular rotate the pages for them for free. Of course they still have to generate the page pixmaps according to the given page rotation.
Now, there's a new rotationChanged() function in the Generator API so generator that needs it can be norified about the document rotation changing.

CCMAIL: developers@okular.org

svn path=/trunk/playground/graphics/okular/; revision=593632
2006-10-08 15:07:23 +00:00
Brad Hards 0776034e3b Implement a bit more of the XPS specification - some
basic matrix transformations now work.

Also do a bit of refactoring - see if painting on a QImage
is any faster than painting on a QPixmap. Also move some
of the convenience routines into member functions, so that
they can correctly implement stuff like fill modes.

svn path=/trunk/playground/graphics/okular/; revision=588580
2006-09-26 11:53:27 +00:00
Brad Hards 3298fc16a7 Fix serious bug that prevented us getting at the fonts we've loaded.
Also correct a compile warning.

svn path=/trunk/playground/graphics/okular/; revision=587490
2006-09-23 00:42:42 +00:00
Brad Hards 4b68351612 An initial commit of pixmap rendering. This is very ugly code,
but it does work a bit (well, except for the font loading:
http://www.trolltech.com/developer/task-tracker/index_html?method=entry&id=130976
is a bad problem)

svn path=/trunk/playground/graphics/okular/; revision=587041
2006-09-21 11:41:46 +00:00
Tobias Koenig df7d144c10 Moved all classes in core/ into the 'Okular' namespace and removed
nearly all references to kpdf (knewstuff still missing).

svn path=/trunk/playground/graphics/okular/; revision=586993
2006-09-21 08:45:36 +00:00
Albert Astals Cid 8beff183b9 add desktop files indicating libokular provides a part for those mimetypes
svn path=/trunk/playground/graphics/okular/; revision=586466
2006-09-19 17:42:02 +00:00
Dirk Mueller 89bacb77bb compile++
svn path=/trunk/playground/graphics/okular/; revision=586265
2006-09-19 09:09:30 +00:00
Brad Hards 602c41f5dd It looks like Microsoft must have at least two
completely different code bases for generation of
XPS files. 

In any case, we now handle FixedPage files where
the path provided is relative to the FixedDocument,
not an absolute path.

This allows us to load XPS samples from the 
Office2007 set.

svn path=/trunk/playground/graphics/okular/; revision=583440
2006-09-12 10:31:09 +00:00
Pino Toscano 33bc345d4e no more QT3_SUPPORT here
svn path=/trunk/playground/graphics/okular/; revision=583406
2006-09-12 09:27:21 +00:00
Brad Hards a212a92780 Try harder not to crash.
svn path=/trunk/playground/graphics/okular/; revision=583018
2006-09-11 11:05:40 +00:00
Brad Hards 7c8ecc36bd Add in very rough first version of the XML paper
specification renderer. 

This doesn't work yet. And it crashes a lot. You
can help!

If you want to test this, a search for
"xps sample documents" will give you a sample set that
you can unzip.


svn path=/trunk/playground/graphics/okular/; revision=583014
2006-09-11 10:44:17 +00:00