SDL_Rect *rect;
CODE:
SDL_GetClipRect(surface, rect);
+
+
+
+int
+video_lock_YUV_overlay ( overlay )
+ SDL_Overlay *overlay
+ CODE:
+ RETVAL = SDL_LockYUVOverlay(overlay);
+ OUTPUT:
+ RETVAL
+
+void
+video_unlock_YUV_overlay ( overlay )
+ SDL_Overlay *overlay
+ CODE:
+ SDL_UnlockYUVOverlay(overlay);
+
+int
+video_display_YUV_overlay ( overlay, dstrect )
+ SDL_Overlay *overlay
+ SDL_Rect *dstrect
+ CODE:
+ RETVAL = SDL_DisplayYUVOverlay ( overlay, dstrect );
+ OUTPUT:
+ RETVAL
+
+
RETVAL
#endif
-
-int
-LockYUVOverlay ( overlay )
- SDL_Overlay *overlay
- CODE:
- RETVAL = SDL_LockYUVOverlay(overlay);
- OUTPUT:
- RETVAL
-
-void
-UnlockYUVOverlay ( overlay )
- SDL_Overlay *overlay
- CODE:
- SDL_UnlockYUVOverlay(overlay);
-
-int
-DisplayYUVOverlay ( overlay, dstrect )
- SDL_Overlay *overlay
- SDL_Rect *dstrect
- CODE:
- RETVAL = SDL_DisplayYUVOverlay ( overlay, dstrect );
- OUTPUT:
- RETVAL
-
Uint32
OverlayFormat ( overlay, ... )
SDL_Overlay *overlay
use SDL::Color;
use SDL::Surface;
use SDL::Config;
+use SDL::Overlay;
use Devel::Peek;
use Data::Dumper;
use Test::More;
use SDL::Rect;
-plan ( tests => 41);
+plan ( tests => 44);
use_ok( 'SDL::Video' );
blit_surface
set_clip_rect
get_clip_rect
+ lock_YUV_overlay
+ unlock_YUV_overlay
+ display_YUV_overlay
/;
can_ok ('SDL::Video', @done);
for(my $i=0;$i<256;$i++){
$b_w_colors[$i] = SDL::Color->new($i,$i,$i);
}
+my $overlay = SDL::Overlay->new(200 , 220, SDL_IYUV_OVERLAY, $display);
+
+is( SDL::Video::lock_YUV_overlay($overlay), 0, '[lock_YUV_overlay] returns a 0 on success');
+SDL::Video::unlock_YUV_overlay($overlay); pass '[unlock_YUV_overlay] ran';
+my $display_at_rect = SDL::Rect->new(0, 0, 100, 100);
+is( SDL::Video::display_YUV_overlay( $overlay, $display_at_rect), 0 ,'[display_YUV_overlay] returns 0 on success');
+
+
my $hwdisplay = SDL::Video::set_video_mode(640,480,8, SDL_HWSURFACE );
if(!$hwdisplay){
GL_set_attribute
GL_swap_buffers
GL_attr
- lock_YUV_overlay
- unlock_YUV_overlay
- display_YUV_overlay
/;
my $why = '[Percentage Completion] '.int( 100 * $#done / ($#done + $#left) ) ."\% implementation. $#done / ".($#done+$#left);