WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 08-24-2008, 04:55 AM
Ravi Ravi is offline
Join Date: Aug 2008
Posts: 1
addText problems with 3 windows


I have some problems with sowing text via viz.addTest() in a Setup with three windows. The text isn't displayed.

creating the Windows:
		# Create a new window on the left side
		self.LeftWindow = viz.add(viz.WINDOW)
		self.LeftWindow.position(0, 1)
		self.LeftWindow.size(1.0/3, 1.0)
		#print self.LeftWindow
		#self.CenterWindow = viz.add(viz.WINDOW)
		#self.CenterWindow.position(1.0/3, 1.0)
		#self.CenterWindow.size(1.0/3, 1.0)
		self.CenterWindow = viz.MainWindow
		self.CenterWindow.position(1.0/3, 1.0)
		self.CenterWindow.size(1.0/3, 1.0)

		#Create a new window on the right side
		self.RightWindow = viz.add(viz.WINDOW)
		self.RightWindow.position(2.0/3, 1.0)
		self.RightWindow.size(1.0/3, 1.0)

		# Create new viewports
		self.LeftView = viz.add(viz.VIEWPOINT)
		self.RightView = viz.add(viz.VIEWPOINT)
		self.CenterView = viz.add(viz.VIEWPOINT)

		#Attach the the viewports to the windows

		#Rotate the view so that it looks down
		#set the viewing angle for the windows
creating the text:
		self.anweisung = viz.addText("",viz.SCREEN,self.CenterWindow)
later the anweisung.message("...") command is used to show and to change the text.
Unfortunately there is no text displayed, since we changed to the 3 window setup. With one it is working poperly.
Any idea why this isn't working?
Reply With Quote
Old 08-25-2008, 05:51 PM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
If you specify a window object as the scene of a text, then you need to specify viz.ORTHO as the parent, not viz.SCREEN. Also, when adding object to the viz.ORTHO layer, the position units are in pixels, not normalized coordinates. Here is sample code:
self.anweisung = viz.addText("hello",viz.ORTHO,self.CenterWindow,fontSize=32)
self.anweisung.translate(50,50) #50 pixel from bottom left corner of window
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best Way to set up wii cursors across 2 windows shivanangel Vizard 1 03-13-2008 11:24 AM
problems with webcam plug-in v-clizzin Plug-in development 2 01-25-2008 03:06 PM
Picking in multiple windows FalconNL Vizard 1 07-02-2007 09:45 AM
Windows within windows VAmanda Vizard 5 10-31-2005 12:16 AM
Problems with lighting in 2.0 murm Vizard 6 04-21-2004 09:59 AM

All times are GMT -7. The time now is 06:33 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2023, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC