Skip to Main Content
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
book

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

by Alejandro Terrazas, John Ostuni, Michael Barlow
November 2002
Intermediate to advanced content levelIntermediate to advanced
848 pages
19h 59m
English
Sams
Content preview from Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Transparency and Compositing

Many visually impressive effects can be made using transparency and composite overlay.

Composite attributes are generally set in an AlphaComposite object and added to the Graphics2D context with the Graphics2D.setComposite() method. There is no direct way to instantiate an AlphaComposite object. Instead, a so-called factory method, AlphaComposite.getInstance(), is called. There are two variations of the getInstance() method; the first has one argument specifying the mixing rule to use (discussed next). The second version of the getInstance() method has both the argument for specifying the mixing rule as well as an argument specifying the transparency value to use. The transparency value ranges from 0–1 (in floating ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
JavaFX 9 by Example

JavaFX 9 by Example

Carl Dea, Gerrit Grunwald, José Pereda, Sean Phillips, Mark Heckler

Publisher Resources

ISBN: 0672320940Purchase book