View Full Version : printTextImage works?
ShUr1k3n
May 13th, 2007, 12:18
Hi everyone.
I'm using graphics.h and graphics.c from Yeldarb Tuts.
But when i use the function:
void printTextImage(int x, int y, const char* text, u32 color, Image* image);
or
void drawLineImage(int x0, int y0, int x1, int y1, Color color, Image* image);
Dont work. :S
but when i use:
void printTextScreen(int x, int y, const char* text, u32 color);
or
void drawLineScreen(int x0, int y0, int x1, int y1, Color color);
works just fine.
Can anyone help me?
Thanks in advance,
ShUr1k3n
yaustar
May 13th, 2007, 12:40
printTextImage and drawLineImage blits text to an image that you pass in. printTextScreen and drawLineScreen blits directly to the screen.
What doesn't work exactly?
parkermauney
May 13th, 2007, 13:18
I'm no coder, but I'm assuming the images don't show up.
ShUr1k3n
May 13th, 2007, 14:55
printTextImage and drawLineImage blits text to an image that you pass in. printTextScreen and drawLineScreen blits directly to the screen.
What doesn't work exactly?
First, thanks for the reply.
I know that printTextImage and drawLineImage blits text to an image that i pass in, but when i blit the image (blitAlphaImageToScreen). The text or the line that i draw does not show.
yaustar
May 13th, 2007, 15:33
Can you post the code where you use it, loading the image and blitting the image to the screen please?
ShUr1k3n
May 13th, 2007, 19:53
Can you post the code where you use it, loading the image and blitting the image to the screen please?
I found the "bug".
When i use this:
void blitAlphaImageToScreen();
the image does not show.
But when i use:
blitImageToScreen();
works just fine.
But i really want to blit a image with Tranparency (.png).
My code:
int user_main(SceSize args, void *argp)
{
// Overclocking CPU to 333mhz
scePowerSetClockFrequency(333, 333, 166);
//Initiate Graphics Usage
initGraphics();
//Image Handler
Image *image1;
//Create Image with size of Screen
image1 = createImage(SCREEN_WIDTH,SCREEN_HEIGHT);
while (1)
{
printTextImage(200,150,"GREEN TEST",green,image1);
blitAlphaImageToScreen(0,0,SCREEN_WIDTH,SCREEN_HEI GHT,image1,0,0); <- Does Not Work
blitImageToScreen(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,i mage1,0,0); <- Works Fine
sceDisplayWaitVblankStart();
flipScreen();
}
//Exit to XMB Menu
sceKernelExitGame();
return 0;
}
Any suggestion?
Powered by vBulletin® Version 4.2.3 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.