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...........
Asked
Active
Viewed 75 times
4
-
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 Answers
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.