Help! How can I place small bitmaps (25X25 pix) in one Timage? 
Author Message
 Help! How can I place small bitmaps (25X25 pix) in one Timage?

Hi.

I want to place several bitmaps (25X25 pix) in on Timage (250X250 pix)?
I want to place small icon like pictures so they form an array of 10X10
bitmaps in that one Timage....
Can anyone help????
Regards Leif M. Svendsen



Tue, 29 Feb 2000 03:00:00 GMT  
 Help! How can I place small bitmaps (25X25 pix) in one Timage?



Quote:
> Hi.

> I want to place several bitmaps (25X25 pix) in on Timage (250X250 pix)?
> I want to place small icon like pictures so they form an array of 10X10
> bitmaps in that one Timage....
> Can anyone help????
> Regards Leif M. Svendsen

Here's an outline of what should work:

1.  Create an in-memory 250x250 bitmap:

     VAR
          Bitmap:  TBitmap;
     ...
     Bitmap := TBitmap.Create;
     Bitmap.Width := 250;
     Bitmap.Height := 250;

2.  Draw your various 24x25 bitmaps on the larger bitmap:

     Bitmap.Canvas.Draw(    0, 0, Small1);
     Bitmap.Canvas.Draw(  25, 0, Small2);
     Bitmap.Canvas.Draw(  50, 0, Small3);
     ...
     Bitmap.Canvas.Draw(    0,25, Small11);
     ...
     Bitmap.Canvas.Draw(225,225,Small100);
     ...

    With Delphi 3 you can even draw these small bitmaps on the
    large bitmap with transparency if you'd like.

3.  Attach the large bitmap to your TImage:

    Image1.Picture.Graphic := Bitmap

_________________________________________________


MedTech Research Corporation
Lenexa, KS  66219  USA



Tue, 29 Feb 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using TImage to read/write bitmaps from Oracle

2. Interesing Delphi Tidbit -- Offscreen bitmaps/tImage Pointers/Problems

3. One Big Table or Several Small Tables?

4. Graphical GUI - simple and small one...

5. * John Glenn * One Small Step For Man * Mp3/Real Audio *

6. It's not bad canned meat...

7. window on an image, TImage Scrollbars..help

8. Overiding the paint method in TImage help

9. PIX 2

10. PIX & LIVE VIDEO - FREE

11. PIX 2 graphics library

12. TURBO PASCAL 6.0, Help with small program

 

 
Powered by phpBB® Forum Software