4

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

ketan
  • 19,129
  • 42
  • 60
  • 98
Sunil486
  • 224
  • 1
  • 14
  • I have drawn a line with the help of mouse.and i am able to select line.but when i perform copy paste i am not able to do that.please help me – Sunil486 Apr 12 '13 at 06:24

1 Answers1

0

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

Next, you need to create a UI to render the Line inside the Canvas (group container). The ui is responsible for providing interactions such as resize, change color etc. as well. It can render a lot of Line instances according to their properties (start, end, width and color)

Now, your copy and paste are easy.

Just duplicate the selected Line instance and tell the UI to render the duplicated instance.

blo0p3r
  • 6,790
  • 8
  • 49
  • 68
Edison
  • 510
  • 1
  • 4
  • 9