Hi,

I'm trying to set widget as canvas and label with text located in left upper 
corner. However when I'putting my text I see it in wrong place (see attached 
picture).

Below you can find the code which draws this widget:

osgWidget::Canvas* canvas   = new osgWidget::Canvas("canvas");
canvas->setOrigin(600,70);
osgWidget::Label*  pLabel   = new osgWidget::Label("infoLabel", "");
pLabel->setFont("c:\\windows\\font\\BROWAUZ.TTF");
pLabel->setFontSize(20);
pLabel->setTexCoord(0.0f,0.0f,osgWidget::Widget::UPPER_LEFT);
pLabel->setFontColor(0.4f, 0.5f, 1.0f, 0.7f);
pLabel->setText(".......");
pLabel->setSize(300.0f, 300.0f);
canvas->addWidget(pLabel,30.0f,0.0f);
        
canvas->getBackground()->setColor(0.9f, 0.3f, 0.5f, 0.4f);
        
wm->addChild(canvas); 

Thank you!

Cheers,
Danny

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=16139#16139



<<attachment: widget.GIF>>

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to