Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: trying to scale playtheora  (Read 2971 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
trying to scale playtheora
« on: May 05, 2009, 01:57:21 AM »

probably obvious, but I am strugglingto get a theora video to scale smaller, it works as it should with Game.Playtheora method, and I am able to launch the video from with the entity.Playtheora method, however what I get is either a fullscreen video  which is cut off or an attempt to play a slightly smaller than full screen video at different locations in the screen.
Is this an issue which Wintermute can manage, I assume it is or do I  have to make the video smaller. I am playing in non windowed mode.

btw the ff widget is generating .ogv files but they seem to fucntion ok

Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: trying to scale playtheora
« Reply #1 on: May 05, 2009, 07:03:27 AM »

If you use Entity.PlayTheora(), you can affect the video size by changing the scale of the entity (Entity.Scale property).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: trying to scale playtheora
« Reply #2 on: May 05, 2009, 08:43:00 AM »

My guess way it might be that, here is the code fragment that I have been basing my current efforts on.

I have tried variations using entities created in the scene manager as well as use of a dynamic entity as below. I have tried a range of different scales right up from 16 * 16 but all I get is the vioe playing in what I guess is a native size any thoughts ?

Video = Scene.CreateEntity();
Video.X = 12;
Video.Y = 24;
Video.ScaleX = 208;
Video.ScaleY = 160;
Video.PlayTheora("scenes\Intro\drive.ogv");
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: trying to scale playtheora
« Reply #3 on: May 05, 2009, 08:58:23 AM »

You can't set the vertical/horizontal scale separately. You can only use the global scale of the entity (in percent).
So for example this should play video in half size:

Code: WME Script
  1. Video = Scene.CreateEntity();
  2. Video.X = 12;
  3. Video.Y = 24;
  4. Video.Scale = 50;
  5. Video.PlayTheora("scenes\Intro\drive.ogv");
  6.  
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Re: trying to scale playtheora
« Reply #4 on: May 05, 2009, 09:35:26 AM »

works (of course) thanks very much
Logged
 

Page created in 0.034 seconds with 20 queries.