draw.sources
Class Draw

java.lang.Object
  extended by draw.sources.Image
      extended by draw.sources.Draw

public class Draw
extends Image

Image DRAW.
La structure d'un fichier *.draw est très simple.
Ce format est pris en compte par le cadre de l'application.
C'est le format par défaut. Le fichier se décompose en 7 parties.
2 couches suffisent à définir ces parties.
Types utilisées :

  • STRING (n * 16 bits)
  • DATE (20 bits)
  • INT (32 bits)
  • COLOR (24 bits)


  • Couche DRAWHEADER
    drawName : Nom du format (STRING)
    drawAuthor : Nom de l'auteur (STRING)
    drawDate : Date de création du type jjmmaa [010100;311299] (DATE)
    drawWidth : Largeur de l'image (INT)
    drawHeight : Hauteur de l'image (INT)
    drawSize : Taille de l'image en octet (INT)
    Couche DRAWIMAGE
    drawPixels : Pixels de l'image en RGB (COLOR[][])

    Version:
    1.0.0
    Author:
    COLIN Mathieu

    Field Summary
    static java.lang.String drawAuthor
              COLIN Mathieu.
    private  int drawDate
              Date de création de l'image.
    private  int drawHeight
              Hauteur de l'image.
    static java.lang.String drawName
              DRAW.
    private  java.awt.Color[][] drawPixels
              Tableau 2D des pixels en couleur.
    private  int drawSize
              Taille de l'image en octet.
    private  int drawWidth
              Largeur de l'image.
     
    Constructor Summary
    Draw(Cadre cadre)
              Crée une image DRAW.
     
    Method Summary
    private  int computeSize()
              Calcule la taille de l'image en octet.
    protected  Draw convert()
              Aucune convertion.
    private  int getDrawDate()
              Retourne drawDate.
    private  java.awt.Color[][] getDrawPixels()
              Retourne drawPixels.
    private  int getDrawSize()
              Retourne drawSize.
    protected  int getHeight()
              Retourne drawHeight.
    protected  java.lang.String getName()
              Retourne drawName.
    protected  int getWidth()
              Retourne drawWidth.
    static void main(java.lang.String[] args)
               
    protected  void read(java.lang.String fichier)
              Lit un fichier DRAW.
    protected  void write(java.lang.String fichier)
              Ecrit un fichier DRAW.
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    drawName

    public static final java.lang.String drawName
    DRAW.

    See Also:
    Constant Field Values

    drawAuthor

    public static final java.lang.String drawAuthor
    COLIN Mathieu.

    See Also:
    Constant Field Values

    drawDate

    private int drawDate
    Date de création de l'image.


    drawWidth

    private int drawWidth
    Largeur de l'image.


    drawHeight

    private int drawHeight
    Hauteur de l'image.


    drawSize

    private int drawSize
    Taille de l'image en octet.


    drawPixels

    private java.awt.Color[][] drawPixels
    Tableau 2D des pixels en couleur.

    Constructor Detail

    Draw

    public Draw(Cadre cadre)
    Crée une image DRAW.

    Parameters:
    cadre - Cadre.
    Method Detail

    computeSize

    private int computeSize()
    Calcule la taille de l'image en octet.

    Returns:
    Taille en octet.

    read

    protected void read(java.lang.String fichier)
    Lit un fichier DRAW.

    Specified by:
    read in class Image
    Parameters:
    fichier - Nom du fichier.

    write

    protected void write(java.lang.String fichier)
    Ecrit un fichier DRAW.

    Specified by:
    write in class Image
    Parameters:
    fichier - Nom du fichier.

    convert

    protected Draw convert()
    Aucune convertion.

    Specified by:
    convert in class Image
    Returns:
    Image DRAW.

    getName

    protected java.lang.String getName()
    Retourne drawName.

    Specified by:
    getName in class Image
    Returns:
    drawName.

    getDrawDate

    private int getDrawDate()
    Retourne drawDate.

    Returns:
    drawDate.

    getWidth

    protected int getWidth()
    Retourne drawWidth.

    Specified by:
    getWidth in class Image
    Returns:
    drawWidth.

    getHeight

    protected int getHeight()
    Retourne drawHeight.

    Specified by:
    getHeight in class Image
    Returns:
    drawHeight.

    getDrawSize

    private int getDrawSize()
    Retourne drawSize.

    Returns:
    drawDate.

    getDrawPixels

    private java.awt.Color[][] getDrawPixels()
    Retourne drawPixels.

    Returns:
    drawPixels.

    main

    public static void main(java.lang.String[] args)