API java : Line2D.Float


java.awt.geom
Class Line2D.Float

java.lang.Object
  extended by java.awt.geom.Line2D
      extended by java.awt.geom.Line2D.Float
All Implemented Interfaces:
Shape, Cloneable
Enclosing class:
Line2D

public static class Line2D.Float
extends Line2D

A line segment specified with float coordinates.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Line2D
Line2D.Double, Line2D.Float
 
Field Summary
 float x1
          The X coordinate of the start point of the line segment.
 float x2
          The X coordinate of the end point of the line segment.
 float y1
          The Y coordinate of the start point of the line segment.
 float y2
          The Y coordinate of the end point of the line segment.
 
Constructor Summary
Line2D.Float()
          Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).
Line2D.Float(float X1, float Y1, float X2, float Y2)
          Constructs and initializes a Line from the specified coordinates.
Line2D.Float(Point2D p1, Point2D p2)
          Constructs and initializes a Line2D from the specified Point2D objects.
 
Method Summary
 Rectangle2D getBounds2D()
          Returns the high-precision bounding box of this Line2D.
 Point2D getP1()
          Returns the start point.
 Point2D getP2()
          Returns the end point.
 double getX1()
          Returns the X coordinate of the start point in double precision.
 double getX2()
          Returns the X coordinate of the end point in double precision.
 double getY1()
          Returns the Y coordinate of the start point in double precision.
 double getY2()
          Returns the Y coordinate of the end point in double precision.
 void setLine(double X1, double Y1, double X2, double Y2)
          Sets the location of the endpoints of this Line2D to the specified double coordinates.
 void setLine(float X1, float Y1, float X2, float Y2)
          Sets the location of the endpoints of this Line2D to the specified float coordinates.
 
Methods inherited from class java.awt.geom.Line2D
clone, contains, contains, contains, contains, getBounds, getPathIterator, getPathIterator, intersects, intersects, intersectsLine, intersectsLine, linesIntersect, ptLineDist, ptLineDist, ptLineDist, ptLineDistSq, ptLineDistSq, ptLineDistSq, ptSegDist, ptSegDist, ptSegDist, ptSegDistSq, ptSegDistSq, ptSegDistSq, relativeCCW, relativeCCW, relativeCCW, setLine, setLine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x1

public float x1
The X coordinate of the start point of the line segment.


y1

public float y1
The Y coordinate of the start point of the line segment.


x2

public float x2
The X coordinate of the end point of the line segment.


y2

public float y2
The Y coordinate of the end point of the line segment.

Constructor Detail

Line2D.Float

public Line2D.Float()
Constructs and initializes a Line with coordinates (0, 0) -> (0, 0).


Line2D.Float

public Line2D.Float(float X1,
                    float Y1,
                    float X2,
                    float Y2)
Constructs and initializes a Line from the specified coordinates.

Parameters:
X1, Y1 - the first specified coordinates
X2, Y2 - the second specified coordinates

Line2D.Float

public Line2D.Float(Point2D p1,
                    Point2D p2)
Constructs and initializes a Line2D from the specified Point2D objects.

Parameters:
p1 - the first specified Point2D
p2 - the second specified Point2D
Method Detail

getX1

public double getX1()
Returns the X coordinate of the start point in double precision.

Specified by:
getX1 in class Line2D
Returns:
the x coordinate of this Line2D object's starting point in double precision.

getY1

public double getY1()
Returns the Y coordinate of the start point in double precision.

Specified by:
getY1 in class Line2D
Returns:
the x coordinate of this Line2D object's starting point in double precision.

getP1

public Point2D getP1()
Returns the start point.

Specified by:
getP1 in class Line2D
Returns:
the starting Point2D object of this Line2D.

getX2

public double getX2()
Returns the X coordinate of the end point in double precision.

Specified by:
getX2 in class Line2D
Returns:
the x coordinate of this Line2D object's ending point in double precision.

getY2

public double getY2()
Returns the Y coordinate of the end point in double precision.

Specified by:
getY2 in class Line2D
Returns:
the Y coordinate of this Line2D object's ending point in double precision.

getP2

public Point2D getP2()
Returns the end point.

Specified by:
getP2 in class Line2D
Returns:
the ending Point2D object of this Line2D.

setLine

public void setLine(double X1,
                    double Y1,
                    double X2,
                    double Y2)
Sets the location of the endpoints of this Line2D to the specified double coordinates.

Specified by:
setLine in class Line2D
Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

setLine

public void setLine(float X1,
                    float Y1,
                    float X2,
                    float Y2)
Sets the location of the endpoints of this Line2D to the specified float coordinates.

Parameters:
X1, Y1 - the first specified coordinate
X2, Y2 - the second specified coordinate

getBounds2D

public Rectangle2D getBounds2D()
Returns the high-precision bounding box of this Line2D.

Returns:
a Rectangle2D that is the high-precision bounding box of this Line2D.
See Also:
Shape.getBounds()

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

9 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-2101
Document créé le 31/08/06 03:50, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-rf-java/awt/geom/Line2D.Float.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,68 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
Combien d'entre nous sont-ils capables d'oublier un instant leurs tracas pour s'émerveiller de ce spectacle inouï? Il faut croire que la plus grande inconscience de l'home, c'est celle de sa propre vie.

Marc Levy [Extrait de Et si c'était vrai...]
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 14:48, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)