Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Drawing Arcs, Pies, and Chords

Drawing Arcs, Pies, and Chords

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 878 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BrianE
    wrote on last edited by
    #1

    At first I didn't understand how a rectangle was involved with drawing these objects. After doing some experimenting I discovered that the rectangle is the bounding box for an ellipse, part of which makes up the arc, pie or chord.

    Nowhere have I seen it explicitly stated that this was how these objects were constructed. Nowhere have I found the more traditional method of specifying a centre and radius. Is there a simple explanation for this? I mean, sure it's one way of specifying things but it isn't intuitively obvious, especially with no explanation anywhere.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Well it does show in the samples
      http://doc.qt.io/qt-5/qpainter.html
      that Rect are used for most operations.

      If you need alternate way, it should be quite easy to add.

      This is user oriented forums so if you are asking why the developers choose such way,
      i'm not sure u will get answers here.

      The devs hang out here
      http://lists.qt-project.org/mailman/listinfo/

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BrianE
        wrote on last edited by
        #3

        Thanks. I certainly could create a little function for turning centre & radius in to rectangle. It just interested me that this method was used. I shall as in devs area.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved