473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

creating drawing canvas with ruler

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
Nov 16 '05 #1
2 11232
"billy" <billy_dev@_@cox.net> ha scritto nel messaggio
news:V5BRd.32195$xt.25943@fed1read07...
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.
--
Reporting tool: http://www.neodatatype.net
Nov 16 '05 #2
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

"NeoNet" <ne**@neodatatype.net> wrote in message
news:AB**********************@news4.tin.it...
"billy" <billy_dev@_@cox.net> ha scritto nel messaggio
news:V5BRd.32195$xt.25943@fed1read07...
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.
--
Reporting tool: http://www.neodatatype.net

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Leif K-Brooks | last post by:
I'm considering writing a fairly basic vector drawing program using PyGTK. What's the best way to render it? What I'm thinking of is having everything render on a PIL image, then display that in...
0
by: the dark lord | last post by:
Greetings I wish someone can offer me some suggestions to optimize my code: I have a drawing surface and I wanted to create a pair of rulers for it like in popular image editing programs like...
2
by: Martin Horn | last post by:
Hi all, I'm adding basic drawing capability to an application that I am writing, and I have been having problems with making the graphics output persist when the application is re-sized,covered...
7
by: Pontifex | last post by:
Hi all, I heard or read that the next version of HTML will provide long-overdue drawing commands. Which version of Firefox, Opera or IE supports such new fancy stuff? Thanks!
5
by: Andrew Poulos | last post by:
Is there a right/best way to draw an ellipse using Canvas? (With VML there's the v:oval element which makes the exercise trivial). I tried drawing a 360 degree arc (a circle) and then scaling it...
1
by: Andrew | last post by:
Hello Everyone I am receiving an error in an application I am working on. The application when its done will be a Dungeons and Dragons Network game. I am having problems with the Networked...
7
by: jonahcat | last post by:
Hi, I have a flash movie (a ruler) that needs to float over an html page. The ruler size needs to stay fixed since it is measuring art pieces underneath. I can size the canvas to a fixed width say...
15
by: javelin | last post by:
I need to be able to create a javascript based drawing/signature box, and be able to save it. Can someone refer me to a script that will allow this, or even a 3rd party package for sale? It can't...
7
by: raylopez99 | last post by:
I have a logical drawing space much bigger than the viewport (the screen) and I'd like to center the viewport (the screen) to be at the center of the logical drawing space. After following the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.