Dear Shuhao, It's not all that efficient in fact -- but each item (e.g. a pen stroke) has a bounding box (i.e. the smallest rectangle containing it entirely) that xournal keeps track of. So when one uses the eraser, xournal scans through all items on the page (actually just the current layer) and looks closely only at those whose bounding box contains the position of the cursor. (Then, for those items, we scan the coordinates of the various vertices in the pen stroke to find out if any of them are actually close to the cursor).
Best, Denis On 10/07/2014 07:20 PM, Shuhao Wu wrote: > Another question is how do you enabled efficient erasing? How is the > line segments stored so they can be efficiently looked up for erasing? > > Thanks, > Shuhao ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel