Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

xyrtext.h

Go to the documentation of this file.
00001 //* Módulo   : xyrtext.h                                                         
00002 // _Desc_    : Declara classe XYRasterText.
00003 // _Autores_ : Carlos Henrique Levy e Jaudênia Cavalcante.                       
00004 // _Data_    : 20 jun 97.                                                           
00005 
00006 #ifndef __XYRASTERTEXT_H
00007 #define __XYRASTERTEXT_H
00008 
00009 #include "xytext.h"
00010   
00011 //* XYRasterText 
00012 //   Classe especializada responsável pelo desenho de textos raster.        
00013 class XYRasterText : public XYText
00014 {
00015    public:
00016 
00017  //*enum TextSize #TextSize#
00018    //* Sugere possíveis tamanhos de fontes
00019    enum TextSize {
00020       xytiny     =  8,
00021       xysmall    = 10,
00022       xystandard = 12,
00023       xylarge    = 18
00024    };
00025 
00026  //* Construtores e Destrutor
00027    //* Construtor A
00028    XYRasterText (
00029         const char* text,    // texto a ser desenhado
00030         // posição em relação a área ocupada pelo gráfico
00031         XYCoordinate x,      // coordenada x
00032         XYCoordinate y,      // coordenada y
00033         long color,          // cor do texto
00034         int size,            // tamanho do texto
00035         Typeface font,       // tipo de fonte usada
00036         Style style,         // estilo de escrita
00037         Alignment alignment,     // alinhamento (rosa dos ventos)
00038         Orientation orientation, // orientação do texto
00039         xybool underline = xyfalse,  // sublinhado (xytrue or xyfalse)
00040         xybool visible = xytrue);    // visibilidade
00041 
00042    //* Construtor B
00043    XYRasterText (
00044         const char* text,  // texto a ser desenhado
00045         // posição em relação a área ocupada pelo gráfico
00046         XYCoordinate x,        // coordenada x
00047         XYCoordinate y,        // coordenada y
00048         xybool visible = xytrue);  // visibilidade
00049 
00050    //* Construtor C
00051    XYRasterText (
00052         const char* text,        // texto a ser desenhado
00053         long color,              // cor do texto
00054         int size,                // tamanho do texto
00055         Typeface font,           // tipo de fonte usada
00056         Style style,             // estilo de escrita
00057         Alignment alignment,     // alinhamento (rosa dos ventos)
00058         Orientation orientation, // orientação do texto
00059         xybool underline = xyfalse,  // sublinhado (xytrue or xyfalse)
00060         xybool visible = xytrue);    // visibilidade
00061 
00062    //* Construtor D (atributos)
00063    XYRasterText (
00064         long color,              // cor
00065         int size,                // tamanho em pixel
00066         Typeface font,           // tipo de fonte usada
00067         Style style,             // estilo de escrita
00068         Alignment alignment,     // alinhamento (rosa dos ventos)
00069         Orientation orientation, // orientação do texto
00070         xybool underline = xyfalse,  // confirma ou não sublinhado
00071         xybool visible = xytrue);    // visibilidade
00072 
00073    //* Destrutor da classe XYRasterText
00074    virtual ~XYRasterText (void);
00075 
00076  //* Define/Consulta atributos
00077    //* Define o tamanho do texto, em pixel
00078    virtual void size (int s);
00079    //* Consulta o tamanho do texto
00080    virtual int size (void) const;
00081 
00082  //* Métodos de Draw
00083    //* Desenha um texto
00084    virtual void draw (void);
00085    //* Desenha um texto numa região
00086    virtual void draw (int xmin, int ymin, int xmax, int ymax) const;
00087 
00088  //* BoundingBox
00089    //* Retorna menor retângulo que contém o texto, suas coordenadas são dadas em pixel
00090    virtual void boundingBox (int& bxmin, int& bymin, int& bxmax, int& bymax) const;
00091 
00092    private:
00093 
00094    int _size;        // tamanho do texto, em pixel (tiny, ...)
00095 };
00096 
00097 #endif
00098                         

XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group