TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
jarah
NA
1
0
GraphicsPath curved line problem
Jun 16 2008 2:32 PM
I have a control with green background, and I want it to have a thin line shape.
Function DrawLine draws 2px black line, and I want my region clip to that line.
Evetything looks good, but i dont know why the AddCurve function draw CLOSED curve...
can anybody help me with this ? i need to have 2px width cuverd-line region.
I also tried to add another AddCurve function to the same path, but near begin end end point (in straight line) the region becomes thicker and in the middle it is ok - empty..
protected override void OnPaint( PaintEventArgs pe )
{
Graphics g = pe.Graphics;
DrawLine(g);
Point[] points = {_startXY, c, _endXY};
GraphicsPath path = new GraphicsPath();
path.AddCurve(points);
this.Region = new Region(path);
}
Reply
Answers (
0
)
Anyone else seen the new C# .NET CommandBars beta from Codejock? I think I like it :)
How to bind nested class objects to DataGridView?