[poppler] New selection code
Kristian Høgsberg
krh at bitplanet.net
Wed Jun 29 14:46:11 PDT 2005
- Previous message: [poppler] poppler/poppler: CairoOutputDev.cc, 1.16,
1.17 CairoOutputDev.h, 1.6, 1.7 Page.cc, 1.4, 1.5 Page.h, 1.3,
1.4 TextOutputDev.cc, 1.1.1.1, 1.2 TextOutputDev.h, 1.2, 1.3
- Next message: [poppler] poppler: ChangeLog,1.127,1.128
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Hi,
I've just committed support for "real" text selection in poppler. The
old rectangular selection mode was kinda weird, and not really useful.
The new stuff is just regular selection, as seen in basically every
other application. Jonathan has been working on integrating it into
evince, here's a couple of screenshots:
http://freedesktop.org/~krh/evince-selection.png
http://jrb.webwynk.net/Screenshot-pandp12p.pdf.png
The API exposed in the glib wrapper is pretty simple:
void
poppler_page_render_selection (PopplerPage *page,
gdouble scale,
GdkPixbuf *pixbuf,
PopplerRectangle *selection,
PopplerRectangle *old_selection);
GdkRegion *
poppler_page_get_selection_region (PopplerPage *page,
gdouble scale,
PopplerRectangle *selection);
but most of the functionality is implemented in TextOutputDev.cc. The
selection drawing code should work with the splash backend and the
Arthur backend, since it's using the OutputDev class for rendering. One
requirement is that the OutputDev implementation use drawChar for
rendering text and not drawString.
I expect to spend some time optimizing, tweaking and fixing the code,
but it is basically usable at this point, and once we get the evince
part to a committable state, it should be easy to check this stuff out
and play with it.
cheers,
Kristian
- Previous message: [poppler] poppler/poppler: CairoOutputDev.cc, 1.16,
1.17 CairoOutputDev.h, 1.6, 1.7 Page.cc, 1.4, 1.5 Page.h, 1.3,
1.4 TextOutputDev.cc, 1.1.1.1, 1.2 TextOutputDev.h, 1.2, 1.3
- Next message: [poppler] poppler: ChangeLog,1.127,1.128
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the poppler
mailing list