[wxPython] Draw a road map

Hello everybody,

I would like to have some advice.

I'm working on drawing a road map.
I read a data file which contains the central points coordinates (x, y)
of the road, the road width and the number of the lanes. I would like to

draw the road with one or several lane(s).

For the moment, I just use DrawLine with a big width for the pen. But
it's then difficult to draw over fine lines for the lanes, and the end
of the roads are rounded and not straight.

Can I use DrawRectangle to draw "tilted" rectangle
(DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height):
just the top left corner and the size are not enought to define a
"tilted" rectangle...)? Do you know other methods to do this?

Thank you very much in advance.
Carole.

Check out wxDC.DrawPolygon, along with some elementary geometry.

ยทยทยท

-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com>
         or <mailto:Chris.Fama@uq.net.au>
Brisbane, Australia
Phone: (0/+61)(7) 3870 5639 {10am-10pm GMT+10 on both these numbers please}
Mobile: (0/+61)(400) 833 700
-------------------------------------------------------------------------
Business page: <http://whollysnakes.com>
Personal page: <http://uq.net.au/~zzcfama&gt;
-------------------------------------------------------------------------

----- Original Message -----
From: "Carole Valentin" <carole@autosim.no>
To: <wxpython-users@lists.wxwindows.org>
Sent: Wednesday, July 25, 2001 11:54 PM
Subject: [wxPython] Draw a road map

Hello everybody,

I would like to have some advice.

I'm working on drawing a road map.
I read a data file which contains the central points coordinates (x, y)
of the road, the road width and the number of the lanes. I would like to

draw the road with one or several lane(s).

For the moment, I just use DrawLine with a big width for the pen. But
it's then difficult to draw over fine lines for the lanes, and the end
of the roads are rounded and not straight.

Can I use DrawRectangle to draw "tilted" rectangle
(DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height):
just the top left corner and the size are not enought to define a
"tilted" rectangle...)? Do you know other methods to do this?

Thank you very much in advance.
Carole.

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users