[scribus-dev] Question about culling area

Elvis Stansvik elvstone at gmail.com
Thu Aug 11 11:02:02 UTC 2011


Hi Andreas,

2011/8/11 Andreas Vox <andreas.vox at googlemail.com>:
> Hi Elvis!
>
> I introduced the culling area in order to skip objects when drawing just a
> rectangle part of the canvas.
> Culling area = null means no limitation.
>
> The culling area is not a clipping area, that's what PoLine is for. Can't
> you use the PoLine of the cell's
> textframe for your purposes?

Yes, I realize that I've confused myself a bit.

My confusion comes from thinking that I could somehow paint parts of
the table (cells) in DrawObj_Item(...). This is obviously not possible
as the item needs to repaint itself entirely if requested to do so by
the canvas. Right?

The problem I'm facing now is that on each key press, I'm now doing:

m_table->activeCell().textFrame()->handleModeEditKey(event, repeat);
m_table->update();

This will trigger a re-paint of the entire canvas, and the resulting
lag when typing is quite noticable compared to typing in a regular
text frame.

I shouldn't have to call m_table->update() right? That will trigger a
lot of things that aren't necessary after a just a key press.

Just something like

m_canvas->update(m_canvas->canvasToLocal(m_table->getBoundingRect()));

should be enough? But for some reason that isn't working; sometimes
the table DrawObj_Item is called and sometimes it's not :/

Need to do more debugging here.

Elvis



More information about the scribus-dev mailing list