View Issue Details

IDProjectCategoryView StatusLast Update
0000029FreeCADFeaturepublic2009-10-29 14:38
Reporterwmayer Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Summary0000029: Implement Inventor node to display texts with different fonts
DescriptionSince Coin doesn't support to use a wide range of different fonts we should write a special text Inventor node which uses Qt methods for that.

The idea is to render text of whatever font into a QImage and convert this image into a GL-conform representation. Qt offers the method QGLWidget::convertToGLFormat therefore.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2009-10-29 14:38

administrator   ~0000021

There is a new Inventor node SoLabel with the properties: string, textColor, name (of the font) and size (of the font). This node uses the method QGLWidget::renderText() directly.

Here is a small example how to it with Python:

from pivy import coin,sogui
s=coin.SoType.fromName("SoLabel").createInstance()
s.string="Hey, the label is working :)"
App.newDocument()
ano=coin.SoAnnotation()
ano.addChild(s)
Gui.ActiveDocument.ActiveView.getViewer().getSceneGraph().addChild(ano)

Issue History

Date Modified Username Field Change
2009-10-13 06:37 wmayer New Issue
2009-10-13 06:38 wmayer Assigned To => wmayer
2009-10-13 06:38 wmayer Status new => assigned
2009-10-29 14:38 wmayer Note Added: 0000021
2009-10-29 14:38 wmayer Status assigned => closed
2009-10-29 14:38 wmayer Resolution open => fixed