Overloading Functions: Java, Color Modes & Choices

  • Context: Java 
  • Thread starter Thread starter NorrisP
  • Start date Start date
  • Tags Tags
    Functions
Click For Summary

Discussion Overview

The discussion revolves around the concept of function overloading in Java and the choices related to color modes for drawing applications. Participants explore the implications of overloading functions and the selection of color depths, ranging from basic to more complex color representations.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions whether function overloading in Java leads to a clumsy appearance in code.
  • Another participant asserts that there is nothing inherently wrong with function/operator overloading.
  • Participants discuss the choice of color modes, suggesting that the number of colors depends on the specific application needs.
  • A participant raises concerns about needing to create multiple arrays for a large number of colors, such as a million, and seeks clarification on how to manage this.
  • It is mentioned that if a library only supports 256 colors, alternatives exist for higher color depths, such as 16-bit, 24-bit, or 32-bit colors.
  • One participant notes that the Java 2D library supports 32-bit colors, which includes RGB representation.
  • Another participant inquires about suggestions for libraries that support higher color depths.

Areas of Agreement / Disagreement

Participants express differing views on the implications of function overloading and the appropriate number of colors to use, indicating that multiple competing views remain without a clear consensus.

Contextual Notes

Some limitations are noted regarding the dependency on the capabilities of the libraries being used, as well as the varying needs of different applications when it comes to color representation.

Who May Find This Useful

This discussion may be useful for software developers, particularly those working with Java and graphics programming, as well as those interested in understanding color representation in digital applications.

NorrisP
Messages
9
Reaction score
0
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
 
Technology news on Phys.org
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.
 
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.
 
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.
 
please can you suggest me library ?
 
thank you a lot
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K