X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDLx-Surface.html-inc;h=2c71ab2c04f8afc6a42715aab4709a799c574b7b;hb=0b221bb4fce84647a6cb9d7343de7330fb561c71;hp=e2b519622e5a15ec1bee726706cfa336af5be517;hpb=33a8f248a8db04af5001502a1a2f3cd1c28e7677;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDLx-Surface.html-inc b/pages/SDLx-Surface.html-inc index e2b5196..2c71ab2 100644 --- a/pages/SDLx-Surface.html-inc +++ b/pages/SDLx-Surface.html-inc @@ -26,9 +26,12 @@
  • update
  • draw_rect
  • draw_line
  • +
  • draw_circle
  • +
  • draw_circle_filled
  • +
  • draw_gfx_text
  • -
  • AUTHOR +
  • AUTHORS

  • @@ -96,7 +99,7 @@

    display

    -

    If SDLx::App::new or SDL::Video::get_video_mode called before then:

    +

    If SDLx::App::new or SDL::Video::get_video_mode called before then:

     my $appx = SDLx::Surface::display(); 
     
     
    @@ -185,7 +188,7 @@ This is useful when the surface you have isn't an SDLx::Surface, bu

    flip

    -

    Applies SDL::Video::flip to the Surface, with error checking.

    +

    Applies SDL::Video::flip to the Surface, with error checking.

    Returns $self

    @@ -197,7 +200,7 @@ This is useful when the surface you have isn't an SDLx::Surface, bu $sdlx_surface->update( [ SDL::Rect->new(0,0,1,2) ... ]); # defined rects are updated -

    Applies SDL::Video::update_rect for no rect or 1 array ref. Applies SDL::Video::update_rects for array of SDL::Rects.

    +

    Applies SDL::Video::update_rect for no rect or 1 array ref. Applies SDL::Video::update_rects for array of SDL::Rects.

    Returns $self

    @@ -225,11 +228,55 @@ This is useful when the surface you have isn't an SDLx::Surface, bu

    Returns $self

    -

    AUTHOR

    Top

    -
    -
     kthakore 
    +

    draw_circle

    +
    +
     $sdlx_surface->draw_circle( [$x1, $y1], $radius, \@color ); 
     
     
    +

    Draws an unfilled circle at ($x1,$y1) of size $radius and $color.

    +

    Returns $self

    + +
    +

    draw_circle_filled

    +
    +
     $sdlx_surface->draw_filled_circle( [$x1, $y1], $radius, \@color ); 
    +
    +
    +

    Draws an filled circle at ($x1,$y1) of size $radius and $color.

    +

    Returns $self

    + + + + + + + + +
    +

    draw_gfx_text

    +
    +

    Draw text using gfx (not pretty but fast) at give vector, color.

    +
     $surf->draw_gfx_text( [0,0], 0xffffffff, "fooo");
    + $surf->draw_gfx_text( [10,10], [20,20,20,20], "fooo");
    +
    +
    +

    You can also set the gfx font but passing a hash reference as shown below.

    +
     my $f = '';
    + open( my $FH, '<', 'test/data/5x7.fnt');
    + binmode ($FH);
    + read($FH, $f, 4096);
    + close ($FH);
    +
    + my $font =  {data=>$f, cw => 5, ch => 7};
    + $surf->draw_gfx_text( [0,0], 0xffffffff, "fooo", $font );
    +
    +
    +

    Returns $self

    + +
    +

    AUTHORS

    Top

    +
    +

    See AUTHORS in SDL.

    \ No newline at end of file