Re: Transparency?

2012-06-10 Thread Tobias Leich
? Is blit faster / > better? > > Best regards, > Alex > > -Ursprüngliche Nachricht- > Von: Tobias Leich [mailto:em...@froggs.de] > Gesendet: Sonntag, 10. Juni 2012 10:47 > An: Jack Maney; sdl-devel@perl.org > Betreff: AW: Transparency? > > Hi, you have

AW: Transparency?

2012-06-10 Thread Alex
Hi! When do we use blit and when do we use draw_something? Is blit faster / better? Best regards, Alex -Ursprüngliche Nachricht- Von: Tobias Leich [mailto:em...@froggs.de] Gesendet: Sonntag, 10. Juni 2012 10:47 An: Jack Maney; sdl-devel@perl.org Betreff: AW: Transparency? Hi, you have

AW: Transparency?

2012-06-10 Thread Tobias Leich
Hi, you have to know that draw_rect works differently for your app surface and regular surfaces. If you draw to your app, the pixels just get the value of the color. But if you do this to a regular surface, and blit that to your app surface, the pixels will be blendet... So create a new surface,

Transparency?

2012-06-10 Thread Jack Maney
Hello, I'm not so terribly new to Perl but very new to SDL. I was fiddling with the following "Hello, World!"-ish code in the SDL manual: use strict; use warnings; use SDL; use SDLx::App; my $app = SDLx::App->new( width=> 800, height => 600 ); $app->draw_rect([ $app->width / 4, $app->height