Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4078198
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T17:38:41+00:00 2026-05-20T17:38:41+00:00

I want to draw a curve (a diode curve) in a picturebox using imagefrom

  • 0

I want to draw a curve (a diode curve) in a picturebox using imagefrom bitmap. I have a problem now and it is my point data are saved as Double and it is really important to keep the precesion.

for example a point in the plot I have is like this:

Voltage: -0.175 Current: -9.930625E-06

Yes, it is a Double! now how can I have a point to do for example:

        Point[] ptarray = new Point[3];
        ptarray[0] = new Point(250, 250);

Is there an alternative to Point[] that accepts double values? I have a 500×500 picture box. is there a way to convert those values to valid points that can still save precesion? I am wotking with micro Ampers (10^-6) and Voltages!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T17:38:42+00:00Added an answer on May 20, 2026 at 5:38 pm

    Well, if float is enough precision, then you can use the PointF struct:

    var point = new PointF(3.5f, 7.9f);
    

    If you really need to, you can define your own PointD struct:

    public struct PointD {
        public double X;
        public double Y;
    
        public PointD(double x, double y) {
            X = x;
            Y = y;
        }
    
        public Point ToPoint() {
            return new Point((int)X, (int)Y);
        }
    
        public override bool Equals(object obj) {
          return obj is PointD && this == (PointD)obj;
        }
        public override int GetHashCode() {
          return X.GetHashCode() ^ Y.GetHashCode();
        }
        public static bool operator ==(PointD a, PointD b) {
          return a.X == b.X && a.Y == b.Y;
        }
        public static bool operator !=(PointD a, PointD b) {
          return !(a == b);
        }
    }
    

    Equality code originally from here.

    The ToPoint() method lets you convert it to a Point object, though of course the precision will be truncated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PictureBox and I want to draw a diode curve by knowing
I'm using C# chart control to draw a nyquist plot. Now i want data
I have a set of points and i want to draw a curve which
I have a polyline that approximates a curve, and I want to draw it
i want to smooth and curve draw line on finger touch and using only
UPDATE I tried Crazy's solution but now I have problem showing data in a
I want to draw an area from given points on a map using the
i want to draw line, i have two textfiled in which i enter some
I want to Draw multiple line Graph with each line have different color and
I want to draw an arc using canvas using a gradient fill. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.