Hello newly! A couple of questions, one about drag & drop between layers and another about performance when editing them.
Drag & drop between layers:
The example code works great to drag an image from an ImageenMView to an ImageenView:
ImageEnView1DragDrop(TObject *Sender, TObject *Source, int X, int Y)
idx = this->ImageEnMView1->SelectedImage;
if (idx >= 0)
{
bmp = this->ImageEnMView1->GetTIEBitmap(idx);
this->ImageEnView1->LayersAdd(bmp);
this->ImageEnView1->CurrentLayer->PosX = this->ImageEnView1->XScr2Bmp( X );
this->ImageEnView1->CurrentLayer->PosY = this->ImageEnView1->YScr2Bmp( Y );
this->ImageEnMView1->ReleaseBitmap(idx, false);
}
But ... I would like to use "Assign" to change one image to another using Drag & Drop. Is there any way to know the index of the layer where the mouse is released? Something like this:
this->ImageEnView1->Layers[ this->ImageEnView1->CurrentLayer->LayerIndex ]->Bitmap->Assign( bmp );
Performance by moving a layer:
When moving a layer: With the mouse button pressed while I move it, its X, Y position is not updated and it works fast. But, at the moment when I stop moving the mouse, the X, Y coordinates are updated and produce an unnecessary delay. Would it be possible to force the X, Y coordinates of the layer to be updated only when the mouse button is released?
Thanks in advance!