-
February 18th, 2010, 02:56 PM
#1
How to implement Fill tool for a paint application in WPF.
Hi,
I am implementing Paint application in WPF. I am able to implement pencil tool and line tool. But I am unable to implement fill tool which will help me to color a shape (like on in ms paint)
See my main problem is not to color shapes like rectangle or ellipse but a custom shape which i draw using my pencil tool. To make it more clear following is logic of my pencil tool.
Here each line is a object and I have to fill a shape is is created by numerous of such object.
Pencil Tool Logic
get initial_coordinates coordinates
function mousemove
{
if(mousemoves)
{
final_coordinates = get mouse coordinates
draw line(inital_coordinates, final coordinates)
initial_coordinates = final_coordinates;
}
}
Thanks
-Sanchit
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|