ImageEn, unit iexLayers

TIELayer.UserDataLen

TIELayer.UserDataLen


Declaration

property UserDataLen: Integer;


Description

Specifies the length of UserData buffer.

If this value is greater than zero:
When you save the layer (LayersSaveTo..) the content of the UserData buffer is saved (and restored with LayersLoadFrom..)
The user data is freed when the layer is destroyed


Demo

Demo  Demos\LayerEditing\UserDataInLayer\UserDataInLayer.dpr


Example

type
  TMyRecord = record
    SourceText: array[0..255] of AnsiChar;
    SourceWidth: integer;
    SourceHeight: integer;
  end;
  PMyRecord = ^TMyRecord;

var
  rc: PMyRecord;
begin
  New( rc )
  With rc^ do
  begin
    Width := ...;
    Height := ...;
    Text := ...;
  end;
  ImageEnView1.CurrentLayer.UserData := rc;
  ImageEnView1.CurrentLayer.UserDataLen := SizeOf( PMyRecord );
end;


See Also

UserData