Commit graph

23 commits

Author SHA1 Message Date
Albert Astals Cid 3f80eceaae Now (Qt 4.3.1) that QPainter::CompositionMode_Multiply works remove agg2 based code
Actually i think it's even a bit faster now

svn path=/trunk/KDE/kdegraphics/okular/; revision=708877
2007-09-05 22:01:04 +00:00
Albert Astals Cid 0d47b62715 krazy include order issues
svn path=/trunk/KDE/kdegraphics/okular/; revision=655893
2007-04-19 18:30:20 +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
Tobias Koenig 57a240aca8 Replace cropImageOnImage by a simple QImage::copy()
svn path=/trunk/playground/graphics/okular/; revision=605194
2006-11-15 20:02:51 +00:00
Tobias Koenig bea71df6e0 * Made image rotation asynchronous
* Changed Page API and PagePainter to work only with QImage

svn path=/trunk/playground/graphics/okular/; revision=601581
2006-11-03 17:57:32 +00:00
Pino Toscano 4c0808fabf a bit less of #include's
svn path=/trunk/playground/graphics/okular/; revision=598229
2006-10-22 23:00:39 +00:00
Albert Astals Cid a9a27a9894 remove qt3 support calls
svn path=/trunk/playground/graphics/okular/; revision=588888
2006-09-27 10:04:17 +00:00
Pino Toscano 42310e184c Restructuring a bit how the text-editor-like selection works:
* putting it in an own view mode
* associating the selection to every page
* using a better algorithm to calculate the selection, even in a page range
* moving its drawing from the page view to the page painter, so it's possibile to draw it just like it's done with eg annotations

Other changes (more or less related):
* moved the annotation popup to a better place, so it won't interfere with annotation drawing
* commented some debug code in TextPage

svn path=/trunk/playground/graphics/okular/; revision=588795
2006-09-26 22:22:01 +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 5fda8d50b8 did not want to commit that
svn path=/trunk/playground/graphics/okular/; revision=584935
2006-09-15 21:12:25 +00:00
Albert Astals Cid 4e04b301f1 Almost foget to fordwardport r582561
Fix bug 133507 that prevented the correct restoring of the document viewport on session restore for remote documents

svn path=/trunk/playground/graphics/okular/; revision=584932
2006-09-15 21:08:48 +00:00
Albert Astals Cid cbb8e80154 some more compile changes, now let's see basketball
svn path=/branches/work/kde4/playground/graphics/okular/; revision=521882
2006-03-23 19:02:55 +00:00
Enrico Ros ed41c2e2d2 Using line width property. Line width follows scaling.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405443
2005-04-13 21:23:54 +00:00
Enrico Ros e8f27fc700 Highlight annotations: ok
PagePainter:
  Updated drawShape with RasterOperation (Normal, Multiply) for getting
  Highlight annotation types to work. All Highlight annotations are now
  drew using the Multiply raster operation.

Painter_AGG2:
  Replaced the agg_pixfmt_rgba.h pixformat definition template with an
  internal version that implements different raster operations too. The
  new version has been shrinked to the minimum, containing the only code
  needed by kpdf AGG2 rendering engine to work.

Thanks for Rob Buis for telling me the way to go and providing sample code
with his AGG2 algorithms.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405338
2005-04-13 14:49:57 +00:00
Enrico Ros c5b694d02c Painter_AGG2:
Part from the *very C00L* AGG2 library (www.antigrain.com) are imported
  from the agg23 source package. The imported files provides antialiased
  rendering on bgra32 qimage memory buffers.
  See "kpdf/ui/painter_agg2/README.kpdf" for more info.
PagePainter:
  Replaced my dear crappy scanline renderer (well, was the fastest btw :-)
  with agg2 based rendering code.
  Implemented HighlightAnnotation (HL, Underline, Strikeout and Squiggly)
  and InkAnnotation (simple one) rendering.
  Need a multiply-blending template algo for getting highlights to look
  as highlighs (not solid or transparent, like now).
Makefile.am(s):
  Updated to build the new library, set include paths and link it.

Here we go.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=405150
2005-04-12 20:44:26 +00:00
Enrico Ros d460434919 Annotations: my first dirty (and superfast) scanline renderer. More to
implement here.. but that looks so nice. (note: too juicy to see now,
disabled some code before committing :-).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404560
2005-04-10 13:47:00 +00:00
Enrico Ros 5591710542 Annotations: first drawing experiments. Some unbuffered annotations are
drawn in page.

PagePainter:
  Added 2 convenience function to change the alpha component of an image
  and do it while colorizing the image in a single pass.
  QPainter->drawPixmap unbuffered render for AText marks, AStamp pictures
  and AGeom of type InscribedSquare.

Can't wait for Arthur's painter to do the full range of painting effects
with a very simple interface, faster than my dirty implementation and
over all: not crashing! (mine does! :-)

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=404088
2005-04-08 15:45:40 +00:00
Enrico Ros 37abd55198 CVS_SILENT more naming changes
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=402436
2005-04-01 16:24:11 +00:00
Enrico Ros 917d5e8b79 CVS_SILENT variable names change. preparing for heavy mods.
svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=402410
2005-04-01 13:54:26 +00:00
Enrico Ros e5eb63ec71 Redesigned graphic pipeline on PagePainter and hand scaling (10x gain on
typical usage).

PagePainter:
  Added 2 convenience methods for performing fast cropping and scaling
  from qpixmaps to qimages. Split buffered graphic flow from the unbuffered
  one reducing buffers conversions to the minimum. Avoid odd cases in
  rescaling. Detection of annotations boundaries to check for enabling
  buffered painting.
  Sample quick dirty and broken (but not so much..) implementation for
  painting AStamp annotations.
Misc:
  PresentationWidged and ThumbnailWidget: adapted to PagePainter changes.
  (PageView mod has already been committed).

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=400310
2005-03-24 19:59:11 +00:00
Enrico Ros fbc7d45083 Adding support for annotations in framework. Only need to add and
implement annotations now (and create the save/load procedure).

Annotations: converging to a stable Annotation definition. Changed a bit
  the paint functions. Added a first 'template' annotation, a simple
  pen-like segments recorder for framework testing purposes only. This
  has events filters in place and the rough paint function implemented.

PageView: removed the MouseEdit mode and using that button for toggling
  the editToolBox instead. Added Annotation support. When the Annotation
  is created, all pageView events flow through that new object. Repaint
  of damaged/old areas is done internally and is based on the geometry
  of the annotation we're creating. When an Annotation is complete, it
  is reparented to the Page that adds it to its internal list.
  From that point on the annotation will be rendered by pagePainter
  using the pixmap-based paint function provided by the annotation
  itself.

PagePainter: draws annotations stored in pages when rendering (using the
  'rought paint function' till the good pixmap based one will be in
  place.

Page: added preliminary support for adding Annotation(s) to the page
  and deleting them all.

Document: added the pass-through call to add an Annotation to the Page
  and notify observers.

PageViewToolbox: can be draged and attached to any side. Position is
  remembered between runs (choose your side and that the toolbox will
  always be there). Available on Right and Bottom sides too. Emits -1
  when the current tool is deselected.

Misc: added Annotations to both the 'observers changed flags' and the
  'pagepainter' ones and updated ui classes accordingly.

svn path=/branches/kpdf_annotations/kdegraphics/kpdf/; revision=390638
2005-02-18 18:24:45 +00:00
Enrico Ros f4b94c016d SEARCH CHANGES: absolutely want to get in those fixes before freeze.
fixed multiple selections on page bugs.
next commits will come tomorrow.

svn path=/trunk/kdegraphics/kpdf/; revision=385045
2005-02-01 18:26:56 +00:00
Enrico Ros 93c1d3845d Implemented history (implementation is inside Document. actions (2) are in
Part). Implemented 'history (xpdf's LinkAction) links'. History depth is
 100 steps by default (this is enough for sure, clicking 100 times on a
 button is not an easy task :-).

Minor issues (removed half TODOs in code, all FIXMEs are already removed):
Invoke mailer on 'mailto:' links inst instead of konqueror.
Actions cleanup: disable actions like 'print', 'preview', 'save to..', etc
 when there isn't an active document. Added history actions to the toolbar
 in place of the 'prev_page' and 'next_page' ones. Fixed open+open_recent
 action tooltip and behavior.
Move definition and implementation of PagePainter class to ui/pagepainter
 from core/page.
Valgrinded and leakchecked (2 memory leaks spotted and fixed (missing
 contents deletion in KPDFGeneratorThread and missing deletion of
 PixmapRequests on cancel in Document::requestPixmaps())).

svn path=/trunk/kdegraphics/kpdf/; revision=382960
2005-01-27 17:31:07 +00:00