[GRASS-SVN] r32121 - grass/trunk/display/d.vect
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jul 15 05:09:59 EDT 2008
Author: glynn
Date: 2008-07-15 05:09:59 -0400 (Tue, 15 Jul 2008)
New Revision: 32121
Modified:
grass/trunk/display/d.vect/attr.c
grass/trunk/display/d.vect/label.c
grass/trunk/display/d.vect/main.c
grass/trunk/display/d.vect/plot.h
grass/trunk/display/d.vect/topo.c
grass/trunk/display/d.vect/zcoor.c
Log:
Add encoding= option
Modified: grass/trunk/display/d.vect/attr.c
===================================================================
--- grass/trunk/display/d.vect/attr.c 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/attr.c 2008-07-15 09:09:59 UTC (rev 32121)
@@ -61,6 +61,8 @@
R_text_size(lattr->size, lattr->size) ;
if (lattr->font)
R_font(lattr->font) ;
+ if (lattr->enc)
+ R_charset(lattr->enc) ;
if ( chcat ) {
int found = 0;
Modified: grass/trunk/display/d.vect/label.c
===================================================================
--- grass/trunk/display/d.vect/label.c 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/label.c 2008-07-15 09:09:59 UTC (rev 32121)
@@ -39,7 +39,9 @@
R_text_size(lattr->size, lattr->size) ;
if (lattr->font)
R_font(lattr->font) ;
-
+ if (lattr->enc)
+ R_charset(lattr->enc) ;
+
if ( chcat )
{
int found = 0;
Modified: grass/trunk/display/d.vect/main.c
===================================================================
--- grass/trunk/display/d.vect/main.c 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/main.c 2008-07-15 09:09:59 UTC (rev 32121)
@@ -101,7 +101,7 @@
struct Option *where_opt;
struct Option *field_opt, *cat_opt, *lfield_opt;
struct Option *lcolor_opt, *bgcolor_opt, *bcolor_opt;
- struct Option *lsize_opt, *font_opt, *xref_opt, *yref_opt;
+ struct Option *lsize_opt, *font_opt, *enc_opt, *xref_opt, *yref_opt;
struct Option *attrcol_opt, *maxreg_opt, *minreg_opt;
struct Option *width_opt, *wcolumn_opt, *wscale_opt;
struct Option *render_opt;
@@ -283,6 +283,12 @@
font_opt->guisection = _("Labels");
font_opt->description= _("Font name");
+ enc_opt = G_define_option() ;
+ enc_opt->key = "encoding" ;
+ enc_opt->type = TYPE_STRING ;
+ enc_opt->guisection = _("Labels");
+ enc_opt->description= _("Text encoding");
+
xref_opt = G_define_option() ;
xref_opt->key = "xref" ;
xref_opt->type = TYPE_STRING ;
@@ -602,6 +608,7 @@
lattr.size = atoi(lsize_opt->answer);
lattr.font = font_opt->answer;
+ lattr.enc = enc_opt->answer;
switch ( xref_opt->answer[0] )
{
case 'l':
Modified: grass/trunk/display/d.vect/plot.h
===================================================================
--- grass/trunk/display/d.vect/plot.h 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/plot.h 2008-07-15 09:09:59 UTC (rev 32121)
@@ -14,6 +14,7 @@
struct rgb_color color, bgcolor, bcolor;
int size;
char *font;
+ char *enc;
int xref, yref;
} LATTR;
Modified: grass/trunk/display/d.vect/topo.c
===================================================================
--- grass/trunk/display/d.vect/topo.c 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/topo.c 2008-07-15 09:09:59 UTC (rev 32121)
@@ -21,7 +21,9 @@
R_text_size(lattr->size, lattr->size) ;
if (lattr->font)
R_font(lattr->font) ;
-
+ if (lattr->enc)
+ R_charset(lattr->enc) ;
+
Vect_rewind ( Map );
num = Vect_get_num_lines(Map);
Modified: grass/trunk/display/d.vect/zcoor.c
===================================================================
--- grass/trunk/display/d.vect/zcoor.c 2008-07-15 08:47:00 UTC (rev 32120)
+++ grass/trunk/display/d.vect/zcoor.c 2008-07-15 09:09:59 UTC (rev 32121)
@@ -22,7 +22,9 @@
R_text_size(lattr->size, lattr->size) ;
if (lattr->font)
R_font(lattr->font) ;
-
+ if (lattr->enc)
+ R_charset(lattr->enc) ;
+
Vect_rewind ( Map );
More information about the grass-commit
mailing list