A concrete renderer based on Qt4 for conversion of Symbology Enconding Mark elements to an image pattern. It is a extension that considers marks with well-known name in the format: "ttf://font#code". Here, "font" is the name of a TrueType font and "code" is the character code. The character code can be enconded in hexadecimal, octonal or decimal. e.g.: "ttf://Arial#0x12", "ttf://Times#042", "ttf://Verdana#10".  
 More...
#include <GlyphMarkRenderer.h>
 | 
| static void  | decode (QString &name, QString &font, QChar &charCode) | 
|   | Decodes the given name extracting the parameters known by this renderer.  More...
  | 
|   | 
| static QString  | encode (const QString &font, const int &charCode) | 
|   | Encodes the given parameters to a format known by this renderer.  More...
  | 
|   | 
 | 
Methods that manipulate Qt4 concepts like QPainter, QImage, QBrush, QPen, QPainterPath, etc.  
 | 
| QPainter  | m_painter | 
|   | The painter used to draw the mark patterns.  More...
  | 
|   | 
| QPen  | m_pen | 
|   | The pen used to draw the mark patterns.  More...
  | 
|   | 
| QBrush  | m_brush | 
|   | The pen used to draw the mark patterns.  More...
  | 
|   | 
| static std::string  | sm_rendererKey | 
|   | The renderer key.  More...
  | 
|   | 
| void  | setup (QImage *img) | 
|   | Setups the internal QPainter and associates it with the given paint device (QImage).  More...
  | 
|   | 
| void  | end () | 
|   | Finalizes the internal QPainter resources.  More...
  | 
|   | 
| void  | draw (QImage *img, QPainterPath &path, const te::map::MarkRendererParams &markRenderParams) | 
|   | Draw the given path on the the given image using the internal pen and brush.  More...
  | 
|   | 
| bool  | getChar (QString &charCode, QChar &ch) | 
|   | Converts the character code to a char.  More...
  | 
|   | 
A concrete renderer based on Qt4 for conversion of Symbology Enconding Mark elements to an image pattern. It is a extension that considers marks with well-known name in the format: "ttf://font#code". Here, "font" is the name of a TrueType font and "code" is the character code. The character code can be enconded in hexadecimal, octonal or decimal. e.g.: "ttf://Arial#0x12", "ttf://Times#042", "ttf://Verdana#10". 
- See also
 - AbstractMarkRenderer 
 
Definition at line 56 of file GlyphMarkRenderer.h.
 
◆ GlyphMarkRenderer()
      
        
          | te::qt::widgets::GlyphMarkRenderer::GlyphMarkRenderer  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ ~GlyphMarkRenderer()
      
        
          | te::qt::widgets::GlyphMarkRenderer::~GlyphMarkRenderer  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ decode()
  
  
      
        
          | static void te::qt::widgets::GlyphMarkRenderer::decode  | 
          ( | 
          QString &  | 
          name,  | 
         
        
           | 
           | 
          QString &  | 
          font,  | 
         
        
           | 
           | 
          QChar &  | 
          charCode  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Decodes the given name extracting the parameters known by this renderer. 
- Parameters
 - 
  
    | name | The name dealt by this renderer. e.g. "ttf://Times#0x12".  | 
    | font | The font name that will be extracted from name.  | 
    | charCoder | The char code that will be extracted from name.  | 
  
   
 
 
◆ draw()
  
  
      
        
          | void te::qt::widgets::GlyphMarkRenderer::draw  | 
          ( | 
          QImage *  | 
          img,  | 
         
        
           | 
           | 
          QPainterPath &  | 
          path,  | 
         
        
           | 
           | 
          const te::map::MarkRendererParams &  | 
          markRenderParams  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Draw the given path on the the given image using the internal pen and brush. 
- Parameters
 - 
  
    | img | The image where the path will be drawn.  | 
    | path | The path that will be drawn.  | 
  
   
 
 
◆ encode()
  
  
      
        
          | static QString te::qt::widgets::GlyphMarkRenderer::encode  | 
          ( | 
          const QString &  | 
          font,  | 
         
        
           | 
           | 
          const int &  | 
          charCode  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Encodes the given parameters to a format known by this renderer. 
- Parameters
 - 
  
    | font | The font name. e.g. "Times".  | 
    | charCoder | The decimal char code. | 
  
   
- Returns
 - A string that represents the format known by this renderer. e.g. "ttf://Times#0x12".
 
- Note
 - The given char code will be enconded in hexadecimal. 
 
 
 
◆ end()
  
  
      
        
          | void te::qt::widgets::GlyphMarkRenderer::end  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Finalizes the internal QPainter resources. 
 
 
◆ getChar()
  
  
      
        
          | bool te::qt::widgets::GlyphMarkRenderer::getChar  | 
          ( | 
          QString &  | 
          charCode,  | 
         
        
           | 
           | 
          QChar &  | 
          ch  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Converts the character code to a char. 
- Parameters
 - 
  
    | charCode | The character code. It can be enconded in hexadecimal, octonal or decimal.  | 
    | ch | The result char from character code conversion. | 
  
   
- Returns
 - It returns true if the character code was converted. Otherwise, it returns false. 
 
 
 
◆ getSupportedMarks()
  
  
      
        
          | void te::qt::widgets::GlyphMarkRenderer::getSupportedMarks  | 
          ( | 
          std::vector< std::string > &  | 
          marks | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Method that informs the set of supported marks by a specific concrete mark renderer. 
- Parameters
 - 
  
    | marks | A pre-created vector of string that will be filled with the supported marks names.  | 
  
   
Implements te::map::AbstractMarkRenderer.
 
 
◆ render()
It generates the image pattern from the given Symbology Enconding Mark element. 
- Parameters
 - 
  
    | markRendererParams | The parameters that will be used to render the mark | 
  
   
- Returns
 - The RGBA image that represents the mark.
 
- Note
 - The caller will take the ownership of the returned pointer. 
 
Implements te::map::AbstractMarkRenderer.
 
 
◆ setup()
  
  
      
        
          | void te::qt::widgets::GlyphMarkRenderer::setup  | 
          ( | 
          QImage *  | 
          img | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Setups the internal QPainter and associates it with the given paint device (QImage). 
 
 
◆ m_brush
  
  
      
        
          | QBrush te::qt::widgets::GlyphMarkRenderer::m_brush | 
         
       
   | 
  
private   | 
  
 
 
◆ m_painter
  
  
      
        
          | QPainter te::qt::widgets::GlyphMarkRenderer::m_painter | 
         
       
   | 
  
private   | 
  
 
 
◆ m_pen
  
  
      
        
          | QPen te::qt::widgets::GlyphMarkRenderer::m_pen | 
         
       
   | 
  
private   | 
  
 
 
◆ sm_rendererKey
  
  
      
        
          | std::string te::qt::widgets::GlyphMarkRenderer::sm_rendererKey | 
         
       
   | 
  
staticprivate   | 
  
 
 
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/qt/widgets/se/GlyphMarkRenderer.h