Hey everyone,

I wanted to get your input on something I’m working on.

I’m taking over an old abandoned project that is a Qt Wrapper around 
Putty(http://www.putty.org/ <http://www.putty.org/>).  So far I’ve put a lot of 
work into it so that
it works with the newest version of putty
It supports multiple putty sessions within a single application instance
It can be used as just another widget for embedding into your project

I’m not really happy with the text rendering layer however.  But I’m not sure 
if I can do any better considering the requirements that putty is handing down 
to me.

How rendering works is basically, putty will tell my layer that starting colX, 
rowY: draw this string of characters.  For instance, when the terminal first 
starts up, for a session that has 80 columns and 30 rows, I’ll receive 30 calls 
from putty telling me to draw this string of 80 space characters (with 
attributes, like black-background, white-foreground, etc).  This essentially 
draws the whole screen in a black background.  

Then I’ll receive fragment updates for updating individual areas of the screen. 
  For instance, putty will say, at column 0, row 5, draw “[$jason@zrg ~]$ cat 
test.txt“

How my Qt wrapper layer currently works is it essentially calculates the screen 
coordinates given a column and row (and other variables, like font size, etc).  
Then uses QPainter::drawText to draw the text fragment.  This works fine, but 
when large amounts of the screen needs to get updated repeatedly (especially if 
I choose to antialias the font), things can get a bit bogged down.  Still fast, 
but not as responsive as a terminal *should* be.

So, I’m wondering if the current text rendering choice is the best one.  I’ve 
briefly looked into QTextLayout, but I don’t really know if it’ll be helpful in 
my case… currently, I don’t see how it would be.  Also, I’m aware of 
QGraphicsScene/View framework, but I don’t really know if it’ll give me much of 
an advantage over my current approach.

Thoughts?

Also, I wanted to note, that once I have everything in a good working state 
again, I’m planning to bring this project out into the community again for 
others to use.  

--
Jason Dolan
Software Developer
PCC
Control Your Future.

800-722-7708
ja...@pcc.com <mailto:ja...@pcc.com>
www.pcc.com <http://www.pcc.com/>
twitter.com/pccvt



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to