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 4003524
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:09:46+00:00 2026-05-20T08:09:46+00:00

I want to draw a line from point A to point B. However the

  • 0

I want to draw a line from point A to point B. However the lines itself should be intelligent in the sense that if point B is exactly below point A a straight line should get drawn. But if the point B is below A and little far horizontally from A then a line should get drawn in right angled manner. I hope you are getting me. If you may have used any UML tool like edraw Max or any other you may have seen these types of lines. Any idea how can we achieve this?

Thanks in advance 🙂

  • 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-20T08:09:47+00:00Added an answer on May 20, 2026 at 8:09 am

    Here’s some code:

    void connectPoints(Point a, Point b)
    {
        Point middlePoint1(a.x, (a.y + b.y)/2);
        Point middlePoint2(b.x, (a.y + b.y)/2);
        drawLine(a, middlePoint1);
        drawLine(middlePoint1, middlePoint2);
        drawLine(middlePoint2, b);
    }
    

    To clarify, the asker actually wants 3-segment axis-aligned lines that look like most connections here:
    style

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

Sidebar

Related Questions

I want to draw a line in Crystal report. I can do that from
I want to draw line from one point to another unknown point.I want to
I want to draw a 3d line from one 3d point to another 3d
I want to plot a line from one well-defined point to another and then
How can I draw a perpendicular on a line segment from a given point?
I want to draw line in table view cell so that I can place
i want to draw line, i have two textfiled in which i enter some
I want to draw line on UIImageView. I already draw line on UIImageView but
I want to Draw multiple line Graph with each line have different color and
I want to draw this in my view to draw this line, I have

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.