Jump to content

UniImage and TShape


Dumpfbacke

Recommended Posts

 Hello everyone here. I have a VCL program which I would now like to convert to UniGui. It's an easy part here, at least I thought so in the beginning. There is a TImage in which I want to draw a rectangle, which is transparent as a TShape.
 I do my program like this Shape is a TShape;

OnMouseDown
 Shape.Left := X;
 Shape.Top := Y;
 Shape.Width := 0;
 Shape.Height := 0;

OnMouseMove
 Shape.Width := X - Shape.Left;
 Shape.Height := Y - Shape.Top;

OnMouseUP
 Shape.Width := X - Shape.Left;
 Shape.Height := Y - Shape.Top;
 repaint;

At the end I would also like to have the coordinates of the shape. There is no onMouseMove in TUniImage, but that wouldn't be so bad because the rectangle is mainly drawn at the end. Can someone help me here? Is there an alternative to TShape for UniGui? Thanks in advance for your help.

Tanja

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...