hartmut
7th January 2014, 15:59
I have written a QItemDelegate :: paint() function of a QTableView, where I draw a mixture of text and small symbols. Some of the symbols come from a symbol font but others have to be provided by my program. Like the text, the symbols are monochrome and should be displayed with the current pen color and background color, which change with the selection state of the table cell. What would be the best strategy?
I used to define the symbols in bitmap ressources where I used only three colors: black, white and gray (to create a basic anti aliasing) and I manually converted these three colors pixel by pixel to the current pen, backgrould and average color.
Now I would like to find a scalable solution with SVG graphics and true antialiasing. Do I really have to edit the color values of the SVG XML code at runtime (as described here http://www.qtcentre.org/archive/index.php/t-53946.html ) or is there a simpler solution?
I also thought of creating a font instead of SVG graphics. Is it possible to use a "private" font, which is not installed on the system? It should work under Windows and on a Mac.
I used to define the symbols in bitmap ressources where I used only three colors: black, white and gray (to create a basic anti aliasing) and I manually converted these three colors pixel by pixel to the current pen, backgrould and average color.
Now I would like to find a scalable solution with SVG graphics and true antialiasing. Do I really have to edit the color values of the SVG XML code at runtime (as described here http://www.qtcentre.org/archive/index.php/t-53946.html ) or is there a simpler solution?
I also thought of creating a font instead of SVG graphics. Is it possible to use a "private" font, which is not installed on the system? It should work under Windows and on a Mac.