Results 1 to 6 of 6

Thread: printTextImage works?

                  
   
  1. #1

    Default printTextImage works?

    Hi everyone.

    I'm using graphics.h and graphics.c from Yeldarb Tuts.

    But when i use the function:

    Code:
    void printTextImage(int x, int y, const char* text, u32 color, Image* image);
    or

    Code:
    void drawLineImage(int x0, int y0, int x1, int y1, Color color, Image* image);
    Dont work. :S

    but when i use:
    Code:
    void printTextScreen(int x, int y, const char* text, u32 color);
    or

    Code:
    void drawLineScreen(int x0, int y0, int x1, int y1, Color color);
    works just fine.

    Can anyone help me?

    Thanks in advance,

    ShUr1k3n

  2. #2
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    84

    Default

    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?

  3. #3

    Default

    I'm no coder, but I'm assuming the images don't show up.

  4. #4

    Default

    Quote Originally Posted by yaustar View Post
    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.

  5. #5
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    84

    Default

    Can you post the code where you use it, loading the image and blitting the image to the screen please?

  6. #6

    Default

    Quote Originally Posted by yaustar View Post
    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:

    Code:
    void blitAlphaImageToScreen();
    the image does not show.

    But when i use:

    Code:
    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •