evgeniuz
evgeniuz

Reputation: 2769

Java 2D additive colors

Are there any way to draw with additive colors using Graphics2D. E. g. if cyan and red lines overlap, their intersection is of white color? Thanks.

Upvotes: 0

Views: 636

Answers (1)

jackrabbit
jackrabbit

Reputation: 5663

It sounds like you want to enable XOR mode, but the results are not well defined and it may not do what you want.

Perhaps using an AlphaComposite you can achieve what you want? The outcome is more predictable.

Upvotes: 1

Related Questions