[Okular-devel] trying to highlight areas in page view

Albert Astals Cid aacid at kde.org
Tue May 7 20:23:52 UTC 2013


El Dilluns, 29 d'abril de 2013, a les 13:41:29, Haidong Tang va escriure:
> Hi,
> 
> I'm a developer at a research center. I'm integrating some functionalities
> into Okular for research purposes. Right now I would like to have Okular
> display my result in the page view, but I'm confused where I should write
> my code.
> 
> I'm trying to draw some boxes on a page to highlight certain part of a page
> and at the same time scroll the page automatically to the position of the
> highlighted area. It's just like what Okular would do when you search a
> term, except that the highlighted areas are not necessarily text, it could
> be part of a picture as well.
> 
> I guess I should write my code in the class pageview but I haven't found
> any function very related what I want to do (or maybe I missed it). Could
> anybody give a hint about how I should do it? Which classes to hack and
> Which functions to use? Thanks!

Can't you just add annotations? See the tests we have in master regarding 
annotation addition if you want to know how to programatically add those.

Cheers,
  Albert


More information about the Okular-devel mailing list