creating drawing canvas with ruler

  • Thread starter Thread starter billy
  • Start date Start date
B

billy

I'm working on a sort of paint program that has the usual canvas pane in the
middle of the main form. I'm working on that class and have a couple quick
questions.. actually more like I'm looking for opinions.

1) I want a ruler running along from top left to top right and from top left
to bottom left. I want to use a skinny UserControl or something that runs
the respective length. I could simply track the mouse and draw the little
line on it. Is there a better control to use?

2) There are a few different ways to render the actual images themselves
(this app will allow the images to be modified while on the canvas) but does
anyone here have any experience going through the effort of using one method
over the other? I could use regular drawing APIs since the real cpu
intensive work here isn't just displaying but rendering the changes to a
buffer and then displaying it. I could use System.Drawing (which is based on
GDI+ I think) or DirectX or ?

Thanks for any help on this. There are obvious ways to do these things but
I'm wondering if there are any absolute correct ways, specifically on the
canvas drawing. Thanks again for any input,

~billy
 
"billy" <billy_dev@[email protected]> ha scritto nel messaggio


1) I want a ruler running along from top left to top right and from top left
to bottom left. I want to use a skinny UserControl or something that runs
the respective length. I could simply track the mouse and draw the little
line on it. Is there a better control to use?

.... Do you mean something like in my app (see singature)?
You can start from the idea of
http://www.codeproject.com/cs/miscctrl/ruler.asp
2) There are a few different ways to render the actual images themselves
(this app will allow the images to be modified while on the canvas) but does
anyone here have any experience going through the effort of using one method
over the other? I could use regular drawing APIs since the real cpu
intensive work here isn't just displaying but rendering the changes to a
buffer and then displaying it. I could use System.Drawing (which is based on
GDI+ I think) or DirectX or ?

I didn't undersood :(
But I think you can do all via System.Drawings.
 
Wow, what an awesome control. That does exactly what I need it to. Is there
any licensing fee? This application is really something I'm doing at home to
get myself into c# and will probably never see the light of day. Thanks for
the article regardless. Bye,

~billy
 
Back
Top