×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    11

    How to fit a bitmap in a rect??????????

    I saw the coding in a site.

    I want to know how to declare a bitmap & how to give the

    location of the bitmap.

    If anyone can modify the following code & give a clear code that

    contains all the declarations & definitions of the bitmap.

    It will be very helpful to me.

    Thanks in advance.

    TSize sizeTwips(15,15);
    iBitmap[3]->Resize(sizeTwips);
    iBitmapMask[3]->Resize(sizeTwips);
    TRect rect(0,0,100,100);
    gc.BitBltMasked(TPoint(xPos,yPos),iBitmap[3],rect,iBitmapMask[3],EFalse);


    Yours,
    PL.Ramanathan (ramanathan@texworld.com)

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    try the DrawBitmap functions instead, there you can define the target rect and OS will automatically re-size the image to fit into it.

    Anyway, for masked ones, you need to re-scale the images your self before drawing them.

    yucca

Posting Permissions

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