|
NOTA: La traducción de esta documentación es un esfuerzo personal y voluntario, no es un documento oficial de Sun Microsystems
ni Oracle ni está patrocinado por ninguna de estas empresas. Los documentos originales (en inglés) están disponibles en:
http://java.sun.com/docs/books/tutorial/.
Dirija cualquier comentario, petición, felicitación, etc. a tutorialesjava_@RROBA_codexion.com. |
Si desea ayudar a mantener en funcionamiento esta web, colaborar con la traducción de estos documentos o necesita que se traduzca algĂșn capĂtulo en concreto puede realizar una donación directa mediante Paypal:
|
This lesson shows you how to useGraphics2Dto display graphics with fancy outline and fill styles, transform graphics when they are rendered, constrain rendering to a particular area, and generally control the way graphics look when they are rendered. You'll also learn how to create complexShapeobjects by combining simple ones and how to detect when the user clicks on a displayed graphics primitive. These topics are discussed in the following sections:Transforming Shapes, Text, and Images
This section shows you how to modify the default transformation so that objects are translated, rotated, scaled, or sheared when they are rendered.Clipping the Drawing Region
You can use any shape as a clipping path--the area within which rendering takes place.Compositing Graphics
This section illustrates the various compositing styles supported byAlphaCompositeand shows you how to set the compositing style in theGraphics2Drendering context.Controlling Rendering Quality
This section describes the rendering hints thatGraphics2Dsupports and shows you how to specify your preference in the trade-off between rendering quality and speed.Constructing Complex Shapes from Geometry Primitives
This section shows you how to perform boolean operations onShapeobjects using theAreaclass.Supporting User Interaction
This section shows you how to perform hit detection on graphics primitives.