[GRASS-dev] ps.map custom images

E. Jorge Tizado ejtizado at ono.com
Sat Feb 7 13:21:41 EST 2009


Hi Hamish,

> vlegend
>     where -100 0              --> future  100% 0%
>     ref right lower
>     font Monaco
>     fontsize 8
>     border 1
>     color black
>     fcolor white
>     end

The main change of my custom ps.map is to add a legend.h and legend.c to 
manage the cosmetic rules of legend (vlegend and rlegend, it is colortable 
[float or not]) with the rules: where, ref, offset, border, color, fcolor, 
font, fontsize, fontcolor, cols (and span), margin and width (of the symbol).

Span is included with cols and negative values permit extend the legend over 
the width of the map (-1 same width that the map, -0.5 the 50% of the width 
and so)

Moreover, I want traslate more responsabilities of drawing to postscript (the 
C code is reduced and the relative size of ps file); and to exploit the 
resources of postscript drawing. Then re-write many part of vlegend, and new 
rlegend as substitute of the files ps_clrtbl and ps_fclrtbl (but with same 
parts of code as nice step and ordination of vectors to mantain same final 
aspect of the map).

Also I try to all 'color' rules use named, RGB or none.

Well, three images with my custom ps.map in action:

vlegend.jpg is obtained with ...

vlegend
    where 0% 0%		-> now use percent (or absolute inches, of course)
    ref left upper	-> reference point
    offset 0 -2		-> x and y offset in points
    font Monaco
    fontsize 8
    fontcolor black	-> new
    margin 4		-> inner margin
    border 2		-> width of outer border (<0 no border)
    color black		-> color of border (named, RGB or none)
    fcolor 240:240:240	-> background color of vlegend (named, RGB or none)
    cols 2 -0.5		-> cols and span in inches (<0 auto, here 50% width of map)
    end

rlegend.jpg is obtained with ...

rlegend y
	raster $RASTER
	where 0% 100%	-> use percent or...
	ref left upper	-> reference point
	offset 0 0	-> x and y offset
	border 2	
	color indigo
	fcolor white
	font Monaco
	fontsize 8
	fontcolor black
	width 0.25
	height 3
	tickbar y
	end

rlegend2.jpg is a not float colortable :)



thanks,
Jorge


-- 
E. Jorge Tizado
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rlegend.jpg
Type: image/jpeg
Size: 15102 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20090207/2b7b5fa3/rlegend-0001.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlegend.jpg
Type: image/jpeg
Size: 20687 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20090207/2b7b5fa3/vlegend-0001.jpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rlegend2.jpg
Type: image/jpeg
Size: 12358 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20090207/2b7b5fa3/rlegend2-0001.jpg


More information about the grass-dev mailing list