Board index » cppbuilder » TImageList->Draw(TCanvas,int,int,int);

TImageList->Draw(TCanvas,int,int,int);

Hi All!

Is there anybody that knows how
TImageList->Draw(TCanvas,int,int,int); is implemented. I'm
trying to draw images in the stretch mode but they don't
come out stretched? The control has Stretch=true.

Any ideas on how to solve this?

CBuilder3 that is.

Greetings from Sweden:

    |  Sven-Olov Larsson
    |  s...@debugdata.se
    |  http://www.debugdata.se/

Dont take shit from a bug.
We try not to :)

 

Re:TImageList->Draw(TCanvas,int,int,int);


Here is the source code for TImageList::Draw (translated to C++):

void __fastcall TCustomImageList::Draw(Canvas *Canvas, int X, int Y, int
Index)
{
    const long DrawingStyles[] = {ILD_FOCUS, ILD_SELECTED, ILD_NORMAL,
ILD_TRANSPARENT};
    const long Images[] = {0, ILD_MASK};

    if(HandleAllocated)
    {
        // this is a Win32 API function
        ImageList_DrawEx(Handle, Index, Canvas->Handle, X, Y, 0, 0,
GetRGBColor(BkColor), GetRGBColor(BlendColor), DrawingStyles[DrawingStyle] |
Images[ImageType]);
    }

Quote
}

As you can see, it doesn't even take any Stretched property into account.

Gambit

Quote
Sven-Olov Larsson <s...@debugdata.se> wrote in message

news:3a6579fc.3026930@forums.inprise.com...
Quote
> Is there anybody that knows how
> TImageList->Draw(TCanvas,int,int,int); is implemented. I'm
> trying to draw images in the stretch mode but they don't
> come out stretched? The control has Stretch=true.

Other Threads