[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gschem: how to turn texts upside-down?



On Thu, 2009-11-05 at 16:44 +0000, Peter TB Brett wrote:
> On Thu, 5 Nov 2009 16:47:37 +0000, Ineiev <ineiev@xxxxxxxxx> wrote:
> > Hi,
> > 
> > Russian standards require some horizontal title texts
> > to be rotated by 180 degrees, so those must be upside-down.
> > 
> > My first thoughts about how to implement this in gschem were insert a
> > pre-rendered
> > image or modify gschem locally to enable such texts, probably
> > with a command-line option to switch between old and new behaviour.
> > 
> > Are there any better ways?
> > 
> 
> All you need is an option which disables the "make text always the right
> way up" behaviour. The file format already supports upside-down text.

And the rendering code already works for any-angle rotation..

diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 4df47ff..55bfda7 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -374,23 +374,6 @@ OBJECT *o_text_read (TOPLEVEL *toplevel,
     s_log_message(_("Found a zero size text string [ %c %d %d %d %d %d %d %d %d
   }
 
-  switch(angle) {
-       
-    case(0):
-    case(90):
-    case(180):
-    case(270):
-    break;
-
-    default:
-      s_log_message(_("Found an unsupported text angle [ %c %d %d %d %d %d %d %
-                    type, x, y, color, size, visibility, show_name_value, angle
-      s_log_message(_("Setting angle to 0\n"));
-      angle=0;
-      break;
-
-  }
-
   switch(alignment) {
     case(LOWER_LEFT):  
     case(MIDDLE_LEFT): 

BUT:

As Peter mentioned, you still need to disable to code to flip 180 degree
rotated text back upright.

grep for "180" in the files:

libgeda/src/o_text_basic.c
gschem/src/o_text.c

There might be other places too, such as the text editing dialogues, but
I'm not certain.


-- 
Peter Clifton <pcjc2@xxxxxxxxx>



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user