• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • NPlot Charting Library
  • Bugs

Improved Clipping Alogorithm

Brought to you by: anmar, jamcquay, mhowlett
  • Summary
  • Files
  • Reviews
  • Support
  • Mailing Lists
  • Tickets ▾
    • Bugs
    • Patches
    • Feature Requests
  • News
  • Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

  • 0.9.10.0
  • 0.9.9.2

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#26 Improved Clipping Alogorithm

0.9.10.0
open
nobody
None
5
2008-11-19
2008-11-19
Anonymous
No

When you zoom in so that the graph does not contain any points, nothing is drawn. However if you zoom in to one point the lines are drawn to the points outside the GDI's clipping region. In the LinePlot.cs file I found the following code:

// do horizontal clipping here, to speed up
if ((dx1 < leftCutoff || rightCutoff < dx1) &&
(dx2 < leftCutoff || rightCutoff < dx2))
{
continue;
}

This code does not draw any lines if one point is on the left and the other is on the right. In this case you would want the line to be drawn. Here is an update to that clipping code that takes into account that scenario:

if (dx1 < leftCutoff && dx2 < leftCutoff)
{
// Both points are to the left of the clipping region.
continue;
}
else if (dx1 > rightCutoff && dx2 > rightCutoff)
{
// Both points are to the right of the clipping region.
continue;
}

If you have further questions, please feel free to contact me.

Bob Cravens (bob.cravens@gmail.com)

Discussion

  • Nobody/Anonymous

    Nobody/Anonymous - 2008-11-19
     
    LinePlot.cs
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.