A
Abhishek
Hello everyone,
I am a newbee & this is my first post so my questions might be naive but I
hope I get helped because I am just started for dotnet for my research.
My objective is to display a jpg image and then overlay on it a curve or a
rectangle that the user can select and modify. I made a panel control, used
DrawImage, and then added a paint event handler for the panel control in
which I drew both the image (using DrawImage ofcourse) and then the
rectangle (using DrawRectangle). I attached a click event with the panel
control which hit-tests the co-ordinates, changes the co-ordinates of the
rectangle drawn, and calls this.panel1.Invalidate(). This works but I am not
happy with the performance considering I will be doing this for a pocket pc.
I need suggestions. My basic problem is that I don't want the image to be
redrawn again and again as the user selects the rectangle and moves it
around.
I don't know if this is something to do with .net compact, that I had a
problem creating a GraphicsObject, it just does not compile. Is it even
supported?
Also from an architecture perspective I need a suggestion, I understand
drawing lines and curves, overlaying them over an image, allowing user to
modify them, must be a common requirement. I want to know the right
architecture to do it. I want to provide a functionality similar to there is
MS paint and the likes. Also please note when I mention rectangle it is just
to simplify my problem the curve that I wish to draw and allow the user to
modify would have a complex equations and set of points being calculated
from that equation which would also have set of control points which the
user can move and the curve will change its shape.
Pls help me. looking forward to replies! thanks in anticipation.
Abhishek
I am a newbee & this is my first post so my questions might be naive but I
hope I get helped because I am just started for dotnet for my research.
My objective is to display a jpg image and then overlay on it a curve or a
rectangle that the user can select and modify. I made a panel control, used
DrawImage, and then added a paint event handler for the panel control in
which I drew both the image (using DrawImage ofcourse) and then the
rectangle (using DrawRectangle). I attached a click event with the panel
control which hit-tests the co-ordinates, changes the co-ordinates of the
rectangle drawn, and calls this.panel1.Invalidate(). This works but I am not
happy with the performance considering I will be doing this for a pocket pc.
I need suggestions. My basic problem is that I don't want the image to be
redrawn again and again as the user selects the rectangle and moves it
around.
I don't know if this is something to do with .net compact, that I had a
problem creating a GraphicsObject, it just does not compile. Is it even
supported?
Also from an architecture perspective I need a suggestion, I understand
drawing lines and curves, overlaying them over an image, allowing user to
modify them, must be a common requirement. I want to know the right
architecture to do it. I want to provide a functionality similar to there is
MS paint and the likes. Also please note when I mention rectangle it is just
to simplify my problem the curve that I wish to draw and allow the user to
modify would have a complex equations and set of points being calculated
from that equation which would also have set of control points which the
user can move and the curve will change its shape.
Pls help me. looking forward to replies! thanks in anticipation.
Abhishek