Handle(TCollection_HAsciiString) str = new TCollection_HAsciiString;
Display * disp = XOpenDisplay("localhost:0.0");
- if ( !disp )
+ if (!disp)
{
- cout << "Display is NULL!" << endl;
- return ;
+ // let the X server find the available connection
+ disp = XOpenDisplay(":0.0");
+ if (!disp)
+ {
+ cout << "Display is NULL!" << endl;
+ return ;
+ }
}
Standard_Integer npaths = 0;
TsmGetAttri( 1, &keyZoom );
zoom = keyZoom.data.ldata;
- CMN_KEY keyfontName;
- keyfontName.id = TelTextFont;//This flag responding about TextFontName
- TsmGetAttri( 1, &keyfontName );
- char *fontName = new char[strlen((char*)keyfontName.data.pdata) + 1];
- strcpy(fontName,(char*)keyfontName.data.pdata);
-
OpenGl_TextRender* textRender = OpenGl_TextRender::instance();
int vh = 2 ;
int vv = 2 ;
if ( renderMode == GL_FEEDBACK )
{
#ifdef HAVE_GL2PS
+ CMN_KEY keyfontName;
+ keyfontName.id = TelTextFont;//This flag responding about TextFontName
+ TsmGetAttri( 1, &keyfontName );
+ char *fontName = new char[strlen((char*)keyfontName.data.pdata) + 1];
+ strcpy(fontName,(char*)keyfontName.data.pdata);
+
export_h = (GLdouble)fnt->FaceSize() / export_h;
int aligment = alignmentforgl2ps( vh, vv );
glPopMatrix();
ExportText( str, fontName, export_h, angle, aligment, x, y, z, is2d!=0 );
+ delete [] fontName;
#endif
}
else
mgr->render_text( curFont, str );
glPopMatrix();
}
- delete [] fontName;
return;
}