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

xymrtext.h

Go to the documentation of this file.
00001 //* Módulo   : xymrtext.h                                                         
00002 // _Desc_    : Declara classe XYMultiRasterText.
00003 // _Autores_ : Carlos Henrique Levy, Jaudênia Cavalcante e Camilo Freire.
00004 // _Data_    : 8 mai 2000.
00005 
00006 #ifndef __XYMULTIRASTERTEXT_H
00007 #define __XYMULTIRASTERTEXT_H
00008 
00009 #include "xyrtext.h"
00010   
00011 //* XYMultiRasterText 
00012 //   Classe especializada responsável pelo desenho de textos raster em mais
00013 //   de uma linha.        
00014 class XYMultiRasterText : public XYRasterText
00015 {
00016    public:
00017 
00018  //* Construtores e Destrutor
00019    //* Construtor A
00020    XYMultiRasterText (const char* text,    // texto a ser desenhado
00021                       // posição em relação a área ocupada pelo gráfico
00022                       XYCoordinate x,      // coordenada x
00023                       XYCoordinate y,      // coordenada y
00024                       long color,          // cor do texto
00025                       int size,            // tamanho do texto
00026                       Typeface font,       // tipo de fonte usada
00027                       Style style,         // estilo de escrita
00028                       Alignment alignment,     // alinhamento (rosa dos ventos)
00029                       Orientation orientation, // orientação do texto
00030                       xybool underline = xyfalse,  // sublinhado (xytrue or xyfalse)
00031                       xybool visible = xytrue);    // visibilidade
00032 
00033    //* Construtor B
00034    XYMultiRasterText (const char* text,  // texto a ser desenhado
00035                       // posição em relação a área ocupada pelo gráfico
00036                       XYCoordinate x,        // coordenada x
00037                       XYCoordinate y,        // coordenada y
00038                       xybool visible = xytrue);  // visibilidade
00039 
00040    //* Construtor C
00041    XYMultiRasterText (
00042                       const char* text,        // texto a ser desenhado
00043                       long color,              // cor do texto
00044                       int size,                // tamanho do texto
00045                       Typeface font,           // tipo de fonte usada
00046                       Style style,             // estilo de escrita
00047                       Alignment alignment,     // alinhamento (rosa dos ventos)
00048                       Orientation orientation, // orientação do texto
00049                       xybool underline = xyfalse,  // sublinhado (xytrue or xyfalse)
00050                       xybool visible = xytrue);    // visibilidade
00051 
00052    //* Construtor D (atributos)
00053    XYMultiRasterText (long color,              // cor
00054                       int size,                // tamanho em pixel
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,  // confirma ou não sublinhado
00060                       xybool visible = xytrue);    // visibilidade
00061 
00062    //* Define o texto a ser desenhado
00063    virtual void text (const char* s);
00064    //* Consulta o texto a ser desenhado
00065    virtual char* text (void) const;
00066 
00067  //* Métodos de Draw
00068    //* Desenha um texto
00069    virtual void draw (void);
00070    //* Desenha um texto numa região
00071    virtual void draw (int xmin, int ymin, int xmax, int ymax) const;
00072 
00073  //* BoundingBox
00074    //* Retorna menor retângulo que contém o texto, suas coordenadas são dadas em pixel
00075    virtual void boundingBox (int& bxmin, int& bymin, int& bxmax, int& bymax) const;
00076 
00077    private:
00078 
00079    virtual void splitText();
00080 
00081    char **_mtexts;
00082    int _ntexts;
00083 
00084 };
00085 #endif
00086                         

XY
Tecgraf / PUC-Rio - Computer Graphics Technology Group