How to perform the copy operation of the line palette drawn with the mouse on the Group container?

I am working on a project where I need to perform a copy and paste operation. I draw a line with the mouse on the Group.Now container, I want to insert it. Please provide me a solution ...........

+4
source share
1 answer

First you need to define the data structure for your chart (for example, you define a Line with the properties start (dot), end (dot), width and color )

Then you need to create a user interface to display the Line inside the Canvas (group container). Ui is responsible for providing interactions such as resizing, color changing, etc. It can display many Line instances according to their properties ( start , end , width and color )

Now your copy and paste is simple.

Simply duplicate the selected Line instance and let the user interface know about it to duplicate the instance.

0
source

All Articles