advertisement

Article:
  Movies and Menus
Subject:   Resizing movie views
Date:   2002-01-26 20:36:03
From:   ryan_dingman
Response to: Resizing movie views


It is also worth noting that you can obtain the size of a movie without needing an NSMovieView. You can ask NSMovie for its QuickTime movie with -[NSMovie QTMovie] and then use GetMovieNaturalBoundsRect() to get its size. The following category on NSMovie is generally useful.


@implementation NSMovie (NSMovieExtensions)


- (NSSize)size;
{
Movie movie;
Rect movieRect;


movie = [self QTMovie];
GetMovieNaturalBoundsRect(movie, &movieRect);


return NSMakeSize(movieRect.right - movieRect.left, movieRect.bottom - movieRect.top);
}


@end


Hope this helps.


ryan


--
Ryan Dingman
FrontBase, Inc.
ryan@frontbase.com


1 to 1 of 1
  1. Resizing movie views
    2002-02-01 13:15:36  michele [View]

1 to 1 of 1