Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Overloading functions

  1. Jan 8, 2006 #1
    Will overloading in Java create clumpsy look,use ?

    Also, in ordor to draw with color, will you chose to create 16, 32,64,128,256 color modes ? which one you often chose ?
    Thanks you very much
     
  2. jcsd
  3. Jan 8, 2006 #2

    dduardo

    User Avatar
    Staff Emeritus

    1) There is nothing wrong with function/operator overloading.

    2) Pick the number of colors you want to use. If you need 256 colors, then go with that, if not pick less. It is completely dependent on your application.
     
  4. Jan 8, 2006 #3
    thank you dduardo, but if 256, 256 mean I must create 256 array of color ?
    but what if it bigger than 256 like a million of color.?
    I need create many color, i see my computer have million color, i need distingush each of them.
     
  5. Jan 8, 2006 #4

    dduardo

    User Avatar
    Staff Emeritus

    If the library your using only has support for 8bits = = 2^8 = 256 colors and you need something like 16bit, 24bit or 32bit colors than you need to find a library that handles that amount. Unless your drawing pictures, 256 colors is probably more than enough. The java 2d library supports 32bit colors. 8bits for red 8 bits for green and 8 bits for blue = 32bit RGB.

    If you want CYMK, that's a whole other story.
     
  6. Jan 8, 2006 #5
    please can you suggest me library ?
     
  7. Jan 8, 2006 #6

    dduardo

    User Avatar
    Staff Emeritus

  8. Jan 8, 2006 #7
    thank you a lot
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?