:: PlayerAdvance.org ::

:: PlayerAdvance.org :: (http://www.playeradvance.org/forum/index.php)
-   Aide au développement (http://www.playeradvance.org/forum/forumdisplay.php?f=185)
-   -   PSP Aide color pixel (http://www.playeradvance.org/forum/showthread.php?t=26282)

floorball92 19/07/2008 12h09

color pixel
 
Hi,

is there an function to draw an single pixel. Maybe like:
void draw_pixel(int x, int y, OSL_COLOR color);

I wrote an own function but it dosn' t work:

Code:

void draw_pixel(int x, int y, OSL_COLOR color){
        oslDrawLine(x, y, x, y, color);
}

bye

Cortes48 19/07/2008 12h28

Check if this work:

Code:

void draw_pixel(int x, int y, OSL_COLOR color){
        oslDrawLine(x, y, x+1, y+1, color);
}


Yodajr 19/07/2008 13h20

From OSLib documentation :

Code PHP:

void oslSetImagePixel OSL_IMAGE *     img,
                        
unsigned int    x,
                        
unsigned int    y,
                        
int             pixelValue     
    


The value depends on the pixelformat, it can be a palette entry number if the image is paletted, or a color in the format of the image

floorball92 19/07/2008 13h55

But I want to draw directly on the screen, so the other method is better I think.

I know its possible to create an Image an draw all at this, but this needs more RAM.

Is it better on this way??


Fuseau horaire GMT +2. Il est actuellement 20h34.

Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd. Tous droits réservés.
Version française #16 par l'association vBulletin francophone