ImageEn, unit IEVect

TImageEnVect.ObjBitmap

TImageEnVect.ObjBitmap


Declaration

property ObjBitmap[hobj: integer]: TIEBitmap;


Description

ObjBitmap is the image (bitmap) that hobj shows. hobj is iekBITMAP type.

If ShareBitmaps is true, all identical images are stored in the some memory space (this frees much memory).
However ObjBitmap always makes a copy of the specified TIEBitmap object.

hobj is the ID of the object. You can also specify IEV_NEXT_INSERTED_OBJECT (-1) which refers to the next object to be inserted or IEV_PREVIOUS_INSERTED_OBJECT (-2) for the last object inserted.


Examples

// Copy the image of ImageEnView1 to the next object to insert
ImageEnVect1.ObjBitmap[IEV_NEXT_INSERTED_OBJECT] := ImageEnView1.IEBitmap;

// Load an image from file and add as an object
aBitmap := TIEBitmap.Create;
try
  aBitmap.LoadFromFile( 'd:\002.png' );
  hObj := ImageEnVect1.AddNewObject();
  ImageEnVect1.ObjKind[ hObj ] := iekBITMAP;
  ImageEnVect1.ObjBitmap[ hObj ] := aBitmap;
  ImageEnVect1.SetObjRect( hobj, Rect( 100, 100, 200, 200 ), True );
finally
  aBitmap.Free;
end;


Transition Information

If you are transitioning your code to TImageEnView Layers, instead of ObjBitmap, use: TIEImageLayer.Bitmap
Note: TIELayer.Bitmap is a TIEBitmap

TIEImageLayer( ImageEnView1.CurrentLayer ).Bitmap...