Direct access to pixels and flood fills

Is there a way to directly access 1 pixel information?
i want to make a function that resizes a s surface. Is there any rotine
like this available? how can i do it?
The way i’m thinking doing it is by accessing each pixel from the
original surface and resize it in the new one.

also, how can i flood-fill a surface? or do a filled rectangle?? i’ve
some rotines on a book but it would have to use a put-pixel rotine and
that’s too slow! (i would like to write directly on memory…)

maybe my questions have all been answerd… i’m new here!:slight_smile:

daniel

Is there a way to directly access 1 pixel information?
i want to make a function that resizes a s surface. Is there any rotine
like this available? how can i do it?
The way i’m thinking doing it is by accessing each pixel from the
original surface and resize it in the new one.

also, how can i flood-fill a surface? or do a filled rectangle?? i’ve
some rotines on a book but it would have to use a put-pixel rotine and
that’s too slow! (i would like to write directly on memory…)

Take a look at the available libraries for SDL, in particular SGE:
http://www.libsdl.org/libaries.html

See ya,
-Sam Lantinga, Lead Programmer, Loki Software, Inc.