*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> movie/mvView (3d)              
Title
Content
Arch
Section
 

Contents


mvView(3dm)							   mvView(3dm)


NAME    [Toc]    [Back]

     mvSetViewOffset, mvGetViewOffset, mvQueryViewOffset, mvSetViewSize,
     mvGetViewSize, mvQueryViewSize, mvSetViewOffsetAndSize,
     mvGetViewKeepAspect - Change the location and size	of the region for
     movie display inside a GL window

SYNOPSIS    [Toc]    [Back]

     #include <dmedia/moviefile.h>
     #include <dmedia/movieplay.h>


     void mvSetViewOffset(MVid movieid,	int offsetx, int offsety,
			 DMboolean glcoordsystem);

     void mvGetViewOffset(MVid movieid,	int *offsetxreturn,
			 int *offsetyreturn, DMboolean glcoordsystem);

     void mvQueryViewOffset(MVid movieid, int offsetx, int offsety,
			   int *offsetxreturn, int *offsetyreturn,
			   DMboolean glcoordsystem);

     void mvSetViewSize(MVid movieid, int newwidth, int	newheight,
		       DMboolean keepAspect);

     void mvGetViewSize(MVid movieid, int *widthreturn,	int *heightreturn);

     void mvQueryViewSize(MVid movieid,	int width, int height,
			 DMboolean unused, int *widthreturn,
			 int *heightreturn);

     void mvSetViewOffsetAndSize(MVid movieid, int offsetx, int	offsety,
				      int newwidth, int	newheight,
				      DMboolean	glcoordsystem);

     DMboolean mvGetViewKeepAspect(MVid	movieid);


DESCRIPTION    [Toc]    [Back]

     mSetViewOffset(3dm) sets the offset for the view for rendering movie
     frames in an OpenGL window, relative to the origin	of the window.

     You use the glcoordsystem parameter to determine the screen coordinate
     system for	the y offset.  If glcoordsystem	is DM_TRUE, Movie Playback
     Library assumes the OpenGL	screen coordinate system with (0, 0) in	lower
     left.  If it is DM_FALSE, Movie Library assumes the X coordinate system
     with (0, 0) in upper left.

     mvQueryViewOffset(3dm) returns the	actual offset for the movie view for a
     given set of parameters to	mvSetViewOffset(3dm).  Because the size	of the
     movie frame may not match the size	of the view you	specify	(see



									Page 1






mvView(3dm)							   mvView(3dm)



     mvSetViewSize(3dm)	below),	the actual origin of the movie frame may be
     different than what you specify.  The Movie Library automatically centers
     the movie frame inside the	view.

     mvGetViewOffset(3dm) will return the current origin of the	movie frame,
     unless it is different from the value you specified with
     mvSetViewOffset(3dm).  In that case, it returns the last offset you
     specified.	 Thus, any portion of your application code can	inspect	both
     the requested origin (via mvGetViewOffset(3dm)) and the actual origin
     (via mvQueryViewOffset(3dm)).

     The default offset	is (0, 0) in the OpenGL	coordinate system.

     mvSetViewSize(3dm)	sets the size of the Movie Library view	for rendering
     movie frames in a window.	The Movie Library will zoom the	movie
     rectangle as large	as possible to fit within the specified	size.  (The
     IRIS GL version only supports zooming by integer multiples, whereas
     OpenGL supports arbitrary pixel zooming.) The Movie Playback Library will
     preserve the aspect ratio of the movie frame and center the movie
     rectangle within the viewport.

     Because various members of	the Silicon Graphics product family have
     differing hardware	image manipulation capabilities, the same values
     provided to mvSetViewSize(3dm) may	produce	different results when your
     code runs on various machines.  The actual	movie view size	may not	be
     identical to the size you specify.	 To determine what the actual movie
     frame size	will be	for a desired width and	height,	use
     mvQueryViewSize(3dm).

     The Movie Library centers the movie frames	in the view you	specify.  It
     also fills	the areas within the view which	are not	part of	the movie
     frame with	background color.  To specify the background color, use
     mvSetViewBackground(3dm).

     If	the movie will appear by itself	in the window, and not along with
     other graphics, you may want to ensure that your code chooses the proper
     window size by calling mvQueryViewSize(3dm).  You may use the results to
     constrain the dimensions of the window to match those of the movie.
     Alternatively, you	can simply choose a background color for the unused
     portions of the display with mvSetViewBackground(3dm).

     If	the movie will appear in a OpenGL/X window along with other graphic
     elements (i.e. a movie embedded in	a larger display), you may wish	to set
     your view size carefully by first calling mvQueryViewSize(3dm) and	using
     the results as inputs to mvSetViewSize(3dm).  This	will ensure that the
     Movie Library draws on the	display	only over regions the movie frame
     actually appears.

     mvGetViewSize(3dm)	returns	the size of the	movie frame, unless it differs
     from the value you	specified with mvSetViewSize(3dm).  In that case, it
     returns the last size you specified.  Thus, any portion of	your
     application code can inspect both the requested size (via



									Page 2






mvView(3dm)							   mvView(3dm)



     mvGetViewSize(3dm)) and the actual	frame size (via	mvQueryViewSize(3dm)).
     mvGetViewKeepAspect(3dm) returns the flag set with	mvGetViewSize(3dm).

     The default view size is the width	and height of the movie	bounding rect.

     mvQueryViewSize(3dm) returns the actual size the movie will actually
     choose for	the size of the	playback view, given a set of view dimensions.

     mvSetViewOffsetAndSize(3dm) sets the view offset and size atomically. You
     can use this call in place	of a pair of calls to mvSetViewOffset(3dm) and

     You may call these	functions for a	specified movie	instance regardless of
     whether or	not the	movie is playing.  mvSetViewSize(3dm) to avoid an
     unnecessary redraw.

     You may only call these functions for a specified movie while it is bound
     to	a window (see mvBindOpenGLWindow(3dm)).

NOTES    [Toc]    [Back]

     The current implementation	on all platforms guarentees that the actual
     view size requested by mvSetViewSize(3dm) will be maintained.

     Previous versions of mvSetViewSize(3dm) ignored the keepAspect flag and
     always assumed it was DM_TRUE.  This behavior can be enabled by setting
     MV_IGNORE_KEEPASPECT in the environment.

SEE ALSO    [Toc]    [Back]

      
      
     mvBindOpenGLWindow(3dm), mvIntro(3dm), mvSetViewBackground(3dm),
     mvGetViewBackground(3dm), mvMovieRect(3dm).


									PPPPaaaaggggeeee 3333
[ Back ]
 Similar pages
Name OS Title
getvroot IRIX Get location and size of virtual root for window
prefposition IRIX specifies the preferred location and size of a graphics window
mvShowCurrentFrame IRIX Display current movie frame on screen for a movie instance
stepunit IRIX specifies that a graphics window change size in discrete steps
mvViewBackground IRIX Set background color of playback region for a movie instance
mvResizeWindow IRIX Notify Movie Playback Library of window size changes #include #include
pthread_stackseg_np OpenBSD return stack size and location
rename Linux change the name or location of a file
region_hash_locks HP-UX determines the size of the region spinlock pool
mvVideoDisplay IRIX Set/get movie video display mode.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service