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, modify that, blit and update.
Jack Maney <jma...@adknowledge.com> hat geschrieben:
>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:
>my $app = SDLx::App->new( width=> 800, height => 600 );
>$app->draw_rect([ $app->width / 4, $app->height / 4,
>and found that changing the alpha portion of the rectangle color (eg fading the rectangle out completely via [0,0,255,0]) had no effect on the rendering of the rectangle. I did some searching on this and found some old<http://www.velocityreviews.com/forums/t906303-problem-with-alphachann...> questions<http://markmail.org/message/lqtdvmmjmiryumrw#query:+page:1+mid:q63xng...> from 4+ years ago, but I'm wondering if there is a simple workaround or an approach that has come about since then.
>Thank you for your time,
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.