Draws movie with scale factors (applies scaleX/Y multipliers, uses b2dSetScale+b2dDrawMovie, resets after).
Takes handle (movie handle from b2dLoadMovie, integer), x (screen X position in pixels), y (screen Y position in pixels), scaleX (horizontal scale factor, 1.0=original width, 2.0=double width), scaleY (vertical scale factor, 1.0=original height, 0.5=half height).
Returns nothing.
2D Overlay
Parameters & Returns
Parameters
handleInt
xInt
yInt
scaleXDouble
scaleYDouble
Returns
Void
Quick Summary
Draws movie with scale factors (applies scaleX/Y multipliers, uses b2dSetScale+b2dDrawMovie, resets after).
Takes handle (movie handle from b2dLoadMovie, integer), x (screen X position in pixels), y (screen Y position in pixels), scaleX (horizontal scale factor, 1.0=original width, 2.0=double width), scaleY (vertical scale factor, 1.0=original height, 0.5=half height).
Returns nothing.
Technical Exegesis...
Draws movie with scale factors (applies scaleX/Y multipliers, uses b2dSetScale+b2dDrawMovie, resets after). Takes handle (movie handle from b2dLoadMovie, integer), x (screen X position in pixels), y (screen Y position in pixels), scaleX (horizontal scale factor, 1.0=original width, 2.0=double width), scaleY (vertical scale factor, 1.0=original height, 0.5=half height). Returns nothing.
Draws movie with scale factors (applies scaleX/Y multipliers, uses b2dSetScale+b2dDrawMovie, resets after). Takes handle (movie handle from b2dLoadMovie, integer), x (screen X position in pixels), y (screen Y position in pixels), scaleX (horizontal scale factor, 1.0=original width, 2.0=double width), scaleY (vertical scale factor, 1.0=original height, 0.5=half height). Returns nothing. Applies scale (b2dSetScale(scaleX, scaleY) sets global 2D scale state), draws movie (b2dDrawMovie(handle, x, y) renders with applied scale), resets scale (b2dSetScale(1.0, 1.0) restores default scale after draw). Use to scale movie by factors (double size, half size, zoom effects), maintain aspect ratio (use same scaleX/scaleY value), or apply non-uniform scaling (different X/Y scales for stretch/squash effects). Scale factors: scaleX (multiplier for width, rendered width = movie->width x scaleX), scaleY (multiplier for height, rendered height = movie->height x scaleY), independent scaling (can be different, produces stretching/squashing if scaleX != scaleY), applied via global state (b2dSetScale affects all subsequent draws until reset). Use cases: (1) Double size (b2dDrawScaledMovie(movie,x,y,2.0,2.0) 2x zoom), (2) Half size (b2dDrawScaledMovie(movie,x,y,0.5,0.5) thumbnail view), (3) Maintain aspect (b2dDrawScaledMovie(movie,x,y,scale,scale) uniform scaling preserves aspect), (4) Stretch horizontal (b2dDrawScaledMovie(movie,x,y,1.5,1.0) widescreen effect). Common patterns: double = b2dDrawScaledMovie(movie,x,y,2.0,2.0) 2x size; half = 0.5,0.5 half size; uniform = scale,scale same X/Y maintains aspect; flip = -1.0,1.0 horizontal mirror. Scaling behavior: scaleX/Y=1.0 (original size, no scaling), scaleX/Y>1.0 (enlarge, rendered larger than original), scaleX/Y<1.0 (shrink, rendered smaller than original), scaleX/Y=0.0 (invisible, zero width/height), scaleX/Y<0.0 (flip/mirror, renders reversed along that axis). Difference from b2dDrawMovieScaled: b2dDrawMovieScaled uses target dimensions (width/height in pixels, calculates scale factors internally), b2dDrawScaledMovie uses scale factors (scaleX/scaleY multipliers, more direct control), both produce same result (if scale = targetSize / originalSize, equivalent scaling), choice depends on input (pixel dimensions vs scale multipliers). State management: scale applied (b2dSetScale sets global 2D state before draw), scale reset (b2dSetScale(1.0,1.0) restores after draw, prevents affecting other draws), scoped effect (scale only applies to this movie draw, not subsequent draws). Performance: same as b2dDrawMovie (scale applied via GPU transform matrix, negligible cost ~0.01-0.1ms), filtering quality (GPU bilinear filtering for smooth scaling, no artifacts for most scale factors), no additional memory (scaling done by GPU, no CPU-side resize). Validation: silently ignores if handle<=0 or not found (negative, zero, or invalid handle), safe with zero scale (produces invisible draw, no error), safe with negative scale (produces flipped/mirrored draw). Related: b2dDrawMovieScaled draws to target size (alternative using target width/height instead of scale factors), b2dDrawMovie draws unscaled (original movie dimensions, scaleX=scaleY=1.0), b2dSetScale sets global scale (manually control scaling without helper function, affects all draws until reset).