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. How to draw very many dots ?
Forum Updated to NodeBB v4.3 + New Features

How to draw very many dots ?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 277 Views
  • 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.
  • E Offline
    E Offline
    egusa
    wrote on last edited by
    #1

    Hi.
    I want to draw very many dots.
    Its dots are black and white, and the colors change with the 0s and 1s of certain 8-bit hexadecimal numbers.

    ex)
    The number is 10101010, It color is BWBWBWBW (B = black, W = white)
    One bit is one point, and there are many of these 8 bits.

    Normally, you would use a For statement to read and draw one bit at a time.
    However, the number of points is very large, and the process becomes very heavy.
    Is it possible to read all the bits at once and draw them all at once?

    jsulmJ 1 Reply Last reply
    0
    • E egusa

      Hi.
      I want to draw very many dots.
      Its dots are black and white, and the colors change with the 0s and 1s of certain 8-bit hexadecimal numbers.

      ex)
      The number is 10101010, It color is BWBWBWBW (B = black, W = white)
      One bit is one point, and there are many of these 8 bits.

      Normally, you would use a For statement to read and draw one bit at a time.
      However, the number of points is very large, and the process becomes very heavy.
      Is it possible to read all the bits at once and draw them all at once?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @egusa There is QImage::Format_Mono in https://doc.qt.io/qt-5/qimage.html#Format-enum - sounds like you could use this format to create your image and then draw it.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 1 Reply Last reply
      0
      • jsulmJ jsulm

        @egusa There is QImage::Format_Mono in https://doc.qt.io/qt-5/qimage.html#Format-enum - sounds like you could use this format to create your image and then draw it.

        E Offline
        E Offline
        egusa
        wrote on last edited by
        #3

        @jsulm
        Thanks a lot !
        At least I was able to give it shape.

        1 Reply Last reply
        0

        • Login

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