473,412 Members | 2,294 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,412 software developers and data experts.

Line srawing

Dear all,
I need to draw a collection of hor/vert lines. The lines in the collection
are nor ordered.
Each line has it's start point end point width and height.

|Endpoint 2
|
StartPoint1_________|Endpoint1/StartPoint2
The problem is that in above situation the corner itsef (point where line
crosses) is empty.

If you "zoom" on the corner you would see:

||||||
||||||
||||||||||||||

When I draw each line I can't predict if this line will be start of the next
line or not. So I need some general solution to handle this situation.
Any ideas?
Boni
Nov 21 '05 #1
3 1000

"Boni" <oilia@nospam> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
Dear all,
I need to draw a collection of hor/vert lines. The lines in the
collection are nor ordered.
Each line has it's start point end point width and height.

|Endpoint 2
|
StartPoint1_________|Endpoint1/StartPoint2
The problem is that in above situation the corner itsef (point where line
crosses) is empty.

If you "zoom" on the corner you would see:

||||||
||||||
||||||||||||||


Looks like you are not calculating in the width of the line you are drawing
as a factor into the X location of the line...

hth,
Mythran

Nov 21 '05 #2
IMHO this should be calculated automatically by pen alignment. But I can't
get it work
"Mythran" <ki********@hotmail.comREMOVETRAIL> schrieb im Newsbeitrag
news:OH**************@TK2MSFTNGP10.phx.gbl...

"Boni" <oilia@nospam> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
Dear all,
I need to draw a collection of hor/vert lines. The lines in the
collection are nor ordered.
Each line has it's start point end point width and height.

|Endpoint 2
|
StartPoint1_________|Endpoint1/StartPoint2
The problem is that in above situation the corner itsef (point where line
crosses) is empty.

If you "zoom" on the corner you would see:

||||||
||||||
||||||||||||||


Looks like you are not calculating in the width of the line you are
drawing as a factor into the X location of the line...

hth,
Mythran

Nov 21 '05 #3

"Boni" <oilia@nospam> wrote in message
news:up**************@TK2MSFTNGP12.phx.gbl...
IMHO this should be calculated automatically by pen alignment. But I can't
get it work
"Mythran" <ki********@hotmail.comREMOVETRAIL> schrieb im Newsbeitrag
news:OH**************@TK2MSFTNGP10.phx.gbl...

"Boni" <oilia@nospam> wrote in message
news:uB**************@TK2MSFTNGP09.phx.gbl...
Dear all,
I need to draw a collection of hor/vert lines. The lines in the
collection are nor ordered.
Each line has it's start point end point width and height.

|Endpoint 2
|
StartPoint1_________|Endpoint1/StartPoint2
The problem is that in above situation the corner itsef (point where
line crosses) is empty.

If you "zoom" on the corner you would see:

||||||
||||||
||||||||||||||


Not sure how you are drawing...but I was able to draw 2 lines one
horizontal, one vertical...both with intersecting points (end point of horiz
is the same as the beginning point of the vertical) and they lined up even.
I tried with Graphics.DrawLine and I came up with the following:

||||||||||
|||||||||||||||
||||||||||

Then I tried Graphics.DrawLines and ended up with:

||||||||||
||||||||||||||||||||
||||||||||||||||||||

Which is what we want, I assume...look into the DrawLines method.

HTH,

Mythran

Nov 21 '05 #4

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

Similar topics

19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
7
by: jamait | last post by:
Hi all, I m trying to read in a text file into a datatable... Not sure on how to split up the information though, regex or substrings...? sample: Col1 Col2 ...
6
by: mary | last post by:
When we use string line; while (getline(in,line)) { out.write(line.c_str(),line.size()); out.put('\n'); } in.close();
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
3
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. ...
9
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still...
6
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
11
by: xdevel | last post by:
Hi, I don't understand option. if I write: #line 100 "file" I change file numeration to start to line 100 but what "file" ? any example?
19
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= | last post by:
This is an example of the data; 2007/07/27 11:00:03 ARES_INDICATION 010.050.016.002 404.2.01 (6511) RX 74 bytes 2007/07/27 11:00:03 65 11 26 02 BC 6C AA 20 76 93 51 53 50 76 13 48...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.