API java : RenderContext


java.awt.image.renderable
Class RenderContext

java.lang.Object
  extended by java.awt.image.renderable.RenderContext
All Implemented Interfaces:
Cloneable

public class RenderContext
extends Object
implements Cloneable

A RenderContext encapsulates the information needed to produce a specific rendering from a RenderableImage. It contains the area to be rendered specified in rendering-independent terms, the resolution at which the rendering is to be performed, and hints used to control the rendering process.

Users create RenderContexts and pass them to the RenderableImage via the createRendering method. Most of the methods of RenderContexts are not meant to be used directly by applications, but by the RenderableImage and operator classes to which it is passed.

The AffineTransform parameter passed into and out of this class are cloned. The RenderingHints and Shape parameters are not necessarily cloneable and are therefore only reference copied. Altering RenderingHints or Shape instances that are in use by instances of RenderContext may have undesired side effects.


Constructor Summary
RenderContext(AffineTransform usr2dev)
          Constructs a RenderContext with a given transform.
RenderContext(AffineTransform usr2dev, RenderingHints hints)
          Constructs a RenderContext with a given transform and rendering hints.
RenderContext(AffineTransform usr2dev, Shape aoi)
          Constructs a RenderContext with a given transform and area of interest.
RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
          Constructs a RenderContext with a given transform.
 
Method Summary
 Object clone()
          Makes a copy of a RenderContext.
 void concatenateTransform(AffineTransform modTransform)
          Modifies the current user-to-device transform by appending another transform.
 void concetenateTransform(AffineTransform modTransform)
          Deprecated. replaced by concatenateTransform(AffineTransform).
 Shape getAreaOfInterest()
          Gets the ares of interest currently contained in the RenderContext.
 RenderingHints getRenderingHints()
          Gets the rendering hints of this RenderContext.
 AffineTransform getTransform()
          Gets the current user-to-device AffineTransform.
 void preConcatenateTransform(AffineTransform modTransform)
          Modifies the current user-to-device transform by prepending another transform.
 void preConcetenateTransform(AffineTransform modTransform)
          Deprecated. replaced by preConcatenateTransform(AffineTransform).
 void setAreaOfInterest(Shape newAoi)
          Sets the current area of interest.
 void setRenderingHints(RenderingHints hints)
          Sets the rendering hints of this RenderContext.
 void setTransform(AffineTransform newTransform)
          Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RenderContext

public RenderContext(AffineTransform usr2dev,
                     Shape aoi,
                     RenderingHints hints)
Constructs a RenderContext with a given transform. The area of interest is supplied as a Shape, and the rendering hints are supplied as a RenderingHints object.

Parameters:
usr2dev - an AffineTransform.
aoi - a Shape representing the area of interest.
hints - a RenderingHints object containing rendering hints.

RenderContext

public RenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform. The area of interest is taken to be the entire renderable area. No rendering hints are used.

Parameters:
usr2dev - an AffineTransform.

RenderContext

public RenderContext(AffineTransform usr2dev,
                     RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints. The area of interest is taken to be the entire renderable area.

Parameters:
usr2dev - an AffineTransform.
hints - a RenderingHints object containing rendering hints.

RenderContext

public RenderContext(AffineTransform usr2dev,
                     Shape aoi)
Constructs a RenderContext with a given transform and area of interest. The area of interest is supplied as a Shape. No rendering hints are used.

Parameters:
usr2dev - an AffineTransform.
aoi - a Shape representing the area of interest.
Method Detail

getRenderingHints

public RenderingHints getRenderingHints()
Gets the rendering hints of this RenderContext.

Returns:
a RenderingHints object that represents the rendering hints of this RenderContext.
See Also:
setRenderingHints(RenderingHints)

setRenderingHints

public void setRenderingHints(RenderingHints hints)
Sets the rendering hints of this RenderContext.

Parameters:
hints - a RenderingHints object that represents the rendering hints to assign to this RenderContext.
See Also:
getRenderingHints()

setTransform

public void setTransform(AffineTransform newTransform)
Sets the current user-to-device AffineTransform contained in the RenderContext to a given transform.

Parameters:
newTransform - the new AffineTransform.
See Also:
getTransform()

preConcatenateTransform

public void preConcatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by prepending another transform. In matrix notation the operation is:
  1. [this] = [modTransform] x [this]

Parameters:
modTransform - the AffineTransform to prepend to the current usr2dev transform.

preConcetenateTransform

@Deprecated
public void preConcetenateTransform(AffineTransform modTransform)
Deprecated. replaced by preConcatenateTransform(AffineTransform).

Modifies the current user-to-device transform by prepending another transform. In matrix notation the operation is:
  1. [this] = [modTransform] x [this]
This method does the same thing as the preConcatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.

Parameters:
modTransform - the AffineTransform to prepend to the current usr2dev transform.

concatenateTransform

public void concatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by appending another transform. In matrix notation the operation is:
  1. [this] = [this] x [modTransform]

Parameters:
modTransform - the AffineTransform to append to the current usr2dev transform.

concetenateTransform

@Deprecated
public void concetenateTransform(AffineTransform modTransform)
Deprecated. replaced by concatenateTransform(AffineTransform).

Modifies the current user-to-device transform by appending another transform. In matrix notation the operation is:
  1. [this] = [this] x [modTransform]
This method does the same thing as the concatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.

Parameters:
modTransform - the AffineTransform to append to the current usr2dev transform.

getTransform

public AffineTransform getTransform()
Gets the current user-to-device AffineTransform.

Returns:
a reference to the current AffineTransform.
See Also:
setTransform(AffineTransform)

setAreaOfInterest

public void setAreaOfInterest(Shape newAoi)
Sets the current area of interest. The old area is discarded.

Parameters:
newAoi - The new area of interest.
See Also:
getAreaOfInterest()

getAreaOfInterest

public Shape getAreaOfInterest()
Gets the ares of interest currently contained in the RenderContext.

Returns:
a reference to the area of interest of the RenderContext, or null if none is specified.
See Also:
setAreaOfInterest(Shape)

clone

public Object clone()
Makes a copy of a RenderContext. The area of interest is copied by reference. The usr2dev AffineTransform and hints are cloned, while the area of interest is copied by reference.

Overrides:
clone in class Object
Returns:
the new cloned RenderContext.
See Also:
Cloneable

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

8 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-3037
Document créé le 01/09/06 00:51, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/awt/image/renderable/RenderContext.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 14:58, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)