Show
Ignore:
Timestamp:
07/20/09 11:30:19 (12 months ago)
Author:
artem
Message:

+ applied patch from Jochen Topf :

* text_convert="none|toupper|tolower"

Convert all text to upper/lower case before rendering. "none" doesn't do
anything with the text and is the default. Works for labels along lines
or at points.

* line_spacing="<number>"

Add this many pixels space between two lines in text labels that have
been broken into several lines. Default is 0. Doesn't do anything for
labels along lines.

* character_spacing="<number>"

Add this many pixels space between two characters in a text. Default is 0.
Currently only works for text labels on point geometries. This should
also be implemented for labels along lines, but I'll leave that for
another day.

* wrap_character="<character>"

Instead of breaking text into lines on spaces, use this character. This
is useful, when you want to make sure that labels are broken at the right
spot. Note that you'll probably want to make wrap_width small so that
your lines are actually broken, otherwise you'll see the wrap_character
in the output. Default is ' ' (space). Doesn't do anything for labels
along lines.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/agg_renderer.cpp

    r1090 r1254  
    765765       
    766766      UnicodeString text = feature[sym.get_name()].to_unicode(); 
     767      if ( sym.get_text_convert() == TOUPPER) 
     768      { 
     769         text = text.toUpper(); 
     770      } 
     771      else if ( sym.get_text_convert() == TOLOWER) 
     772      { 
     773         text = text.toLower(); 
     774      } 
     775 
    767776      if ( text.length() > 0 ) 
    768777      { 
     
    808817                     prj_trans.backward(label_x,label_y, z); 
    809818                     t_.forward(&label_x,&label_y); 
    810                      finder.find_point_placement(text_placement,label_x,label_y,sym.get_vertical_alignment()); 
     819                     finder.find_point_placement(text_placement,label_x,label_y,sym.get_vertical_alignment(),sym.get_line_spacing(),sym.get_character_spacing()); 
    811820                     finder.update_detector(text_placement); 
    812821                  }