WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-02-2013, 05:26 PM
javadi javadi is offline
Join Date: Mar 2013
Location: London
Posts: 33
Screen Size and Scaling


I have two questions regarding screen size and scaling of objects. Here I have attached two images (one original texture and one screen shot of the texture placed in two orientations). I have also annotated the screen shot for clarification. I have two issues,
  1. In order to achieve an equal width of arrows (green lines in the screen shot), I have to adjust the window size to something like [760, 600]. How can I calculate these values? Further information regarding the size of the original texture and my display setting is gone in the bottom.
  2. My other issue is the ratio of width to height of the texture (green to blue lines in the screen shot). The original texture looks much slimmer than the ones displayed. I use 'setScale' method to adjust the x and y scales differently (the blue line in the code below). When we add the texture, we specify a size. For that, I use one number, which I assume it defines a square. How can I merge this scaling in the line in blue with texture size in the line in red?
Some information on the original texture and my display settings,
  • The original image: 600 x 780 pixels, 72 x 72 pixels per inch resolution
  • The display: 1920 x 1200 LCD monitor.
The code that I used to create display the arrows:
import viz

viz.window.setSize([760, 600])


TextureArrow = viz.addTexture('Bank, Task\Arrow, Original.png')

DispArrow1 = viz.addTexQuad(viz.SCREEN, viz.MainScene, 500)
DispArrow1.setScale([600.0 / 780, 780.0 / 780, 1])
DispArrow1.setPosition([0.7, 0.7, 0])
DispArrow1.setEuler([0, 0, 90], mode = viz.ABSOLUTE)

DispArrow2 = viz.addTexQuad(viz.SCREEN, viz.MainScene, 500)
DispArrow2.setScale([600.0 / 780, 780.0 / 780, 1])
DispArrow2.setPosition([0.5, 0.3, 0])
DispArrow2.setEuler([0, 0, 0], mode = viz.ABSOLUTE)
Very many thanks for your attention.

Attached Thumbnails
Click image for larger version

Name:	Arrow, Original.png
Views:	2176
Size:	13.9 KB
ID:	586   Click image for larger version

Name:	Arrow, Screen Shot, Annotated.png
Views:	2235
Size:	53.6 KB
ID:	588  
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
Scaling Portions of a CAL3D Model shivanangel Vizard 2 07-26-2012 12:17 AM
automatic scaling rlh001 Vizard 5 06-18-2012 09:31 AM

All times are GMT -7. The time now is 07:46 AM.

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