-
|
I plan to use ThorVG to develop a GUI framework. This framework will include a text editing control, similar to the Suppose I've rendered a block of text inside this control, and there's an input cursor (caret) blinking between two characters. That is, every few hundred milliseconds, the cursor (a vertical rectangular bar) needs to be drawn or erased. Since this input cursor may overlap with the text on either side, does that mean that redrawing the cursor would also require redrawing the text? If so, wouldn't that affect performance? Does ThorVG provide any support or optimization for such scenarios? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
|
Hi,
If it's overlapping, then yes — the overlapping paint object will be redrawn by the cursor's dirty regions. However, this doesn't mean you don't need to handle redrawing the text on your side.
with ThorVG v0 (v0.1.x ~ v0.15.x) - Yes
The optimization has been done only for Software Engine now. Please check the doc, its mechanism: |
Beta Was this translation helpful? Give feedback.
-
|
@xland Please check, thanks. |
Beta Was this translation helpful? Give feedback.
-
|
@xland thanks for report. the fix will be in the thorvg-pre24. |
Beta Was this translation helpful? Give feedback.


Hi,
If it's overlapping, then yes — the overlapping paint object will be redrawn by the cursor's dirty regions. However, this doesn't mean you don't need to handle redrawing the text on your side.
with ThorVG v0 (v0.1.x ~ v0.15.x) - Yes
with ThorVG v1 (Since pre-release v1.0-pre23 or main branch) - literally it could affect, but optimally
The optimization has been done only for Software Engine now. Please check the doc, its mechanism:
https://github.com/thorvg/thorvg/blob/main/README.md