java.lang.Objectjava.awt.TexturePaint
The TexturePaint class provides a way to fill a
Shape with a texture that is specified as
a BufferedImage. The size of the BufferedImage
object should be small because the BufferedImage data
is copied by the TexturePaint object.
At construction time, the texture is anchored to the upper
left corner of a Rectangle2D that is
specified in user space. Texture is computed for
locations in the device space by conceptually replicating the
specified Rectangle2D infinitely in all directions
in user space and mapping the BufferedImage to each
replicated Rectangle2D.
Paint,
Graphics2D.setPaint(java.awt.Paint)| Field Summary |
|---|
| Fields inherited from interface java.awt.Transparency |
|---|
BITMASK, OPAQUE, TRANSLUCENT |
| Constructor Summary | |
|---|---|
TexturePaint(BufferedImage txtr,
Rectangle2D anchor)
Constructs a TexturePaint object. |
|
| Method Summary | |
|---|---|
PaintContext |
createContext(ColorModel cm,
Rectangle deviceBounds,
Rectangle2D userBounds,
AffineTransform xform,
RenderingHints hints)
Creates and returns a context used to generate the color pattern. |
Rectangle2D |
getAnchorRect()
Returns a copy of the anchor rectangle which positions and sizes the textured image. |
BufferedImage |
getImage()
Returns the BufferedImage texture used to
fill the shapes. |
int |
getTransparency()
Returns the transparency mode for this TexturePaint. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TexturePaint(BufferedImage txtr, Rectangle2D anchor)
TexturePaint object.
txtr - the BufferedImage object with the texture
used for paintinganchor - the Rectangle2D in user space used to
anchor and replicate the texture| Method Detail |
|---|
public BufferedImage getImage()
BufferedImage texture used to
fill the shapes.
BufferedImage.public Rectangle2D getAnchorRect()
Rectangle2D used to anchor and
size this TexturePaint.public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints)
createContext in interface Paintcm - the ColorModel that receives the
Paint data. This is used only as a hint.deviceBounds - the device space bounding box of the graphics
primitive being rendereduserBounds - the user space bounding box of the graphics
primitive being renderedxform - the AffineTransform from user space
into device spacehints - a RenderingHints object that can be used to
specify how the pattern is ultimately rendered
PaintContext used for generating color
patterns.PaintContextpublic int getTransparency()
TexturePaint.
getTransparency in interface TransparencyTexturePaint
as an integer value.TransparencyCes informations proviennent du site de http://java.sun.com
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 :
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.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
6 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.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)