Returns movie width in pixels (from BBVHeader, original video resolution).
Takes handle (movie handle from b2dLoadMovie, integer).
Returns movie width in pixels (from BBVHeader, original video resolution).
2D Overlay
Parameters & Returns
Parameters
handleInt
Returns
Int
Quick Summary
Returns movie width in pixels (from BBVHeader, original video resolution).
Takes handle (movie handle from b2dLoadMovie, integer).
Returns movie width in pixels (from BBVHeader, original video resolution).
Technical Exegesis...
Returns movie width in pixels (from BBVHeader, original video resolution). Takes handle (movie handle from b2dLoadMovie, integer). Returns width in pixels (positive integer from movie->width, loaded from BBV header), returns 0 if invalid handle (handle not found or <=0). Reads movie->width (set during b2dLoadMovie from BBVHeader.width, original frame width).
Returns movie width in pixels (from BBVHeader, original video resolution). Takes handle (movie handle from b2dLoadMovie, integer). Returns width in pixels (positive integer from movie->width, loaded from BBV header), returns 0 if invalid handle (handle not found or <=0). Reads movie->width (set during b2dLoadMovie from BBVHeader.width, original frame width). Use to query video dimensions (calculate scaling, positioning, aspect ratio), allocate buffers (if processing frames), or center video (calculate x position based on screen width). Width from header: stored in BBVHeader during video creation (original frame width from encoding tool), loaded during b2dLoadMovie (read from header.bin in ZIP), immutable (never changes after load, reflects source video resolution). Use cases: (1) Center video (x = (screenWidth - b2dMovieWidth(movie)) / 2 center horizontally), (2) Aspect ratio (aspect = b2dMovieWidth(movie) / b2dMovieHeight(movie) calculate ratio), (3) Scale to fit (scaleX = targetWidth / b2dMovieWidth(movie) fit to target size), (4) Validate dimensions (If b2dMovieWidth(movie) > 1920 Then Print "High resolution video"). Common patterns: query = width = b2dMovieWidth(movie) get width; center = x = (screenW - movieW) / 2; aspect = w / h calculate ratio. Performance: cost zero (simple struct member read, trivial operation), safe to call frequently (can query every frame without overhead), lightweight (returns immediately, no state changes). Validation: returns 0 if handle<=0 or not found (negative, zero, or invalid handle), always returns valid integer (0 or positive width from header). Related: b2dMovieHeight queries height (paired with width for aspect ratio calculations), b2dDrawMovieScaled draws scaled (can scale to arbitrary width/height), b2dDrawScaledMovie draws with scale factors (scaleX applied to width), b2dLoadMovie loads movie (reads width from BBVHeader).