← Back to team overview

kicad-developers team mailing list archive

Local labels plotted wrong and other buglets

 

Local labels were plotted wrong (right ON the wire, not ABOVE the wire :P) in two orientations (a simple sign error :D).

Also add overbar (~) support to them in plots.

Other stuff I noticed:
- Rotating or copying a label make it lose the italic attribute
- From a new schematic, saving it and plotting it (without reloading) plot it with a filexxxx name instead of its name

Here's the (trivial) patch:
--- plot.cpp (revision 1697)
+++ plot.cpp (working copy)
@@ -262,7 +262,7 @@
t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT,
Text->m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
- thickness);
+ thickness, false, true);
}
break;

@@ -476,7 +476,7 @@
orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ,
field->m_Size,
hjustify, vjustify,
- thickness, field->m_Italic);
+ thickness, field->m_Italic, true);
}
else /* We plt the reference, for a multiple parts per package */
{
@@ -683,12 +683,12 @@
PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER,
- thickness, italic );
+ thickness, italic, true );
else
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM,
- thickness, italic );
+ thickness, italic, true );
break;

case 1: /* Orientation vert UP */
@@ -696,12 +696,12 @@
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY + offset ),
color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP,
- thickness, italic );
+ thickness, italic, true );
else
PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM,
- thickness, italic );
+ thickness, italic, true );
break;

case 2: /* Horiz Orientation - Right justified */
@@ -709,12 +709,12 @@
PlotGraphicText( g_PlotFormat, wxPoint( pX + offset, pY ),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
- thickness, italic );
+ thickness, italic, true );
else
- PlotGraphicText( g_PlotFormat, wxPoint( pX, pY + offset ),
+ PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM,
- thickness, italic );
+ thickness, italic, true );
break;

case 3: /* Orientation vert BOTTOM */
@@ -722,12 +722,12 @@
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
- thickness, italic );
+ thickness, italic, true );
else
- PlotGraphicText( g_PlotFormat, wxPoint( pX + offset, pY ),
+ PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_TOP,
- thickness, italic );
+ thickness, italic, true );
break;
}

@@ -778,7 +778,7 @@
PlotGraphicText( g_PlotFormat, wxPoint( tposx, posy ), txtcolor,
Struct->m_Text, TEXT_ORIENT_HORIZ, wxSize( size, size),
side, GR_TEXT_VJUSTIFY_CENTER,
- thickness, italic );
+ thickness, italic, true );
/* dessin du symbole de connexion */

if( Struct->m_Edge )