therion-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Therion] Scaling text and text orientation


From: Stacho Mudrak
Subject: Re: [Therion] Scaling text and text orientation
Date: Fri, 16 Nov 2007 11:13:51 +0100
User-agent: Internet Messaging Program (IMP) 3.2.2

Quoting Bruce Mutton <address@hidden>:

> Is there a way to place a text label, say ON a pitch line, and tell therion,
> label this pitch "10 P" and left justify the text it out to the right-hand
> side, just beyond the displayed passage wall, so that it always displays
> just clear of the drawing?

If you are using line label - there is no possibility, but if you are using
point label - you can use -align option as for any other point object. E.g. you
may also place "stalactites" aligned left to passage wall.

> Also I notice that text with orientation 0 degrees prints at an angle equal
> to the declination, which is 22 degrees here abouts these days.  Is there a
> better way to straighten the text than give it all an orientation of 338
> degrees to compensate?

Again - please use rather -align then orientation option. E.g.:

point 0 0 label -text "label above some feature" -align top

If map will be rotated due to orientation, this alignment should be
automatically rotated also.

> If I want to present two maps, say one at 1:500 scale, and one at 1:2000
> scale, I would want many labels on the former and few labels on the latter.
> Can this be done with one set of scraps, or would I have to create
> duplicates and adjust the labels in one of the sets?

Currently, there is no straight way how to hadle this situation, but there
exists workaround using generic attributes and a little bit of magic metapost
code copied from "mpost/thText.mp" file and modified a little bit.

1. Make sure to add some label importance flag to all labels. E.g.

point 0 0 label -text "Important label" -attr importance 1
point 123 456 label -text "Unimportant label"

2. Then use following magic :) code in 1:2000 layout:

code metapost
vardef address@hidden(expr txt,pos,rot,mode) =
  if ATTR_importance = 1:
  if (mode=1) or (mode=7): interim labeloffset:=(u/8) fi;
  lab:address@hidden(txt, pos);
  if mode>1: pickup PenD fi;
  if mode=1:
    pickup pencircle scaled (u/6);
    drawdot(pos);
    process_label(pos,0);
  elseif mode=2: process_uplabel;
  elseif mode=3: process_downlabel;
  elseif mode=4: process_updownlabel;
  elseif mode=5: process_circledlabel;
  elseif mode=6: process_boxedlabel;
  elseif mode=7: process_label(pos,rot);  % station name
  elseif mode=8: process_filledlabel(pos, rot);
  else: process_label(pos,rot); fi;
  fi;
enddef;
endcode

I hope this will help you.

Regards, S.
_______________________________________________
Therion mailing list
address@hidden
http://www.speleo.sk/mailman/listinfo/therion




reply via email to

[Prev in Thread] Current Thread [Next in Thread]