Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can I Distribute N rectangles into one rectangle in most appropriate manner?

How can I Distribute N rectangles into one rectangle in most appropriate manner?

Scheduled Pinned Locked Moved C / C++ / MFC
questionalgorithmshelp
4 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    mfc_surfer
    wrote on last edited by
    #1

    Hi all, I'm having a frame in a dialog box and I'd like to distribute N rectangles within it in most approprate manner. I'm looking for an algorithm to help me calculate the positions where I should draw the N rectangles. Any suggestion would be appreciated.

    B 1 Reply Last reply
    0
    • M mfc_surfer

      Hi all, I'm having a frame in a dialog box and I'd like to distribute N rectangles within it in most approprate manner. I'm looking for an algorithm to help me calculate the positions where I should draw the N rectangles. Any suggestion would be appreciated.

      B Offline
      B Offline
      BlackDice
      wrote on last edited by
      #2

      I think you'll have to elaborate a little more. :) If I write code in my sleep, does that make me brilliant, or just a lazy programmer? My articles www.stillwaterexpress.com BlackDice - the programmer formerly known as bdiamond

      M 2 Replies Last reply
      0
      • B BlackDice

        I think you'll have to elaborate a little more. :) If I write code in my sleep, does that make me brilliant, or just a lazy programmer? My articles www.stillwaterexpress.com BlackDice - the programmer formerly known as bdiamond

        M Offline
        M Offline
        mfc_surfer
        wrote on last edited by
        #3

        Sorry! I had forgotten to include the description :) I have a frame in a dialog box and I'd like to distribute N rectangles within it in most approprate manner. I mean in a way that it look like they've been put around some circles not just one circle.

        1 Reply Last reply
        0
        • B BlackDice

          I think you'll have to elaborate a little more. :) If I write code in my sleep, does that make me brilliant, or just a lazy programmer? My articles www.stillwaterexpress.com BlackDice - the programmer formerly known as bdiamond

          M Offline
          M Offline
          mfc_surfer
          wrote on last edited by
          #4

          Sorry! I had forgotten to include the description :) I have a frame in a dialog box and I'd like to distribute N rectangles within it in most approprate manner. I mean in a way that it look like they'ven been put around some circles not just one circle.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups