How do I set a solid color for various attributes (e.g. foreground, background, line edge)?
Any solid color is defined in a chart model using a ColorDefinition instance: ColorDefinition cd = ColorDefinitionImpl.create(r[0-255], g[0-255], b[0-255], a[0-255]); ColorDefinition cd = ColorDefinitionImpl.create(r[0-255], g[0-255], b[0-255]); Or using one of the existing color definitions defined as a constant method call: i.e. ColorDefinition cd = ColorDefinitionImpl.RED(); ColorDefinition cd = ColorDefinitionImpl.BLUE(); … etc Note that the EMF framework mandates creation of new instances for every usage instance. If a single RED color definition instance is associated with object-1 and then re-associated with object-2, the original association is broken.
Related Questions
- How can I create contrast using my gray scale vision sensor if there is a color difference between the foreground and the background?
- What is the difference between B/W, Line art, solid color and Photo mode (or ImageType in Ghostscript)?
- How do I set a solid color for various attributes (e.g. foreground, background, line edge)?