Commit 5a5b9098 authored by Andrey Fedorushkov's avatar Andrey Fedorushkov

all: new Russian GOST patch - author Konstantin Baranovskiy

pcbnew: fix print format in THROW_IO_ERROR
        fix properties file export_vrml.cpp
parent e90fc3a9
......@@ -59,17 +59,12 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
int iusPerMil = plotter->GetIUsPerDecimil() * 10;
wxSize pageSize = aPageInfo.GetSizeMils(); // in mils
int xg, yg;
wxPoint pos, ref;
int refx, refy;
wxPoint pos, end, ref;
wxString msg;
wxSize text_size;
#if defined(KICAD_GOST)
wxSize text_size2;
wxSize text_size3;
wxSize text_size1_5;
#else
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
#endif
EDA_COLOR_T plotClr;
plotClr = plotter->GetColorMode() ? RED : BLACK;
......@@ -84,6 +79,19 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
yg = ( pageSize.y - aPageInfo.GetBottomMarginMils() ) * iusPerMil;
#if defined(KICAD_GOST)
int lnMsg, ln;
text_size.x = SIZETEXT * iusPerMil;
text_size.y = SIZETEXT * iusPerMil;
wxSize sz;
wxSize text_size0_8( SIZETEXT * iusPerMil * 0.8, SIZETEXT * iusPerMil * 1 );
wxSize text_size1_5( SIZETEXT * iusPerMil * 1.5, SIZETEXT * iusPerMil * 1.5 );
wxSize text_size2( SIZETEXT * iusPerMil * 2, SIZETEXT * iusPerMil * 2 );
wxSize text_size3( SIZETEXT * iusPerMil * 3, SIZETEXT * iusPerMil * 3 );
int lineOsn_widht = plotter->GetCurrentLineWidth() * 2;
int lineTonk_widht = plotter->GetCurrentLineWidth();
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( ref );
pos.x = xg;
pos.y = ref.y;
......@@ -95,6 +103,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
pos.y = yg;
plotter->LineTo( pos );
plotter->FinishTo( ref );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
#else
......@@ -125,9 +134,6 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
#endif
text_size.x = WSTEXTSIZE * iusPerMil;
text_size.y = WSTEXTSIZE * iusPerMil;
// upper left corner in mils
ref.x = aPageInfo.GetLeftMarginMils();
ref.y = aPageInfo.GetTopMarginMils();
......@@ -137,56 +143,516 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
yg = ( pageSize.y - aPageInfo.GetBottomMarginMils() );
#if defined(KICAD_GOST)
for( Ki_WorkSheetData* WsItem = &WS_Segm1_LU;
WsItem != NULL;
WsItem = WsItem->Pnext )
// Lower right corner
refx = xg;
refy = yg;
// First page
if( aSheetNumber == 1 )
{
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
pos.y = ( yg - WsItem->m_Posy ) * iusPerMil;
for( Ki_WorkSheetData* WsItem = &WS_Osn1_Line1;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
end.x = (refx - WsItem->m_Endx) * iusPerMil;
end.y = (refy - WsItem->m_Endy) * iusPerMil;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TONK:
plotter->SetCurrentLineWidth( lineTonk_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TEXT:
if( !msg.IsEmpty() )
{
if( WsItem == &WS_Osn1_Text1 )
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size0_8,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
else
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_TEXTL:
if( !msg.IsEmpty() )
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
}
}
// Sheet number
if( aNumberOfSheets > 1 )
{
pos.x = (refx - Mm2mils( 36 )) * iusPerMil;
pos.y = (refy - Mm2mils( 17.5 )) * iusPerMil;
msg.Empty();
msg << aSheetNumber;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
// Count of sheets
pos.x = (refx - Mm2mils( 10 )) * iusPerMil;
pos.y = (refy - Mm2mils( 17.5 )) * iusPerMil;
msg.Empty();
switch( WsItem->m_Type )
msg << aNumberOfSheets;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
// Company name
msg = aTitleBlock.GetCompany();
if( !msg.IsEmpty() )
{
case WS_CADRE:
break;
sz = text_size1_5;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 49 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 25 )) * iusPerMil;
pos.y = (refy - Mm2mils( 7.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
case WS_PODPIS_LU:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
// Title
msg = aTitleBlock.GetTitle();
if( !msg.IsEmpty() )
{
sz = text_size1_5;
wxArrayString lines;
int titleWidth = 0;
int titleHeight = (sz.y + sz.y * 0.5) / iusPerMil;
int titleFieldWidth = Mm2mils( 69 );
int titleFieldHeight = Mm2mils( 24 );
int index = 0;
wxString fullMsg = msg;
do // Reduce the height of wrapped title until the fit
{
do // Wrap the title
{
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
if( titleWidth > titleFieldWidth )
{
index = 0;
do
{
msg = msg.Left( msg.Length() - 1 );
if( msg.Length() == 0 )
{
lines.Clear();
msg = fullMsg;
sz.x -= iusPerMil;
break;
}
else
{
index++;
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
wxString ch = wxString( msg.Last() );
if( titleWidth < titleFieldWidth && ch == wxT( " " ) )
{
// New sentence on a new line
int dot = msg.Index( wxT( ". " ) );
if( dot != wxNOT_FOUND )
{
index += msg.Length() - dot - 2;
msg = msg.Left( dot + 1 );
lines.Add( msg );
msg = fullMsg.Right( index );
break;
}
else
{
msg = msg.Left( msg.Length() - 1 );
lines.Add( msg );
msg = fullMsg.Right( index );
break;
}
}
}
}while( 1 );
}
else
{
// New sentence on a new line
int dot = msg.Index( wxT( ". " ) );
if( dot != wxNOT_FOUND )
{
lines.Add( msg.Left( dot + 1 ) );
lines.Add( fullMsg.Right( msg.Length() - dot - 2 ) );
}
else
lines.Add( msg );
break;
}
}while( 1 );
if( titleFieldHeight < titleHeight * lines.Count() )
{
sz.y -= iusPerMil;
sz.x -= iusPerMil;
msg = fullMsg;
lines.Clear();
}
else
break;
}while( 1 );
pos.x = (refx - Mm2mils( 85 )) * iusPerMil;
pos.y = (refy - Mm2mils( 27.5 ) - (titleHeight * (lines.Count() - 1) / 2)) * iusPerMil;
for( int curLn = 0; curLn < lines.Count(); curLn++ )
{
msg = lines[curLn];
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
pos.y += titleHeight * iusPerMil;
}
}
// Decimal number
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
sz = text_size3;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 119 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 60 )) * iusPerMil;
pos.y = (refy - Mm2mils( 47.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_VERT, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
}
case WS_SEGMENT_LU:
plotter->MoveTo( pos );
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
pos.y = ( yg - WsItem->m_Endy ) * iusPerMil;
plotter->FinishTo( pos );
break;
// Developer
msg = aTitleBlock.GetComment2();
if( !msg.IsEmpty() )
{
sz = text_size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
pos.y = (refy - Mm2mils( 27.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
// Verifier
msg = aTitleBlock.GetComment3();
if( !msg.IsEmpty() )
{
sz = text_size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
pos.y = (refy - Mm2mils( 22.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
// Approver
msg = aTitleBlock.GetComment4();
if( !msg.IsEmpty() )
{
sz = text_size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
pos.y = (refy - Mm2mils( 2.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
}
else // other pages
{
for( Ki_WorkSheetData* WsItem = &WS_Osn2a_Line1;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
end.x = (refx - WsItem->m_Endx) * iusPerMil;
end.y = (refy - WsItem->m_Endy) * iusPerMil;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TONK:
plotter->SetCurrentLineWidth( lineTonk_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TEXT:
if( !msg.IsEmpty() )
{
if( WsItem == &WS_Osn2a_Text1 )
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size0_8,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
else
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
for( Ki_WorkSheetData* WsItem = &WS_Segm1_LT;
case WS_TEXTL:
if( !msg.IsEmpty() )
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
}
}
// Sheet number
pos.x = (refx - Mm2mils( 5 )) * iusPerMil;
pos.y = (refy - Mm2mils( 4 )) * iusPerMil;
msg.Empty();
msg << aSheetNumber;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
// Decimal number
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
sz = text_size3;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 109 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 65 )) * iusPerMil;
pos.y = (refy - Mm2mils( 7.5 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
}
// Format
pos.x = (refx - Mm2mils( 23 )) * iusPerMil;
pos.y = (refy + Mm2mils( 2.5 )) * iusPerMil;
msg.Empty();
msg << aPageInfo.GetType();
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
// Lower left corner
refx = ref.x;
refy = yg;
for( Ki_WorkSheetData* WsItem = &WS_DopLeft_Line1;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
pos.x = ( ref.x + WsItem->m_Posx ) * iusPerMil;
pos.y = ( ref.y + WsItem->m_Posy ) * iusPerMil;
msg.Empty();
if( aSheetNumber > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only
break;
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
end.x = (refx - WsItem->m_Endx) * iusPerMil;
end.y = (refy - WsItem->m_Endy) * iusPerMil;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_SEGMENT_LT:
case WS_OSN:
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( pos );
pos.x = ( ref.x + WsItem->m_Endx ) * iusPerMil;
pos.y = ( ref.y + WsItem->m_Endy ) * iusPerMil;
plotter->FinishTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TONK:
plotter->SetCurrentLineWidth( lineTonk_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TEXT:
if( !msg.IsEmpty() )
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_VERT, text_size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
}
}
if( aPageInfo.GetType() == PAGE_INFO::A4 || !aPageInfo.IsPortrait() ) // A4 or Landscape
{
// Left Top corner
refx = ref.x;
refy = ref.y;
for( Ki_WorkSheetData* WsItem = &WS_DopTop_Line1;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 )// Some fields for first page only
break;
pos.x = (refx + WsItem->m_Posx) * iusPerMil;
pos.y = (refy + WsItem->m_Posy) * iusPerMil;
end.x = (refx + WsItem->m_Endx) * iusPerMil;
end.y = (refy + WsItem->m_Endy) * iusPerMil;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TONK:
plotter->SetCurrentLineWidth( lineTonk_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
}
}
// Decimal number
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
sz = text_size2;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 69 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx + Mm2mils( 35 )) * iusPerMil;
pos.y = (refy + Mm2mils( 7 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, 1800, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
}
else // Portrait
{
// Right Top corner
// Lines are used from the upper left corner by the change of coordinates
refx = xg;
refy = ref.y;
for( Ki_WorkSheetData* WsItem = &WS_DopTop_Line1;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 )// Some fields for first page only
break;
pos.x = (refx - WsItem->m_Posy) * iusPerMil;
pos.y = (refy + WsItem->m_Posx) * iusPerMil;
end.x = (refx - WsItem->m_Endy) * iusPerMil;
end.y = (refy + WsItem->m_Endx) * iusPerMil;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
plotter->SetCurrentLineWidth( lineOsn_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
case WS_TONK:
plotter->SetCurrentLineWidth( lineTonk_widht );
plotter->MoveTo( pos );
plotter->FinishTo( end );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
break;
}
}
// Decimal number
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
sz = text_size2;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
ln = Mm2mils( 69 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 7 )) * iusPerMil;
pos.y = (refy + Mm2mils( 35 )) * iusPerMil;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_VERT, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
}
#else
text_size.x = WSTEXTSIZE * iusPerMil;
text_size.y = WSTEXTSIZE * iusPerMil;
// Plot legend along the X axis.
int ipas = ( xg - ref.x ) / PAS_REF;
int gxpas = ( xg - ref.x ) / ipas;
......@@ -271,220 +737,10 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
#endif
// Plot the worksheet.
text_size.x = SIZETEXT * iusPerMil;
text_size.y = SIZETEXT * iusPerMil;
#if defined(KICAD_GOST)
text_size2.x = SIZETEXT * iusPerMil * 2;
text_size2.y = SIZETEXT * iusPerMil * 2;
text_size3.x = SIZETEXT * iusPerMil * 3;
text_size3.y = SIZETEXT * iusPerMil * 3;
text_size1_5.x = SIZETEXT * iusPerMil * 1.5;
text_size1_5.y = SIZETEXT * iusPerMil * 1.5;
ref.x = pageSize.x - aPageInfo.GetRightMarginMils();
ref.y = pageSize.y - aPageInfo.GetBottomMarginMils();
if( aSheetNumber == 1 )
{
for( Ki_WorkSheetData* WsItem = &WS_Date;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
pos.y = ( ref.y - WsItem->m_Posy ) * iusPerMil;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_DATE:
break;
case WS_REV:
break;
case WS_KICAD_VERSION:
break;
case WS_PODPIS:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
case WS_SIZESHEET:
break;
case WS_IDENTSHEET:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
if( aNumberOfSheets > 1 )
msg << aSheetNumber;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
case WS_SHEETS:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << aNumberOfSheets;
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
case WS_COMPANY_NAME:
msg = aTitleBlock.GetCompany();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_TITLE:
msg = aTitleBlock.GetTitle();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_COMMENT1:
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
pos.x = (aPageInfo.GetLeftMarginMils() + 1260) * iusPerMil;
pos.y = (aPageInfo.GetTopMarginMils() + 270) * iusPerMil;
plotter->Text( pos, plotClr,
msg.GetData(), 1800, text_size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_COMMENT2:
msg = aTitleBlock.GetComment2();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_COMMENT3:
msg = aTitleBlock.GetComment3();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_COMMENT4:
msg = aTitleBlock.GetComment4();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_UPPER_SEGMENT:
case WS_LEFT_SEGMENT:
case WS_SEGMENT:
plotter->MoveTo( pos );
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
pos.y = ( ref.y - WsItem->m_Endy ) * iusPerMil;
plotter->FinishTo( pos );
break;
}
}
}
else
{
for( Ki_WorkSheetData* WsItem = &WS_CADRE_D;
WsItem != NULL;
WsItem = WsItem->Pnext )
{
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
pos.y = ( ref.y - WsItem->m_Posy ) * iusPerMil;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_CADRE:
// Begin list number > 1
msg = aTitleBlock.GetComment1();
if( !msg.IsEmpty() )
{
plotter->Text( pos, plotClr,
msg, TEXT_ORIENT_HORIZ, text_size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
pos.x = (aPageInfo.GetLeftMarginMils() + 1260) * iusPerMil;
pos.y = (aPageInfo.GetTopMarginMils() + 270) * iusPerMil;
plotter->Text( pos, plotClr,
msg, 1800, text_size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
}
break;
case WS_PODPIS_D:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
plotter->Text( pos, plotClr, msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
case WS_IDENTSHEET_D:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << aSheetNumber;
plotter->Text( pos, plotClr, msg, TEXT_ORIENT_HORIZ, text_size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
break;
case WS_LEFT_SEGMENT_D:
case WS_SEGMENT_D:
plotter->MoveTo( pos );
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
pos.y = ( ref.y - WsItem->m_Endy ) * iusPerMil;
plotter->FinishTo( pos );
break;
}
}
}
#else
ref.x = pageSize.x - GRID_REF_W - aPageInfo.GetRightMarginMils();
ref.y = pageSize.y - GRID_REF_W - aPageInfo.GetBottomMarginMils();
......@@ -603,4 +859,5 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
}
#endif
}
......@@ -609,12 +609,20 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
wxPoint pointLeftTop( pageDUMMY.GetLeftMarginMils(), pageDUMMY.GetTopMarginMils() );
wxPoint pointRightBottom( pageDUMMY.GetRightMarginMils(), pageDUMMY.GetBottomMarginMils() );
// Get page type
int idx = m_paperSizeComboBox->GetSelection();
if( idx < 0 )
idx = 0;
wxString paperType = m_pageFmt[idx].Left( m_pageFmt[idx].Index( wxT( " " ) ) );
// Draw layout preview.
wxString emptyString;
GRResetPenAndBrush( ( wxDC* ) &memDC );
m_Parent->TraceWorkSheet( (wxDC*) &memDC, dummySize, pointLeftTop, pointRightBottom,
emptyString, emptyString, m_tb, m_Screen->m_NumberOfScreens,
paperType, emptyString, m_tb, m_Screen->m_NumberOfScreens,
m_Screen->m_ScreenNumber, 1, appScale, LIGHTGRAY, RED );
memDC.SelectObject( wxNullBitmap );
......
......@@ -122,7 +122,11 @@ int NegableTextLength( const wxString& aText )
{
if( aText[i] == '~' )
{
char_count--;
/* '~~' draw as '~' and count as two chars */
if( i > 0 && aText[i - 1] == '~' )
i--;
else
char_count--;
}
}
......@@ -160,9 +164,13 @@ int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, boo
{
int AsciiCode = aText[i];
if( AsciiCode == '~' ) /* Skip the negation marks */
/* Skip the negation marks
* and first '~' char of '~~'
* ('~~' draw as '~') */
if( AsciiCode == '~' )
{
continue;
if( i > 0 && aText[i - 1] != '~' )
continue;
}
const char* ptcar = GetHersheyShapeDescription( AsciiCode );
......@@ -406,37 +414,44 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
overbar_italic_comp = 0;
};
int overbars = 0; // Number of ~ seen
int overbars = 0; /* Number of '~' seen (except '~~') */
ptr = 0; /* ptr = text index */
while( ptr < char_count )
{
if( aText[ptr + overbars] == '~' )
{
/* Found an overbar, adjust the pointers */
overbars++;
if( ptr + overbars + 1 < aText.length() &&
aText[ptr + overbars + 1] == '~' ) /* '~~' draw as '~' */
ptr++; // skip first '~' char and draw second
if( overbars & 1 ) // odd overbars count
{
/* Starting the overbar */
overbar_pos = current_char_pos;
overbar_pos.x += overbar_italic_comp;
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
RotatePoint( &overbar_pos, aPos, aOrient );
}
else
{
/* Ending the overbar */
coord[0] = overbar_pos;
overbar_pos = current_char_pos;
overbar_pos.x += overbar_italic_comp;
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
RotatePoint( &overbar_pos, aPos, aOrient );
coord[1] = overbar_pos;
/* Plot the overbar segment */
DrawGraphicTextPline( clipBox, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback, aPlotter );
/* Found an overbar, adjust the pointers */
overbars++;
if( overbars & 1 ) // odd overbars count
{
/* Starting the overbar */
overbar_pos = current_char_pos;
overbar_pos.x += overbar_italic_comp;
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
RotatePoint( &overbar_pos, aPos, aOrient );
}
else
{
/* Ending the overbar */
coord[0] = overbar_pos;
overbar_pos = current_char_pos;
overbar_pos.x += overbar_italic_comp;
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
RotatePoint( &overbar_pos, aPos, aOrient );
coord[1] = overbar_pos;
/* Plot the overbar segment */
DrawGraphicTextPline( clipBox, aDC, aColor, aWidth,
sketch_mode, 2, coord, aCallback, aPlotter );
}
continue; /* Skip ~ processing */
}
continue; /* Skip ~ processing */
}
AsciiCode = aText.GetChar( ptr + overbars );
......
......@@ -123,7 +123,7 @@ const char* const newstroke_font[] =
"KYVcUcSbR`RVQTOSQRRPRFSDUCVC",
"H\\RbRD",
"KYNcOcQbR`RVSTUSSRRPRFQDOCNC",
"KZMHNGPFTHVGWF",
"KZMSNRPQTSVRWQ",
"F^K[KFYFY[K[",
/* // LATIN-1 SUPPLEMENT (0080-00FF) */
"F^K[KFYFY[K[", /* U+80 */
......
......@@ -20,988 +20,1029 @@
// Must be defined in main applications:
Ki_WorkSheetData WS_Date =
{
WS_DATE,
&WS_Licence,
BLOCK_DATE_X, BLOCK_DATE_Y,
0, 0,
#if defined(KICAD_GOST)
// Center - right bottom corner
Ki_WorkSheetData WS_Osn1_Line1 =
{
WS_OSN,
&WS_Osn1_Line2,
Mm2mils( 185 ), Mm2mils( 55 ),
0, Mm2mils( 55 ),
NULL, NULL
#else
wxT( "Date: " ),NULL
#endif
};
Ki_WorkSheetData WS_Licence =
Ki_WorkSheetData WS_Osn1_Line2 =
{
WS_KICAD_VERSION,
&WS_Revision,
BLOCK_KICAD_VERSION_X,BLOCK_KICAD_VERSION_Y,
0, 0,
NULL, NULL
WS_OSN,
&WS_Osn1_Line3,
Mm2mils( 120 ), Mm2mils( 40 ),
0, Mm2mils( 40 ),
NULL, NULL
};
Ki_WorkSheetData WS_Revision =
Ki_WorkSheetData WS_Osn1_Line3 =
{
WS_REV,
&WS_SizeSheet,
#if defined(KICAD_GOST)
STAMP_X_185 - 30,STAMP_Y_30 + 90,
#else
BLOCK_REV_X, BLOCK_REV_Y,
#endif
0, 0,
#if defined(KICAD_GOST)
NULL, NULL
#else
wxT( "Rev: " ), NULL
#endif
WS_OSN,
&WS_Osn1_Line4,
Mm2mils( 185 ), Mm2mils( 35 ),
Mm2mils( 120 ), Mm2mils( 35 ),
NULL, NULL
};
Ki_WorkSheetData WS_SizeSheet =
Ki_WorkSheetData WS_Osn1_Line4 =
{
WS_SIZESHEET,
#if defined(KICAD_GOST)
&WS_Title,
BLOCK_SIZE_SHEET_X,BLOCK_SIZE_SHEET_Y,
0, 0,
NULL, NULL
WS_OSN,
&WS_Osn1_Line5,
Mm2mils( 50 ), Mm2mils( 35 ),
0, Mm2mils( 35 ),
NULL, NULL
};
#else
&WS_IdentSheet,
BLOCK_SIZE_SHEET_X, BLOCK_SIZE_SHEET_Y,
0, 0,
wxT( "Size: " ), NULL
Ki_WorkSheetData WS_Osn1_Line5 =
{
WS_OSN,
&WS_Osn1_Line6,
Mm2mils( 185 ), Mm2mils( 30 ),
Mm2mils( 120 ), Mm2mils( 30 ),
NULL, NULL
};
Ki_WorkSheetData WS_IdentSheet =
Ki_WorkSheetData WS_Osn1_Line6 =
{
WS_IDENTSHEET,
&WS_Title,
BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y,
0, 0,
wxT( "Id: " ), NULL
WS_OSN,
&WS_Osn1_Line7,
Mm2mils( 50 ), Mm2mils( 20 ),
0, Mm2mils( 20 ),
NULL, NULL
};
#endif
Ki_WorkSheetData WS_Title =
Ki_WorkSheetData WS_Osn1_Line7 =
{
WS_TITLE,
&WS_SheetFilename,
#if defined(KICAD_GOST)
STAMP_X_85, STAMP_Y_25 + 90,
0, 0,
NULL, NULL
#else
BLOCK_TITLE_X, BLOCK_TITLE_Y,
0, 0,
wxT( "Title: " ), NULL
#endif
WS_OSN,
&WS_Osn1_Line8,
Mm2mils( 120 ), Mm2mils( 15 ),
0, Mm2mils( 15 ),
NULL, NULL
};
Ki_WorkSheetData WS_SheetFilename =
Ki_WorkSheetData WS_Osn1_Line8 =
{
WS_FILENAME,
&WS_FullSheetName,
BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
0, 0,
wxT( "File: " ), NULL
WS_OSN,
&WS_Osn1_Line9,
Mm2mils( 185 ), Mm2mils( 55 ),
Mm2mils( 185 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_FullSheetName =
Ki_WorkSheetData WS_Osn1_Line9 =
{
WS_FULLSHEETNAME,
&WS_Company,
BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y,
0, 0,
wxT( "Sheet: " ), NULL
WS_OSN,
&WS_Osn1_Line10,
Mm2mils( 178 ), Mm2mils( 55 ),
Mm2mils( 178 ), Mm2mils( 30 ),
NULL, NULL
};
Ki_WorkSheetData WS_Company =
Ki_WorkSheetData WS_Osn1_Line10 =
{
WS_COMPANY_NAME,
&WS_Comment1,
#if defined(KICAD_GOST)
STAMP_X_50 / 2, STAMP_Y_0 + 270,
0, 0,
#else
BLOCK_COMMENT_X,BLOCK_COMPANY_Y,
0, 0,
#endif
WS_OSN,
&WS_Osn1_Line11,
Mm2mils( 168 ), Mm2mils( 55 ),
Mm2mils( 168 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment1 =
Ki_WorkSheetData WS_Osn1_Line11 =
{
WS_COMMENT1,
&WS_Comment2,
#if defined(KICAD_GOST)
STAMP_X_120 / 2,STAMP_Y_40 + 270,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X,BLOCK_COMMENT1_Y,
0, 0,
#endif
WS_OSN,
&WS_Osn1_Line12,
Mm2mils( 145 ), Mm2mils( 55 ),
Mm2mils( 145 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment2 =
Ki_WorkSheetData WS_Osn1_Line12 =
{
WS_COMMENT2,
&WS_Comment3,
#if defined(KICAD_GOST)
STAMP_X_168 - 30, STAMP_Y_25 + 90,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X,BLOCK_COMMENT2_Y,
0, 0,
#endif
WS_OSN,
&WS_Osn1_Line13,
Mm2mils( 130 ), Mm2mils( 55 ),
Mm2mils( 130 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment3 =
Ki_WorkSheetData WS_Osn1_Line13 =
{
WS_COMMENT3,
&WS_Comment4,
#if defined(KICAD_GOST)
STAMP_X_168 - 30, STAMP_Y_20 + 90,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X,BLOCK_COMMENT3_Y,
0, 0,
#endif
WS_OSN,
&WS_Osn1_Line14,
Mm2mils( 120 ), Mm2mils( 55 ),
Mm2mils( 120 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment4 =
Ki_WorkSheetData WS_Osn1_Line14 =
{
WS_COMMENT4,
&WS_MostLeftLine,
#if defined(KICAD_GOST)
STAMP_X_168 - 30, STAMP_Y_0 + 90,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
0, 0,
#endif
NULL, NULL
WS_OSN,
&WS_Osn1_Line15,
Mm2mils( 50 ), Mm2mils( 40 ),
Mm2mils( 50 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line15 =
{
WS_OSN,
&WS_Osn1_Line16,
Mm2mils( 35 ), Mm2mils( 40 ),
Mm2mils( 35 ), Mm2mils( 20 ),
NULL, NULL
};
/// Left vertical segment
Ki_WorkSheetData WS_MostLeftLine =
Ki_WorkSheetData WS_Osn1_Line16 =
{
WS_LEFT_SEGMENT,
#if defined(KICAD_GOST)
&WS_MostUpperLine,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
&WS_SeparatorLine,
BLOCK_OX, SIZETEXT * 16,
BLOCK_OX, 0,
NULL, NULL
WS_OSN,
&WS_Osn1_Line17,
Mm2mils( 30 ), Mm2mils( 20 ),
Mm2mils( 30 ), Mm2mils( 15 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line17 =
{
WS_OSN,
&WS_Osn1_Line18,
Mm2mils( 18 ), Mm2mils( 40 ),
Mm2mils( 18 ), Mm2mils( 20 ),
NULL, NULL
};
/// horizontal segment between filename and comments
Ki_WorkSheetData WS_SeparatorLine =
Ki_WorkSheetData WS_Osn1_Line18 =
{
WS_SEGMENT,
&WS_MostUpperLine,
BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
0, VARIABLE_BLOCK_START_POSITION,
#endif
NULL, NULL
WS_TONK,
&WS_Osn1_Line19,
Mm2mils( 185 ), Mm2mils( 50 ),
Mm2mils( 120 ), Mm2mils( 50 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line19 =
{
WS_TONK,
&WS_Osn1_Line20,
Mm2mils( 185 ), Mm2mils( 45 ),
Mm2mils( 120 ), Mm2mils( 45 ),
NULL, NULL
};
/// superior horizontal segment
Ki_WorkSheetData WS_MostUpperLine =
Ki_WorkSheetData WS_Osn1_Line20 =
{
WS_UPPER_SEGMENT,
&WS_Segm3,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
0, STAMP_OY,
#else
BLOCK_OX, SIZETEXT * 16,
0, SIZETEXT * 16,
#endif
NULL, NULL
WS_TONK,
&WS_Osn1_Line21,
Mm2mils( 185 ), Mm2mils( 40 ),
Mm2mils( 120 ), Mm2mils( 40 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line21 =
{
WS_TONK,
&WS_Osn1_Line22,
Mm2mils( 185 ), Mm2mils( 25 ),
Mm2mils( 120 ), Mm2mils( 25 ),
NULL, NULL
};
/// horizontal segment above COMPANY NAME
Ki_WorkSheetData WS_Segm3 =
Ki_WorkSheetData WS_Osn1_Line22 =
{
WS_SEGMENT,
&WS_Segm4,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_50,
STAMP_X_120,STAMP_Y_50,
#else
BLOCK_OX, SIZETEXT * 6,
0, SIZETEXT * 6,
#endif
NULL, NULL
WS_TONK,
&WS_Osn1_Line23,
Mm2mils( 185 ), Mm2mils( 20 ),
Mm2mils( 120 ), Mm2mils( 20 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line23 =
{
WS_TONK,
&WS_Osn1_Line24,
Mm2mils( 185 ), Mm2mils( 15 ),
Mm2mils( 120 ), Mm2mils( 15 ),
NULL, NULL
};
/// vertical segment of the left REV and SHEET
Ki_WorkSheetData WS_Segm4 =
Ki_WorkSheetData WS_Osn1_Line24 =
{
WS_SEGMENT,
&WS_Segm5,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_45,
STAMP_X_120, STAMP_Y_45,
#else
BLOCK_REV_X + SIZETEXT,SIZETEXT * 4,
BLOCK_REV_X + SIZETEXT,0,
#endif
NULL, NULL
WS_TONK,
&WS_Osn1_Line25,
Mm2mils( 185 ), Mm2mils( 10 ),
Mm2mils( 120 ), Mm2mils( 10 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line25 =
{
WS_TONK,
&WS_Osn1_Line26,
Mm2mils( 185 ), Mm2mils( 5 ),
Mm2mils( 120 ), Mm2mils( 5 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm5 =
Ki_WorkSheetData WS_Osn1_Line26 =
{
WS_SEGMENT,
&WS_Segm6,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_40,
0, STAMP_Y_40,
#else
BLOCK_OX, SIZETEXT * 2,
0, SIZETEXT * 2,
#endif
NULL, NULL
WS_TONK,
&WS_Osn1_Line27,
Mm2mils( 45 ), Mm2mils( 35 ),
Mm2mils( 45 ), Mm2mils( 20 ),
NULL, NULL
};
Ki_WorkSheetData WS_Osn1_Line27 =
{
WS_TONK,
&WS_Osn1_Text1,
Mm2mils( 40 ), Mm2mils( 35 ),
Mm2mils( 40 ), Mm2mils( 20 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm6 =
Ki_WorkSheetData WS_Osn1_Text1 =
{
WS_SEGMENT,
&WS_Segm7,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_35,
STAMP_X_120,STAMP_Y_35,
#else
BLOCK_OX, SIZETEXT * 4,
0, SIZETEXT * 4,
#endif
NULL, NULL
WS_TEXT,
&WS_Osn1_Text2,
Mm2mils( 181.5 ), Mm2mils( 32.5 ),
0, 0,
wxT( "Изм." ), NULL
};
Ki_WorkSheetData WS_Osn1_Text2 =
{
WS_TEXTL,
&WS_Osn1_Text3,
Mm2mils( 184 ), Mm2mils( 27.5 ),
0, 0,
wxT( "Разраб." ), NULL
};
Ki_WorkSheetData WS_Segm7 =
Ki_WorkSheetData WS_Osn1_Text3 =
{
WS_SEGMENT,
#if defined(KICAD_GOST)
&WS_Segm8,
STAMP_X_50,STAMP_Y_35,
0, STAMP_Y_35,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text4,
Mm2mils( 184 ), Mm2mils( 22.5 ),
0, 0,
wxT( "Пров." ), NULL
};
Ki_WorkSheetData WS_Segm8 =
Ki_WorkSheetData WS_Osn1_Text4 =
{
WS_SEGMENT,
&WS_Segm9,
STAMP_OX, STAMP_Y_30,
STAMP_X_120,STAMP_Y_30,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text5,
Mm2mils( 184 ), Mm2mils( 17.5 ),
0, 0,
wxT( "Т.контр." ), NULL
};
Ki_WorkSheetData WS_Segm9 =
Ki_WorkSheetData WS_Osn1_Text5 =
{
WS_SEGMENT,
&WS_Segm10,
STAMP_OX, STAMP_Y_25,
STAMP_X_120,STAMP_Y_25,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text6,
Mm2mils( 184 ), Mm2mils( 7.5 ),
0, 0,
wxT( "Н.контр." ), NULL
};
Ki_WorkSheetData WS_Segm10 =
Ki_WorkSheetData WS_Osn1_Text6 =
{
WS_SEGMENT,
&WS_Segm11,
STAMP_OX, STAMP_Y_20,
STAMP_X_120,STAMP_Y_20,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text7,
Mm2mils( 184 ), Mm2mils( 2.5 ),
0, 0,
wxT( "Утв." ), NULL
};
Ki_WorkSheetData WS_Segm11 =
Ki_WorkSheetData WS_Osn1_Text7 =
{
WS_SEGMENT,
&WS_Segm12,
STAMP_X_50,STAMP_Y_20,
0, STAMP_Y_20,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text8,
Mm2mils( 173 ), Mm2mils( 32.5 ),
0, 0,
wxT( "Лист" ), NULL
};
Ki_WorkSheetData WS_Segm12 =
Ki_WorkSheetData WS_Osn1_Text8 =
{
WS_SEGMENT,
&WS_Segm13,
STAMP_OX, STAMP_Y_15,
0, STAMP_Y_15,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text9,
Mm2mils( 156.5 ), Mm2mils( 32.5 ),
0, 0,
wxT( "N докум." ), NULL
};
Ki_WorkSheetData WS_Segm13 =
Ki_WorkSheetData WS_Osn1_Text9 =
{
WS_SEGMENT,
&WS_Segm14,
STAMP_OX, STAMP_Y_10,
STAMP_X_120,STAMP_Y_10,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text10,
Mm2mils( 137.5 ), Mm2mils( 32.5 ),
0, 0,
wxT( "Подп." ), NULL
};
Ki_WorkSheetData WS_Segm14 =
Ki_WorkSheetData WS_Osn1_Text10 =
{
WS_SEGMENT,
&WS_Segm15,
STAMP_OX, STAMP_Y_5,
STAMP_X_120,STAMP_Y_5,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text11,
Mm2mils( 125 ), Mm2mils( 32.5 ),
0, 0,
wxT( "Дата" ), NULL
};
Ki_WorkSheetData WS_Segm15 =
Ki_WorkSheetData WS_Osn1_Text11 =
{
WS_SEGMENT,
&WS_Segm16,
STAMP_X_178,STAMP_OY,
STAMP_X_178,STAMP_Y_30,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text12,
Mm2mils( 42.5 ), Mm2mils( 37.5 ),
0, 0,
wxT( "Лит." ), NULL
};
Ki_WorkSheetData WS_Segm16 =
Ki_WorkSheetData WS_Osn1_Text12 =
{
WS_SEGMENT,
&WS_Segm17,
STAMP_X_168,STAMP_OY,
STAMP_X_168,0,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text13,
Mm2mils( 26.5 ), Mm2mils( 37.5 ),
0, 0,
wxT( "Масса" ), NULL
};
Ki_WorkSheetData WS_Segm17 =
Ki_WorkSheetData WS_Osn1_Text13 =
{
WS_SEGMENT,
&WS_Segm18,
STAMP_X_145,STAMP_OY,
STAMP_X_145,0,
NULL, NULL
WS_TEXT,
&WS_Osn1_Text14,
Mm2mils( 9 ), Mm2mils( 37.5 ),
0, 0,
wxT( "Масштаб" ), NULL
};
Ki_WorkSheetData WS_Segm18 =
Ki_WorkSheetData WS_Osn1_Text14 =
{
WS_SEGMENT,
&WS_Segm19,
STAMP_X_130,STAMP_OY,
STAMP_X_130,0,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text15,
Mm2mils( 49 ), Mm2mils( 17.5 ),
0, 0,
wxT( "Лист" ), NULL
};
Ki_WorkSheetData WS_Segm19 =
Ki_WorkSheetData WS_Osn1_Text15 =
{
WS_SEGMENT,
&WS_Segm20,
STAMP_X_120,STAMP_OY,
STAMP_X_120,0,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text16,
Mm2mils( 29 ), Mm2mils( 17.5 ),
0, 0,
wxT( "Листов" ), NULL
};
Ki_WorkSheetData WS_Segm20 =
Ki_WorkSheetData WS_Osn1_Text16 =
{
WS_SEGMENT,
&WS_Segm21,
STAMP_X_50,STAMP_Y_40,
STAMP_X_50,0,
NULL, NULL
WS_TEXTL,
&WS_Osn1_Text17,
Mm2mils( 40 ), -Mm2mils( 2.5 ),
0, 0,
wxT( "Формат" ), NULL
};
Ki_WorkSheetData WS_Segm21 =
Ki_WorkSheetData WS_Osn1_Text17 =
{
WS_SEGMENT,
&WS_Segm22,
STAMP_X_45,STAMP_Y_35,
STAMP_X_45,STAMP_Y_20,
NULL, NULL
WS_TEXTL,
NULL,
Mm2mils( 110 ), -Mm2mils( 2.5 ),
0, 0,
wxT( "Копировал" ), NULL
};
Ki_WorkSheetData WS_Segm22 =
Ki_WorkSheetData WS_Osn2a_Line1 =
{
WS_SEGMENT,
&WS_Segm23,
STAMP_X_40,STAMP_Y_35,
STAMP_X_40,STAMP_Y_20,
NULL, NULL
WS_OSN,
&WS_Osn2a_Line2,
Mm2mils( 185 ), Mm2mils( 15 ),
0, Mm2mils( 15 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm23 =
Ki_WorkSheetData WS_Osn2a_Line2 =
{
WS_SEGMENT,
&WS_Segm24,
STAMP_X_35,STAMP_Y_40,
STAMP_X_35,STAMP_Y_20,
NULL, NULL
WS_OSN,
&WS_Osn2a_Line3,
Mm2mils( 185 ), Mm2mils( 5 ),
Mm2mils( 120 ), Mm2mils( 5 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm24 =
Ki_WorkSheetData WS_Osn2a_Line3 =
{
WS_SEGMENT,
&WS_Segm25,
STAMP_X_30,STAMP_Y_20,
STAMP_X_30,STAMP_Y_15,
NULL, NULL
WS_OSN,
&WS_Osn2a_Line4,
Mm2mils( 10 ), Mm2mils( 8 ),
0, Mm2mils( 8 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm25 =
Ki_WorkSheetData WS_Osn2a_Line4 =
{
WS_SEGMENT,
&WS_Izm,
STAMP_X_18,STAMP_Y_40,
STAMP_X_18,STAMP_Y_20,
NULL, NULL
WS_OSN,
&WS_Osn2a_Line5,
Mm2mils( 185 ), Mm2mils( 15 ),
Mm2mils( 185 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Izm =
Ki_WorkSheetData WS_Osn2a_Line5 =
{
WS_PODPIS,
&WS_Razr,
STAMP_X_185 - 30,STAMP_Y_30 + 90,
0, 0,
wxT( "Изм." ),NULL
WS_OSN,
&WS_Osn2a_Line6,
Mm2mils( 178 ), Mm2mils( 15 ),
Mm2mils( 178 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Razr =
Ki_WorkSheetData WS_Osn2a_Line6 =
{
WS_PODPIS,
&WS_Prov,
STAMP_X_185 - 30, STAMP_Y_25 + 90,
0, 0,
wxT( "Разраб." ),NULL
WS_OSN,
&WS_Osn2a_Line7,
Mm2mils( 168 ), Mm2mils( 15 ),
Mm2mils( 168 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Prov =
Ki_WorkSheetData WS_Osn2a_Line7 =
{
WS_PODPIS,
&WS_TKon,
STAMP_X_185 - 30, STAMP_Y_20 + 90,
0, 0,
wxT( "Пров." ),NULL
WS_OSN,
&WS_Osn2a_Line8,
Mm2mils( 145 ), Mm2mils( 15 ),
Mm2mils( 145 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_TKon =
Ki_WorkSheetData WS_Osn2a_Line8 =
{
WS_PODPIS,
&WS_NKon,
STAMP_X_185 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Т.контр." ),NULL
WS_OSN,
&WS_Osn2a_Line9,
Mm2mils( 130 ), Mm2mils( 15 ),
Mm2mils( 130 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_NKon =
Ki_WorkSheetData WS_Osn2a_Line9 =
{
WS_PODPIS,
&WS_Utv,
STAMP_X_185 - 30, STAMP_Y_5 + 90,
0, 0,
wxT( "Н.контр." ),NULL
WS_OSN,
&WS_Osn2a_Line10,
Mm2mils( 120 ), Mm2mils( 15 ),
Mm2mils( 120 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Utv =
Ki_WorkSheetData WS_Osn2a_Line10 =
{
WS_PODPIS,
&WS_List,
STAMP_X_185 - 30,STAMP_Y_0 + 90,
0, 0,
wxT( "Утв." ),NULL
WS_OSN,
&WS_Osn2a_Line11,
Mm2mils( 10 ), Mm2mils( 15 ),
Mm2mils( 10 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_List =
Ki_WorkSheetData WS_Osn2a_Line11 =
{
WS_PODPIS,
&WS_NDoc,
STAMP_X_178 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Лист" ),NULL
WS_TONK,
&WS_Osn2a_Text1,
Mm2mils( 185 ), Mm2mils( 10 ),
Mm2mils( 120 ), Mm2mils( 10 ),
NULL, NULL
};
Ki_WorkSheetData WS_NDoc =
Ki_WorkSheetData WS_Osn2a_Text1 =
{
WS_PODPIS,
&WS_Podp,
STAMP_X_168 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "N докум." ),NULL
WS_TEXT,
&WS_Osn2a_Text2,
Mm2mils( 181.5 ), Mm2mils( 2.5 ),
0, 0,
wxT( "Изм." ), NULL
};
Ki_WorkSheetData WS_Podp =
Ki_WorkSheetData WS_Osn2a_Text2 =
{
WS_PODPIS,
&WS_Data,
STAMP_X_145 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Подп." ),NULL
WS_TEXT,
&WS_Osn2a_Text3,
Mm2mils( 173 ), Mm2mils( 2.5 ),
0, 0,
wxT( "Лист" ), NULL
};
Ki_WorkSheetData WS_Data =
Ki_WorkSheetData WS_Osn2a_Text3 =
{
WS_PODPIS,
&WS_Art,
STAMP_X_130 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Дата" ),NULL
WS_TEXT,
&WS_Osn2a_Text4,
Mm2mils( 156.5 ), Mm2mils( 2.5 ),
0, 0,
wxT( "N докум." ), NULL
};
Ki_WorkSheetData WS_Art =
Ki_WorkSheetData WS_Osn2a_Text4 =
{
WS_PODPIS,
&WS_Mass,
STAMP_X_50 - 30, STAMP_Y_35 + 90,
0, 0,
wxT( "Лит." ),NULL
WS_TEXT,
&WS_Osn2a_Text5,
Mm2mils( 137.5 ), Mm2mils( 2.5 ),
0, 0,
wxT( "Подп." ), NULL
};
Ki_WorkSheetData WS_Mass =
Ki_WorkSheetData WS_Osn2a_Text5 =
{
WS_PODPIS,
&WS_Msht,
STAMP_X_35 - 30, STAMP_Y_35 + 90,
WS_TEXT,
&WS_Osn2a_Text6,
Mm2mils( 125 ), Mm2mils( 2.5 ),
0, 0,
wxT( "Масса" ),NULL
wxT( "Дата" ), NULL
};
Ki_WorkSheetData WS_Msht =
Ki_WorkSheetData WS_Osn2a_Text6 =
{
WS_PODPIS,
&WS_List1,
STAMP_X_18 - 30, STAMP_Y_35 + 90,
0, 0,
wxT( "Масштаб" ),NULL
WS_TEXT,
&WS_Osn2a_Text7,
Mm2mils( 5 ), Mm2mils( 11.5 ),
0, 0,
wxT( "Лист" ), NULL
};
Ki_WorkSheetData WS_List1 =
Ki_WorkSheetData WS_Osn2a_Text7 =
{
WS_IDENTSHEET,
&WS_List2,
STAMP_X_50 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Лист " ),NULL
WS_TEXTL,
&WS_Osn2a_Text8,
Mm2mils( 40 ), -Mm2mils( 2.5 ),
0, 0,
wxT( "Формат" ), NULL
};
Ki_WorkSheetData WS_List2 =
Ki_WorkSheetData WS_Osn2a_Text8 =
{
WS_SHEETS,
WS_TEXTL,
NULL,
STAMP_X_30 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Листов " ),NULL
Mm2mils( 110 ), -Mm2mils( 2.5 ),
0, 0,
wxT( "Копировал" ), NULL
};
Ki_WorkSheetData WS_CADRE_D =
// Center - left bottom corner
Ki_WorkSheetData WS_DopLeft_Line1 =
{
WS_CADRE,
&WS_Segm1_D,
STAMP_X_65, STAMP_Y_0 + 270,
0, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line2,
Mm2mils( 12 ), Mm2mils( 145 ),
0, Mm2mils( 145 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm1_D =
Ki_WorkSheetData WS_DopLeft_Line2 =
{
WS_LEFT_SEGMENT_D,
&WS_Segm2_D,
STAMP_OX, STAMP_Y_15,
STAMP_OX, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line3,
Mm2mils( 12 ), Mm2mils( 110 ),
0, Mm2mils( 110 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm2_D =
Ki_WorkSheetData WS_DopLeft_Line3 =
{
WS_SEGMENT_D,
&WS_Segm3_D,
STAMP_X_178, STAMP_Y_15,
STAMP_X_178, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line4,
Mm2mils( 12 ), Mm2mils( 85 ),
0, Mm2mils( 85 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm3_D =
Ki_WorkSheetData WS_DopLeft_Line4 =
{
WS_SEGMENT_D,
&WS_Segm4_D,
STAMP_X_168, STAMP_Y_15,
STAMP_X_168, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line5,
Mm2mils( 12 ), Mm2mils( 60 ),
0, Mm2mils( 60 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm4_D =
Ki_WorkSheetData WS_DopLeft_Line5 =
{
WS_SEGMENT_D,
&WS_Segm5_D,
STAMP_X_145, STAMP_Y_15,
STAMP_X_145, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line6,
Mm2mils( 12 ), Mm2mils( 25 ),
0, Mm2mils( 25 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm5_D =
Ki_WorkSheetData WS_DopLeft_Line6 =
{
WS_SEGMENT_D,
&WS_Segm6_D,
STAMP_X_130, STAMP_Y_15,
STAMP_X_130, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line7,
Mm2mils( 12 ), 0,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm6_D =
Ki_WorkSheetData WS_DopLeft_Line7 =
{
WS_SEGMENT_D,
&WS_Segm7_D,
STAMP_X_120, STAMP_Y_15,
STAMP_X_120, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Line8,
Mm2mils( 12 ), Mm2mils( 145 ),
Mm2mils( 12 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm7_D =
Ki_WorkSheetData WS_DopLeft_Line8 =
{
WS_SEGMENT_D,
&WS_Segm8_D,
STAMP_X_10, STAMP_Y_15,
STAMP_X_10, 0,
NULL, NULL
WS_OSN,
&WS_DopLeft_Text1,
Mm2mils( 7 ), Mm2mils( 145 ),
Mm2mils( 7 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm8_D =
Ki_WorkSheetData WS_DopLeft_Text1 =
{
WS_SEGMENT_D,
&WS_Segm9_D,
STAMP_X_185, STAMP_Y_10,
STAMP_X_120, STAMP_Y_10,
NULL, NULL
WS_TEXT,
&WS_DopLeft_Text2,
Mm2mils( 9.5 ), Mm2mils( 12.5 ),
0, 0,
wxT( "Инв.N подл." ), NULL
};
Ki_WorkSheetData WS_Segm9_D =
Ki_WorkSheetData WS_DopLeft_Text2 =
{
WS_SEGMENT_D,
&WS_Segm10_D,
STAMP_X_185, STAMP_Y_5,
STAMP_X_120, STAMP_Y_5,
NULL, NULL
WS_TEXT,
&WS_DopLeft_Text3,
Mm2mils( 9.5 ), Mm2mils( 42.5 ),
0, 0,
wxT( "Подп. и дата" ), NULL
};
Ki_WorkSheetData WS_Segm10_D =
Ki_WorkSheetData WS_DopLeft_Text3 =
{
WS_SEGMENT_D,
&WS_Segm11_D,
STAMP_X_10, STAMP_Y_8,
0, STAMP_Y_8,
NULL, NULL
WS_TEXT,
&WS_DopLeft_Text4,
Mm2mils( 9.5 ), Mm2mils( 72.5 ),
0, 0,
wxT( "Взам.инв.N" ), NULL
};
Ki_WorkSheetData WS_Segm11_D =
Ki_WorkSheetData WS_DopLeft_Text4 =
{
WS_SEGMENT_D,
&WS_Izm_D,
STAMP_X_185, STAMP_Y_15,
0, STAMP_Y_15,
NULL, NULL
WS_TEXT,
&WS_DopLeft_Text5,
Mm2mils( 9.5 ), Mm2mils( 97.5 ),
0, 0,
wxT( "Инв.N дубл." ), NULL
};
Ki_WorkSheetData WS_Izm_D =
Ki_WorkSheetData WS_DopLeft_Text5 =
{
WS_PODPIS_D,
&WS_List_D,
STAMP_X_185 - 30,STAMP_Y_0 + 90,
0, 0,
wxT( "Изм." ),NULL
WS_TEXT,
&WS_DopLeft_Line9,
Mm2mils( 9.5 ), Mm2mils( 127.5 ),
0, 0,
wxT( "Подп. и дата" ), NULL
};
Ki_WorkSheetData WS_List_D =
Ki_WorkSheetData WS_DopLeft_Line9 =
{
WS_PODPIS_D,
&WS_NDoc_D,
STAMP_X_178 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Лист" ),NULL
WS_OSN,
&WS_DopLeft_Line10,
Mm2mils( 7 ), Mm2mils( 287 ),
Mm2mils( 7 ), Mm2mils( 167 ),
NULL, NULL
};
Ki_WorkSheetData WS_NDoc_D =
Ki_WorkSheetData WS_DopLeft_Line10 =
{
WS_PODPIS_D,
&WS_Podp_D,
STAMP_X_168 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "N докум." ),NULL
WS_OSN,
&WS_DopLeft_Line11,
Mm2mils( 12 ), Mm2mils( 287 ),
Mm2mils( 12 ), Mm2mils( 167 ),
NULL, NULL
};
Ki_WorkSheetData WS_Podp_D =
Ki_WorkSheetData WS_DopLeft_Line11 =
{
WS_PODPIS_D,
&WS_Date_D,
STAMP_X_145 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Подп." ),NULL
WS_OSN,
&WS_DopLeft_Line12,
Mm2mils( 12 ), Mm2mils( 287 ),
Mm2mils( 12 ), Mm2mils( 167 ),
NULL, NULL
};
Ki_WorkSheetData WS_Date_D =
Ki_WorkSheetData WS_DopLeft_Line12 =
{
WS_PODPIS_D,
&WS_List1_D,
STAMP_X_130 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Дата" ),NULL
WS_OSN,
&WS_DopLeft_Line13,
Mm2mils( 12 ), Mm2mils( 167 ),
0, Mm2mils( 167 ),
NULL, NULL
};
Ki_WorkSheetData WS_List1_D =
Ki_WorkSheetData WS_DopLeft_Line13 =
{
WS_PODPIS_D,
&WS_ListN_D,
STAMP_X_10 - 30, STAMP_Y_8 + 90,
0, 0,
wxT( "Лист" ),NULL
WS_OSN,
&WS_DopLeft_Line14,
Mm2mils( 12 ), Mm2mils( 227 ),
0, Mm2mils( 227 ),
NULL, NULL
};
Ki_WorkSheetData WS_DopLeft_Line14 =
{
WS_OSN,
&WS_DopLeft_Text6,
Mm2mils( 12 ), Mm2mils( 287 ),
0, Mm2mils( 287 ),
NULL, NULL
};
Ki_WorkSheetData WS_ListN_D =
Ki_WorkSheetData WS_DopLeft_Text6 =
{
WS_IDENTSHEET_D,
WS_TEXT,
&WS_DopLeft_Text7,
Mm2mils( 9.5 ), Mm2mils( 197 ),
0, 0,
wxT( "Справ. N" ), NULL
};
Ki_WorkSheetData WS_DopLeft_Text7 =
{
WS_TEXT,
NULL,
STAMP_Y_0 + 196,STAMP_Y_0 + 90,
0, 0,
Mm2mils( 9.5 ), Mm2mils( 257 ),
0, 0,
wxT( "Перв. примен." ), NULL
};
// Center - left top corner
Ki_WorkSheetData WS_DopTop_Line1 =
{
WS_OSN,
&WS_DopTop_Line2,
Mm2mils( 70 ), 0,
Mm2mils( 70 ), Mm2mils( 14 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm1_LU =
Ki_WorkSheetData WS_DopTop_Line2 =
{
WS_SEGMENT_LU,
&WS_Segm2_LU,
STAMP_12, STAMP_145,
STAMP_12, 0,
NULL, NULL
WS_OSN,
&WS_DopTop_Line3,
Mm2mils( 70 ), Mm2mils( 14 ),
0, Mm2mils( 14 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm2_LU =
Ki_WorkSheetData WS_DopTop_Line3 =
{
WS_SEGMENT_LU,
&WS_Segm3_LU,
STAMP_7, STAMP_145,
STAMP_7, 0,
NULL, NULL
WS_OSN,
&WS_DopTop_Line4,
Mm2mils( 70 ), Mm2mils( 14 ),
Mm2mils( 137 ), Mm2mils( 14 ),
NULL, NULL
};
Ki_WorkSheetData WS_Segm3_LU =
Ki_WorkSheetData WS_DopTop_Line4 =
{
WS_SEGMENT_LU,
&WS_Segm4_LU,
STAMP_12, STAMP_145,
0, STAMP_145,
NULL, NULL
WS_OSN,
&WS_DopTop_Line5,
Mm2mils( 84 ), Mm2mils( 7 ),
Mm2mils( 137 ), Mm2mils( 7 ),
NULL, NULL
};
Ki_WorkSheetData WS_DopTop_Line5 =
{
WS_OSN,
&WS_DopTop_Line6,
Mm2mils( 84 ), Mm2mils( 14 ),
Mm2mils( 84 ), 0,
NULL, NULL
};
Ki_WorkSheetData WS_DopTop_Line6 =
{
WS_OSN,
NULL,
Mm2mils( 137 ), Mm2mils( 14 ),
Mm2mils( 137 ), 0,
NULL, NULL
};
#else
Ki_WorkSheetData WS_Date =
{
WS_DATE,
&WS_Licence,
BLOCK_DATE_X, BLOCK_DATE_Y,
0, 0,
wxT( "Date: " ),NULL
};
Ki_WorkSheetData WS_Licence =
{
WS_KICAD_VERSION,
&WS_Revision,
BLOCK_KICAD_VERSION_X,BLOCK_KICAD_VERSION_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Revision =
{
WS_REV,
&WS_SizeSheet,
BLOCK_REV_X, BLOCK_REV_Y,
0, 0,
wxT( "Rev: " ), NULL
};
Ki_WorkSheetData WS_SizeSheet =
{
WS_SIZESHEET,
&WS_IdentSheet,
BLOCK_SIZE_SHEET_X, BLOCK_SIZE_SHEET_Y,
0, 0,
wxT( "Size: " ), NULL
};
Ki_WorkSheetData WS_IdentSheet =
{
WS_IDENTSHEET,
&WS_Title,
BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y,
0, 0,
wxT( "Id: " ), NULL
};
Ki_WorkSheetData WS_Segm4_LU =
Ki_WorkSheetData WS_Title =
{
WS_SEGMENT_LU,
&WS_Segm5_LU,
STAMP_12, STAMP_110,
0, STAMP_110,
NULL, NULL
WS_TITLE,
&WS_SheetFilename,
BLOCK_TITLE_X, BLOCK_TITLE_Y,
0, 0,
wxT( "Title: " ), NULL
};
Ki_WorkSheetData WS_Segm5_LU =
Ki_WorkSheetData WS_SheetFilename =
{
WS_SEGMENT_LU,
&WS_Segm6_LU,
STAMP_12, STAMP_85,
0, STAMP_85,
NULL, NULL
WS_FILENAME,
&WS_FullSheetName,
BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
0, 0,
wxT( "File: " ), NULL
};
Ki_WorkSheetData WS_Segm6_LU =
Ki_WorkSheetData WS_FullSheetName =
{
WS_SEGMENT_LU,
&WS_Segm7_LU,
STAMP_12, STAMP_60,
0, STAMP_60,
NULL, NULL
WS_FULLSHEETNAME,
&WS_Company,
BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y,
0, 0,
wxT( "Sheet: " ), NULL
};
Ki_WorkSheetData WS_Segm7_LU =
Ki_WorkSheetData WS_Company =
{
WS_SEGMENT_LU,
&WS_Segm8_LU,
STAMP_12, STAMP_25,
0, STAMP_25,
NULL, NULL
WS_COMPANY_NAME,
&WS_Comment1,
BLOCK_COMMENT_X,BLOCK_COMPANY_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm8_LU =
Ki_WorkSheetData WS_Comment1 =
{
WS_SEGMENT_LU,
&WS_Segm9_LU,
STAMP_12, 0,
0, 0,
NULL, NULL
WS_COMMENT1,
&WS_Comment2,
BLOCK_COMMENT_X,BLOCK_COMMENT1_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment2 =
{
WS_COMMENT2,
&WS_Comment3,
BLOCK_COMMENT_X,BLOCK_COMMENT2_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment3 =
{
WS_COMMENT3,
&WS_Comment4,
BLOCK_COMMENT_X,BLOCK_COMMENT3_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment4 =
{
WS_COMMENT4,
&WS_MostLeftLine,
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm9_LU =
{
WS_SEGMENT_LU,
&WS_Segm10_LU,
STAMP_12, STAMP_287,
STAMP_12, STAMP_167,
NULL, NULL
};
Ki_WorkSheetData WS_Segm10_LU =
/// Left vertical segment
Ki_WorkSheetData WS_MostLeftLine =
{
WS_SEGMENT_LU,
&WS_Segm11_LU,
STAMP_7, STAMP_287,
STAMP_7, STAMP_167,
NULL, NULL
WS_LEFT_SEGMENT,
&WS_SeparatorLine,
BLOCK_OX, SIZETEXT * 16,
BLOCK_OX, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm11_LU =
{
WS_SEGMENT_LU,
&WS_Segm12_LU,
STAMP_12, STAMP_287,
0, STAMP_287,
NULL, NULL
};
Ki_WorkSheetData WS_Segm12_LU =
/// horizontal segment between filename and comments
Ki_WorkSheetData WS_SeparatorLine =
{
WS_SEGMENT_LU,
&WS_Segm13_LU,
STAMP_12, STAMP_227,
0, STAMP_227,
NULL, NULL
WS_SEGMENT,
&WS_MostUpperLine,
BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
0, VARIABLE_BLOCK_START_POSITION,
NULL, NULL
};
Ki_WorkSheetData WS_Segm13_LU =
{
WS_SEGMENT_LU,
&WS_Podp1_LU,
STAMP_12, STAMP_167,
0, STAMP_167,
NULL, NULL
};
Ki_WorkSheetData WS_Podp1_LU =
/// superior horizontal segment
Ki_WorkSheetData WS_MostUpperLine =
{
WS_PODPIS_LU,
&WS_Podp2_LU,
STAMP_7 + 90, 0 + 492,
0, 0,
wxT( "Инв.N подл." ),NULL
WS_UPPER_SEGMENT,
&WS_Segm3,
BLOCK_OX, SIZETEXT * 16,
0, SIZETEXT * 16,
NULL, NULL
};
Ki_WorkSheetData WS_Podp2_LU =
{
WS_PODPIS_LU,
&WS_Podp3_LU,
STAMP_7 + 90, STAMP_25 + 688,
0, 0,
wxT( "Подп. и дата" ),NULL
};
Ki_WorkSheetData WS_Podp3_LU =
/// horizontal segment above COMPANY NAME
Ki_WorkSheetData WS_Segm3 =
{
WS_PODPIS_LU,
&WS_Podp4_LU,
STAMP_7 + 90, STAMP_60 + 492,
0, 0,
wxT( "Взам.инв.N" ),NULL
WS_SEGMENT,
&WS_Segm4,
BLOCK_OX, SIZETEXT * 6,
0, SIZETEXT * 6,
NULL, NULL
};
Ki_WorkSheetData WS_Podp4_LU =
{
WS_PODPIS_LU,
&WS_Podp5_LU,
STAMP_7 + 90, STAMP_85 + 492,
0, 0,
wxT( "Инв.N дубл." ),NULL
};
Ki_WorkSheetData WS_Podp5_LU =
/// vertical segment of the left REV and SHEET
Ki_WorkSheetData WS_Segm4 =
{
WS_PODPIS_LU,
&WS_Podp6_LU,
STAMP_7 + 90, STAMP_110 + 688,
0, 0,
wxT( "Подп. и дата" ),NULL
WS_SEGMENT,
&WS_Segm5,
BLOCK_REV_X + SIZETEXT,SIZETEXT * 4,
BLOCK_REV_X + SIZETEXT,0,
NULL, NULL
};
Ki_WorkSheetData WS_Podp6_LU =
{
WS_PODPIS_LU,
&WS_Podp7_LU,
STAMP_7 + 90, STAMP_167 + 1180,
0, 0,
wxT( "Справ. N" ),NULL
};
Ki_WorkSheetData WS_Podp7_LU =
Ki_WorkSheetData WS_Segm5 =
{
WS_PODPIS_LU,
NULL,
STAMP_7 + 90, STAMP_227 + 1180,
0, 0,
wxT( "Перв. примен." ),NULL
WS_SEGMENT,
&WS_Segm6,
BLOCK_OX, SIZETEXT * 2,
0, SIZETEXT * 2,
NULL, NULL
};
Ki_WorkSheetData WS_Segm1_LT =
{
WS_SEGMENT_LT,
&WS_Segm2_LT,
STAMP_X_0, STAMP_Y_14,
STAMP_X_137, STAMP_Y_14,
NULL, NULL
};
Ki_WorkSheetData WS_Segm2_LT =
Ki_WorkSheetData WS_Segm6 =
{
WS_SEGMENT_LT,
&WS_Segm3_LT,
STAMP_X_137, STAMP_Y_14,
STAMP_X_137, 0,
NULL, NULL
WS_SEGMENT,
&WS_Segm7,
BLOCK_OX, SIZETEXT * 4,
0, SIZETEXT * 4,
NULL, NULL
};
Ki_WorkSheetData WS_Segm3_LT =
{
WS_SEGMENT_LT,
&WS_Segm4_LT,
STAMP_X_137, STAMP_Y_7,
STAMP_X_84, STAMP_Y_7,
NULL, NULL
};
Ki_WorkSheetData WS_Segm4_LT =
{
WS_SEGMENT_LT,
&WS_Segm5_LT,
STAMP_X_84, STAMP_Y_14,
STAMP_X_84, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm5_LT =
Ki_WorkSheetData WS_Segm7 =
{
WS_SEGMENT_LT,
NULL,
STAMP_X_70, STAMP_Y_14,
STAMP_X_70, 0,
#else
WS_SEGMENT,
NULL,
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 4,
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 2,
#endif
NULL, NULL
};
#endif
void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
double aScalar, const wxString &aFilename )
......@@ -1041,6 +1082,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, wxSize& aSz, wxPoint& aLT, wxPoi
EDA_COLOR_T aClr1, EDA_COLOR_T aClr2 )
{
wxPoint pos;
wxPoint end;
int refx, refy;
wxString Line;
Ki_WorkSheetData* WsItem;
......@@ -1060,261 +1102,488 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, wxSize& aSz, wxPoint& aLT, wxPoi
yg = aSz.y - aRB.y;
#if defined(KICAD_GOST)
// Draw the border.
GRRect( m_canvas->GetClipBox(), aDC, refx * aScalar, refy * aScalar,
xg * aScalar, yg * aScalar, aLnW, aClr1 );
refx = aLT.x;
refy = aSz.y - aRB.y; // Lower left corner
for( WsItem = &WS_Segm1_LU; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = ( refx - WsItem->m_Posx ) * aScalar;
pos.y = ( refy - WsItem->m_Posy ) * aScalar;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_CADRE:
break;
case WS_PODPIS_LU:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_VERT, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
aLnW, false, false );
break;
case WS_SEGMENT_LU:
xg = aLT.x - WsItem->m_Endx;
yg = aSz.y - aRB.y - WsItem->m_Endy;
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y,
xg * aScalar, yg * aScalar, aLnW, aClr1 );
break;
}
}
int lnMsg, ln;
int lnWosn = aLnW * 2;
int lnWtonk = aLnW;
wxSize sz;
wxSize size0_8( SIZETEXT * aScalar * 0.8, SIZETEXT * aScalar * 1 );
wxSize size1_5( SIZETEXT * aScalar * 1.5, SIZETEXT * aScalar * 1.5 );
wxSize size2( SIZETEXT * aScalar * 2, SIZETEXT * aScalar * 2 );
wxSize size3( SIZETEXT * aScalar * 3, SIZETEXT * aScalar * 3 );
refy = aRB.y; // Left Top corner
for( WsItem = &WS_Segm1_LT; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = ( refx + WsItem->m_Posx ) * aScalar;
pos.y = ( refy + WsItem->m_Posy ) * aScalar;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_SEGMENT_LT:
xg = aLT.x + WsItem->m_Endx;
yg = aRB.y + WsItem->m_Endy;
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y,
xg * aScalar, yg * aScalar, aLnW, aClr1 );
break;
}
}
// Draw the border.
GRRect( m_canvas->GetClipBox(), aDC, refx * aScalar, refy * aScalar,
xg * aScalar, yg * aScalar, lnWosn, aClr1 );
wxSize size2( SIZETEXT * aScalar * 2, SIZETEXT * aScalar * 2);
wxSize size3( SIZETEXT * aScalar * 3, SIZETEXT * aScalar * 3);
wxSize size1_5( SIZETEXT * aScalar * 1.5, SIZETEXT * aScalar * 1.5);
// lower right corner
// Center - right bottom corner
refx = aSz.x - aRB.x;
refy = aSz.y - aRB.y;
// First page
if( aScr == 1 )
{
for( WsItem = &WS_Date; WsItem != NULL; WsItem = WsItem->Pnext )
for( WsItem = &WS_Osn1_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx) * aScalar;
pos.y = (refy - WsItem->m_Posy) * aScalar;
msg.Empty();
end.x = (refx - WsItem->m_Endx) * aScalar;
end.y = (refy - WsItem->m_Endy) * aScalar;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_DATE:
break;
case WS_REV:
break;
case WS_KICAD_VERSION:
break;
case WS_PODPIS:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
break;
case WS_SIZESHEET:
break;
case WS_IDENTSHEET:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
if( aNScr > 1 )
msg << aScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
case WS_OSN:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWosn, aClr1 );
break;
case WS_SHEETS:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << aNScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
case WS_TONK:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWtonk, aClr1 );
break;
case WS_COMPANY_NAME:
msg = aTb.GetCompany();
case WS_TEXT:
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
if( WsItem == &WS_Osn1_Text1 )
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size0_8,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
else
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
break;
case WS_TITLE:
msg = aTb.GetTitle();
case WS_TEXTL:
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size1_5,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
break;
case WS_COMMENT1:
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
}
}
// Sheet number
if( aNScr > 1 )
{
pos.x = (refx - Mm2mils( 36 )) * aScalar;
pos.y = (refy - Mm2mils( 17.5 )) * aScalar;
msg.Empty();
msg << aScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_CENTER,
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
}
// Count of sheets
pos.x = (refx - Mm2mils( 10 )) * aScalar;
pos.y = (refy - Mm2mils( 17.5 )) * aScalar;
msg.Empty();
msg << aNScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
// Company name
msg = aTb.GetCompany();
if( !msg.IsEmpty() )
{
sz = size1_5;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 49 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 25 )) * aScalar;
pos.y = (refy - Mm2mils( 7.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
// Title
msg = aTb.GetTitle();
if( !msg.IsEmpty() )
{
sz = size1_5;
wxArrayString lines;
int titleWidth = 0;
int titleHeight = (sz.y + sz.y * 0.5) / aScalar;
int titleFieldWidth = Mm2mils( 69 );
int titleFieldHeight = Mm2mils( 24 );
int index = 0;
wxString fullMsg = msg;
do // Reduce the height of wrapped title until the fit
{
do // Wrap the title
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
pos.x = (aLT.x + 1260) * aScalar;
pos.y = (aLT.y + 270) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, 1800, size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
if( titleWidth > titleFieldWidth )
{
index = 0;
do
{
msg = msg.Left( msg.Length() - 1 );
if( msg.Length() == 0 )
{
lines.Clear();
msg = fullMsg;
sz.x -= aScalar;
break;
}
else
{
index++;
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
wxString ch = wxString( msg.Last() );
if( titleWidth < titleFieldWidth && ch == wxT( " " ) )
{
// New sentence on a new line
int dot = msg.Index( wxT( ". " ) );
if( dot != wxNOT_FOUND )
{
index += msg.Length() - dot - 2;
msg = msg.Left( dot + 1 );
lines.Add( msg );
msg = fullMsg.Right( index );
break;
}
else
{
msg = msg.Left( msg.Length() - 1 );
lines.Add( msg );
msg = fullMsg.Right( index );
break;
}
}
}
}while( 1 );
}
else
{
// New sentence on a new line
int dot = msg.Index( wxT( ". " ) );
if( dot != wxNOT_FOUND )
{
lines.Add( msg.Left( dot + 1 ) );
lines.Add( fullMsg.Right( msg.Length() - dot - 2 ) );
}
else
lines.Add( msg );
break;
}
}while( 1 );
if( titleFieldHeight < titleHeight * lines.Count() )
{
sz.y -= aScalar;
sz.x -= aScalar;
msg = fullMsg;
lines.Clear();
}
else
break;
}while( 1 );
pos.x = (refx - Mm2mils( 85 )) * aScalar;
pos.y = (refy - Mm2mils( 27.5 ) - (titleHeight * (lines.Count() - 1) / 2)) * aScalar;
for( int curLn = 0; curLn < lines.Count(); curLn++ )
{
msg = lines[curLn];
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
pos.y += titleHeight * aScalar;
}
}
// Decimal number
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
{
sz = size3;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 119 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 60 )) * aScalar;
pos.y = (refy - Mm2mils( 47.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
// Developer
msg = aTb.GetComment2();
if( !msg.IsEmpty() )
{
sz = size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167.5 )) * aScalar;
pos.y = (refy - Mm2mils( 27.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
// Verifier
msg = aTb.GetComment3();
if( !msg.IsEmpty() )
{
sz = size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167 )) * aScalar;
pos.y = (refy - Mm2mils( 22.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
// Approver
msg = aTb.GetComment4();
if( !msg.IsEmpty() )
{
sz = size;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 22 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 167 )) * aScalar;
pos.y = (refy - Mm2mils( 2.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
}
else // other pages
{
for( WsItem = &WS_Osn2a_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx) * aScalar;
pos.y = (refy - WsItem->m_Posy) * aScalar;
end.x = (refx - WsItem->m_Endx) * aScalar;
end.y = (refy - WsItem->m_Endy) * aScalar;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWosn, aClr1 );
break;
case WS_COMMENT2:
msg = aTb.GetComment2();
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
case WS_TONK:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWtonk, aClr1 );
break;
case WS_COMMENT3:
msg = aTb.GetComment3();
case WS_TEXT:
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
if( WsItem == &WS_Osn2a_Text1 )
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size0_8,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
else
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
break;
case WS_COMMENT4:
msg = aTb.GetComment4();
case WS_TEXTL:
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
break;
case WS_UPPER_SEGMENT:
case WS_LEFT_SEGMENT:
WS_MostUpperLine.m_Posy = WS_MostUpperLine.m_Endy =
WS_MostLeftLine.m_Posy = STAMP_OY;
pos.y = ( refy - WsItem->m_Posy ) * aScalar;
case WS_SEGMENT:
xg = aSz.x - aRB.x - WsItem->m_Endx;
yg = aSz.y - aRB.y - WsItem->m_Endy;
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y,
xg * aScalar, yg * aScalar, aLnW, aClr1 );
break;
}
}
// Sheet number
pos.x = (refx - Mm2mils( 5 )) * aScalar;
pos.y = (refy - Mm2mils( 4 )) * aScalar;
msg.Empty();
msg << aScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_CENTER,
GR_TEXT_VJUSTIFY_CENTER, aLnW, false, false );
// Decimal number
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
{
sz = size3;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 109 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 65 )) * aScalar;
pos.y = (refy - Mm2mils( 7.5 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
}
else
// Format
pos.x = (refx - Mm2mils( 23 )) * aScalar;
pos.y = (refy + Mm2mils( 2.5 )) * aScalar;
msg.Empty();
msg << aType;
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
// Center - left bottom corner
refx = aLT.x;
refy = aSz.y - aRB.y;
for( WsItem = &WS_DopLeft_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{
if( aScr > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only
break;
pos.x = (refx - WsItem->m_Posx) * aScalar;
pos.y = (refy - WsItem->m_Posy) * aScalar;
end.x = (refx - WsItem->m_Endx) * aScalar;
end.y = (refy - WsItem->m_Endy) * aScalar;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWosn, aClr1 );
break;
case WS_TEXT:
if( !msg.IsEmpty() )
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_VERT, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
break;
}
}
if( aType == PAGE_INFO::A4 || aSz.x > aSz.y ) // A4 or Landscape
{
for( WsItem = &WS_CADRE_D; WsItem != NULL; WsItem = WsItem->Pnext )
// Center - left top corner
refx = aLT.x;
refy = aLT.y;
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = ( refx - WsItem->m_Posx ) * aScalar;
pos.y = ( refy - WsItem->m_Posy ) * aScalar;
msg.Empty();
if( aScr > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
break;
pos.x = (refx + WsItem->m_Posx) * aScalar;
pos.y = (refy + WsItem->m_Posy) * aScalar;
end.x = (refx + WsItem->m_Endx) * aScalar;
end.y = (refy + WsItem->m_Endy) * aScalar;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_CADRE:
// Begin list number > 1
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
{
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_HORIZ, size3,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
pos.x = (aLT.x + 1260) * aScalar;
pos.y = (aLT.y + 270) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, 1800, size2,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
case WS_OSN:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWosn, aClr1 );
break;
case WS_PODPIS_D:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
case WS_TONK:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWtonk, aClr1 );
break;
}
}
case WS_IDENTSHEET_D:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << aScr;
DrawGraphicText( m_canvas, aDC, pos, aClr1,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
// Decimal number
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
{
sz = size2;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 69 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx + Mm2mils( 35 )) * aScalar;
pos.y = (refy + Mm2mils( 7 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, 1800, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
}
else // Portrait
{
// Center - right top corner
// Lines are used from the upper left corner by the change of coordinates
refx = aSz.x - aRB.x;
refy = aLT.y;
for( WsItem = &WS_DopTop_Line1; WsItem != NULL; WsItem = WsItem->Pnext )
{
if( aScr > 1 && WsItem == &WS_DopTop_Line3 ) // Some fields for first page only
break;
case WS_LEFT_SEGMENT_D:
pos.y = ( refy - WsItem->m_Posy ) * aScalar;
pos.x = (refx - WsItem->m_Posy) * aScalar;
pos.y = (refy + WsItem->m_Posx) * aScalar;
end.x = (refx - WsItem->m_Endy) * aScalar;
end.y = (refy + WsItem->m_Endx) * aScalar;
msg = WsItem->m_Legende;
switch( WsItem->m_Type )
{
case WS_OSN:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWosn, aClr1 );
break;
case WS_SEGMENT_D:
xg = aSz.x - aRB.x - WsItem->m_Endx;
yg = aSz.y - aRB.y - WsItem->m_Endy;
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y,
xg * aScalar, yg * aScalar, aLnW, aClr1 );
case WS_TONK:
GRLine( m_canvas->GetClipBox(), aDC, pos.x, pos.y, end.x, end.y,
lnWtonk, aClr1 );
break;
}
}
// Decimal number
msg = aTb.GetComment1();
if( !msg.IsEmpty() )
{
sz = size2;
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / aScalar;
ln = Mm2mils( 69 );
if( lnMsg > ln )
sz.x *= float( ln ) / lnMsg;
pos.x = (refx - Mm2mils( 7 )) * aScalar;
pos.y = (refy + Mm2mils( 35 )) * aScalar;
DrawGraphicText( m_canvas, aDC, pos, aClr2,
msg, TEXT_ORIENT_VERT, sz,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
aLnW, false, false );
}
}
#else
// Draw the border.
int ii, jj, ipas, gxpas, gypas;
for( ii = 0; ii < 2; ii++ )
......@@ -1602,6 +1871,7 @@ void EDA_DRAW_FRAME::TraceWorkSheet( wxDC* aDC, wxSize& aSz, wxPoint& aLT, wxPoi
}
#endif
}
......
......@@ -155,7 +155,11 @@ static bool engStrToDouble( wxString aStr, double* aDouble )
aStr.Append( wxT( "R" ) );
// Regular expression for a value string, e.g., 47k2
#if defined(KICAD_GOST)
static wxRegEx valueRegEx( wxT( "^([0-9]+)(мк|[pnumRkKMGT.,кнМГ])([0-9]*)(мк*|[pnumRkKMGTкнМГ]*)" ) );
#else
static wxRegEx valueRegEx( wxT( "^([0-9]+)([pnumRkKMGT.,])([0-9]*)([pnumRkKMGT]*)" ) );
#endif
if( !valueRegEx.Matches( aStr ) )
return false;
......@@ -164,7 +168,31 @@ static bool engStrToDouble( wxString aStr, double* aDouble )
+ wxT( "." )
+ valueRegEx.GetMatch( aStr, 3 ) );
wxString multiplierString = valueRegEx.GetMatch( aStr, 2 );
#if defined(KICAD_GOST)
if ( multiplierString == wxT( "мк" ) )
multiplierString = wxT( "u" );
else if ( multiplierString == wxT( "к" ) )
multiplierString = wxT( "k" );
else if ( multiplierString == wxT( "н" ) )
multiplierString = wxT( "n" );
else if ( multiplierString == wxT( "М" ) )
multiplierString = wxT( "M" );
else if ( multiplierString == wxT( "Г" ) )
multiplierString = wxT( "G" );
#endif
wxString post_multiplierString = valueRegEx.GetMatch( aStr, 4 );
#if defined(KICAD_GOST)
if ( post_multiplierString == wxT( "мк" ) )
multiplierString = wxT( "u" );
else if ( post_multiplierString == wxT( "к" ) )
multiplierString = wxT( "k" );
else if ( post_multiplierString == wxT( "н" ) )
multiplierString = wxT( "n" );
else if ( post_multiplierString == wxT( "М" ) )
multiplierString = wxT( "M" );
else if ( post_multiplierString == wxT( "Г" ) )
multiplierString = wxT( "G" );
#endif
double multiplier;
switch( (wxChar)multiplierString[0] )
......
......@@ -36,7 +36,7 @@
#define PIN_LENGTH 300 /* Default Length of each pin to be drawn. */
#if defined(KICAD_GOST)
#define INVERT_PIN_RADIUS 20 /* Radius of inverted pin circle. */
#define INVERT_PIN_RADIUS 30 /* Radius of inverted pin circle. */
#else
#define INVERT_PIN_RADIUS 35 /* Radius of inverted pin circle. */
#endif
......
......@@ -469,7 +469,11 @@ void LIB_EDIT_FRAME::UpdatePartSelectList()
for( int i = 0; i < m_component->GetPartCount(); i++ )
{
wxString msg;
#if defined(KICAD_GOST)
msg.Printf( _( "Part %d" ), i + 1 );
#else
msg.Printf( _( "Part %c" ), 'A' + i );
#endif
m_partSelectBox->Append( msg );
}
}
......
......@@ -44,7 +44,11 @@
SCH_JUNCTION::SCH_JUNCTION( const wxPoint& pos ) :
SCH_ITEM( NULL, SCH_JUNCTION_T )
{
#if defined(KICAD_GOST)
#define DRAWJUNCTION_DIAMETER 50 /* Diameter of junction symbol between wires by GOST*/
#else
#define DRAWJUNCTION_DIAMETER 32 /* Diameter of junction symbol between wires */
#endif
m_pos = pos;
m_Layer = LAYER_JUNCTION;
m_size.x = m_size.y = DRAWJUNCTION_DIAMETER;
......
......@@ -10,72 +10,17 @@
#include <common.h> // Mm2mils()
#define GRID_REF_W 70 // height of the band reference grid
#define SIZETEXT 60 // worksheet text size
#define SIZETEXT_REF 50 // worksheet frame reference text size
#define PAS_REF 2000 // no reference markings on worksheet frame
#if defined(KICAD_GOST)
// There is a page layout minor issue in GOST mode.
// This is the rounding-off error of 1 mil exactly.
// I hope this problem will go away when we will go
// to nanometers (zaka62).
#define STAMP_OX Mm2mils( 185 ) + 1
#define STAMP_OY Mm2mils( 55 )
#define STAMP_Y_0 0
#define STAMP_Y_5 Mm2mils( 5 )
#define STAMP_Y_8 Mm2mils( 8 )
#define STAMP_Y_7 Mm2mils( 7 )
#define STAMP_Y_10 Mm2mils( 10 )
#define STAMP_Y_14 Mm2mils( 14 )
#define STAMP_Y_15 Mm2mils( 15 )
#define STAMP_Y_20 Mm2mils( 20 )
#define STAMP_Y_25 Mm2mils( 25 )
#define STAMP_Y_30 Mm2mils( 30 )
#define STAMP_Y_35 Mm2mils( 35 )
#define STAMP_Y_40 Mm2mils( 40 )
#define STAMP_Y_45 Mm2mils( 45 )
#define STAMP_Y_50 Mm2mils( 50 )
#define STAMP_Y_55 Mm2mils( 55 )
#define STAMP_X_0 0
#define STAMP_X_10 Mm2mils( 10 )
#define STAMP_X_14 Mm2mils( 14 )
#define STAMP_X_18 Mm2mils( 18 )
#define STAMP_X_30 Mm2mils( 30 )
#define STAMP_X_35 Mm2mils( 35 )
#define STAMP_X_40 Mm2mils( 40 )
#define STAMP_X_45 Mm2mils( 45 )
#define STAMP_X_50 Mm2mils( 50 )
#define STAMP_X_53 Mm2mils( 53 )
#define STAMP_X_65 Mm2mils( 65 )
#define STAMP_X_70 Mm2mils( 70 )
#define STAMP_X_84 Mm2mils( 84 )
#define STAMP_X_85 Mm2mils( 85 )
#define STAMP_X_120 Mm2mils( 120 )
#define STAMP_X_130 Mm2mils( 130 )
#define STAMP_X_137 Mm2mils( 137 )
#define STAMP_X_145 Mm2mils( 145 )
#define STAMP_X_168 Mm2mils( 168 )
#define STAMP_X_178 Mm2mils( 178 )
#define STAMP_X_185 Mm2mils( 185 )
#define STAMP_5 Mm2mils( 5 )
#define STAMP_7 Mm2mils( 7 )
#define STAMP_12 Mm2mils( 12 )
#define STAMP_145 Mm2mils( 145 )
#define STAMP_110 Mm2mils( 110 )
#define STAMP_85 Mm2mils( 85 )
#define STAMP_60 Mm2mils( 60 )
#define STAMP_25 Mm2mils( 25 )
#define STAMP_287 Mm2mils( 287 )
#define STAMP_227 Mm2mils( 227 )
#define STAMP_167 Mm2mils( 167 )
#define SIZETEXT 100 // worksheet text size
#else
#define SIZETEXT 60 // worksheet text size
#endif
#define SIZETEXT_REF 50 // worksheet frame reference text size
#define PAS_REF 2000 // no reference markings on worksheet frame
#if !defined(KICAD_GOST)
// The coordinates below are relative to the bottom right corner of page and
// will be subtracted from this origin.
......@@ -97,13 +42,15 @@
#define BLOCK_FILENAME_X BLOCK_OX - SIZETEXT
#define BLOCK_FILENAME_Y (SIZETEXT * 9)
#define BLOCK_COMMENT_X BLOCK_OX - SIZETEXT
#define VARIABLE_BLOCK_START_POSITION (SIZETEXT * 10)
#define BLOCK_COMPANY_Y (SIZETEXT * 11)
#define BLOCK_COMMENT1_Y (SIZETEXT * 13)
#define BLOCK_COMMENT2_Y (SIZETEXT * 15)
#define BLOCK_COMMENT3_Y (SIZETEXT * 17)
#define BLOCK_COMMENT4_Y (SIZETEXT * 19)
#endif
#define VARIABLE_BLOCK_START_POSITION (SIZETEXT * 10)
struct Ki_WorkSheetData
{
......@@ -119,17 +66,17 @@ public:
/// Work sheet structure type definitions.
enum TypeKi_WorkSheetData {
#if defined(KICAD_GOST)
WS_OSN,
WS_TONK,
WS_TEXT,
WS_TEXTL
#else
WS_DATE,
WS_REV,
WS_KICAD_VERSION,
#if defined(KICAD_GOST)
WS_PODPIS,
#endif
WS_SIZESHEET,
WS_IDENTSHEET,
#if defined(KICAD_GOST)
WS_SHEETS,
#endif
WS_TITLE,
WS_FILENAME,
WS_FULLSHEETNAME,
......@@ -141,20 +88,110 @@ enum TypeKi_WorkSheetData {
WS_SEGMENT,
WS_UPPER_SEGMENT,
WS_LEFT_SEGMENT,
#if defined(KICAD_GOST)
WS_CADRE,
WS_LEFT_SEGMENT_D,
WS_SEGMENT_D,
WS_PODPIS_D,
WS_IDENTSHEET_D,
WS_SEGMENT_LU,
WS_SEGMENT_LT,
WS_PODPIS_LU
#else
WS_CADRE
#endif
};
#if defined(KICAD_GOST)
extern Ki_WorkSheetData WS_Osn1_Line1;
extern Ki_WorkSheetData WS_Osn1_Line2;
extern Ki_WorkSheetData WS_Osn1_Line3;
extern Ki_WorkSheetData WS_Osn1_Line4;
extern Ki_WorkSheetData WS_Osn1_Line5;
extern Ki_WorkSheetData WS_Osn1_Line6;
extern Ki_WorkSheetData WS_Osn1_Line7;
extern Ki_WorkSheetData WS_Osn1_Line8;
extern Ki_WorkSheetData WS_Osn1_Line9;
extern Ki_WorkSheetData WS_Osn1_Line10;
extern Ki_WorkSheetData WS_Osn1_Line11;
extern Ki_WorkSheetData WS_Osn1_Line12;
extern Ki_WorkSheetData WS_Osn1_Line13;
extern Ki_WorkSheetData WS_Osn1_Line14;
extern Ki_WorkSheetData WS_Osn1_Line15;
extern Ki_WorkSheetData WS_Osn1_Line16;
extern Ki_WorkSheetData WS_Osn1_Line17;
extern Ki_WorkSheetData WS_Osn1_Line18;
extern Ki_WorkSheetData WS_Osn1_Line19;
extern Ki_WorkSheetData WS_Osn1_Line20;
extern Ki_WorkSheetData WS_Osn1_Line21;
extern Ki_WorkSheetData WS_Osn1_Line22;
extern Ki_WorkSheetData WS_Osn1_Line23;
extern Ki_WorkSheetData WS_Osn1_Line24;
extern Ki_WorkSheetData WS_Osn1_Line25;
extern Ki_WorkSheetData WS_Osn1_Line26;
extern Ki_WorkSheetData WS_Osn1_Line27;
extern Ki_WorkSheetData WS_Osn1_Text1;
extern Ki_WorkSheetData WS_Osn1_Text2;
extern Ki_WorkSheetData WS_Osn1_Text3;
extern Ki_WorkSheetData WS_Osn1_Text4;
extern Ki_WorkSheetData WS_Osn1_Text5;
extern Ki_WorkSheetData WS_Osn1_Text6;
extern Ki_WorkSheetData WS_Osn1_Text7;
extern Ki_WorkSheetData WS_Osn1_Text8;
extern Ki_WorkSheetData WS_Osn1_Text9;
extern Ki_WorkSheetData WS_Osn1_Text10;
extern Ki_WorkSheetData WS_Osn1_Text11;
extern Ki_WorkSheetData WS_Osn1_Text12;
extern Ki_WorkSheetData WS_Osn1_Text13;
extern Ki_WorkSheetData WS_Osn1_Text14;
extern Ki_WorkSheetData WS_Osn1_Text15;
extern Ki_WorkSheetData WS_Osn1_Text16;
extern Ki_WorkSheetData WS_Osn1_Text17;
extern Ki_WorkSheetData WS_Osn2a_Line1;
extern Ki_WorkSheetData WS_Osn2a_Line2;
extern Ki_WorkSheetData WS_Osn2a_Line3;
extern Ki_WorkSheetData WS_Osn2a_Line4;
extern Ki_WorkSheetData WS_Osn2a_Line5;
extern Ki_WorkSheetData WS_Osn2a_Line6;
extern Ki_WorkSheetData WS_Osn2a_Line7;
extern Ki_WorkSheetData WS_Osn2a_Line8;
extern Ki_WorkSheetData WS_Osn2a_Line9;
extern Ki_WorkSheetData WS_Osn2a_Line10;
extern Ki_WorkSheetData WS_Osn2a_Line11;
extern Ki_WorkSheetData WS_Osn2a_Text1;
extern Ki_WorkSheetData WS_Osn2a_Text2;
extern Ki_WorkSheetData WS_Osn2a_Text3;
extern Ki_WorkSheetData WS_Osn2a_Text4;
extern Ki_WorkSheetData WS_Osn2a_Text5;
extern Ki_WorkSheetData WS_Osn2a_Text6;
extern Ki_WorkSheetData WS_Osn2a_Text7;
extern Ki_WorkSheetData WS_Osn2a_Text8;
extern Ki_WorkSheetData WS_DopLeft_Line1;
extern Ki_WorkSheetData WS_DopLeft_Line2;
extern Ki_WorkSheetData WS_DopLeft_Line3;
extern Ki_WorkSheetData WS_DopLeft_Line4;
extern Ki_WorkSheetData WS_DopLeft_Line5;
extern Ki_WorkSheetData WS_DopLeft_Line6;
extern Ki_WorkSheetData WS_DopLeft_Line7;
extern Ki_WorkSheetData WS_DopLeft_Line8;
extern Ki_WorkSheetData WS_DopLeft_Line9;
extern Ki_WorkSheetData WS_DopLeft_Line10;
extern Ki_WorkSheetData WS_DopLeft_Line11;
extern Ki_WorkSheetData WS_DopLeft_Line12;
extern Ki_WorkSheetData WS_DopLeft_Line13;
extern Ki_WorkSheetData WS_DopLeft_Line14;
extern Ki_WorkSheetData WS_DopLeft_Text1;
extern Ki_WorkSheetData WS_DopLeft_Text2;
extern Ki_WorkSheetData WS_DopLeft_Text3;
extern Ki_WorkSheetData WS_DopLeft_Text4;
extern Ki_WorkSheetData WS_DopLeft_Text5;
extern Ki_WorkSheetData WS_DopLeft_Text6;
extern Ki_WorkSheetData WS_DopLeft_Text7;
extern Ki_WorkSheetData WS_DopTop_Line1;
extern Ki_WorkSheetData WS_DopTop_Line2;
extern Ki_WorkSheetData WS_DopTop_Line3;
extern Ki_WorkSheetData WS_DopTop_Line4;
extern Ki_WorkSheetData WS_DopTop_Line5;
extern Ki_WorkSheetData WS_DopTop_Line6;
#else
extern Ki_WorkSheetData WS_Date;
extern Ki_WorkSheetData WS_Revision;
extern Ki_WorkSheetData WS_Licence;
......@@ -176,85 +213,6 @@ extern Ki_WorkSheetData WS_Segm4;
extern Ki_WorkSheetData WS_Segm5;
extern Ki_WorkSheetData WS_Segm6;
extern Ki_WorkSheetData WS_Segm7;
#if defined(KICAD_GOST)
extern Ki_WorkSheetData WS_Izm;
extern Ki_WorkSheetData WS_Razr;
extern Ki_WorkSheetData WS_Prov;
extern Ki_WorkSheetData WS_TKon;
extern Ki_WorkSheetData WS_NKon;
extern Ki_WorkSheetData WS_Utv;
extern Ki_WorkSheetData WS_List;
extern Ki_WorkSheetData WS_NDoc;
extern Ki_WorkSheetData WS_Podp;
extern Ki_WorkSheetData WS_Data;
extern Ki_WorkSheetData WS_Art;
extern Ki_WorkSheetData WS_Mass;
extern Ki_WorkSheetData WS_Msht;
extern Ki_WorkSheetData WS_List1;
extern Ki_WorkSheetData WS_List2;
extern Ki_WorkSheetData WS_Segm8;
extern Ki_WorkSheetData WS_Segm9;
extern Ki_WorkSheetData WS_Segm10;
extern Ki_WorkSheetData WS_Segm11;
extern Ki_WorkSheetData WS_Segm12;
extern Ki_WorkSheetData WS_Segm13;
extern Ki_WorkSheetData WS_Segm14;
extern Ki_WorkSheetData WS_Segm15;
extern Ki_WorkSheetData WS_Segm16;
extern Ki_WorkSheetData WS_Segm17;
extern Ki_WorkSheetData WS_Segm18;
extern Ki_WorkSheetData WS_Segm19;
extern Ki_WorkSheetData WS_Segm20;
extern Ki_WorkSheetData WS_Segm21;
extern Ki_WorkSheetData WS_Segm22;
extern Ki_WorkSheetData WS_Segm23;
extern Ki_WorkSheetData WS_Segm24;
extern Ki_WorkSheetData WS_Segm25;
extern Ki_WorkSheetData WS_CADRE_D;
extern Ki_WorkSheetData WS_Segm1_D;
extern Ki_WorkSheetData WS_Segm2_D;
extern Ki_WorkSheetData WS_Segm3_D;
extern Ki_WorkSheetData WS_Segm4_D;
extern Ki_WorkSheetData WS_Segm5_D;
extern Ki_WorkSheetData WS_Segm6_D;
extern Ki_WorkSheetData WS_Segm7_D;
extern Ki_WorkSheetData WS_Segm8_D;
extern Ki_WorkSheetData WS_Segm9_D;
extern Ki_WorkSheetData WS_Segm10_D;
extern Ki_WorkSheetData WS_Segm11_D;
extern Ki_WorkSheetData WS_Izm_D;
extern Ki_WorkSheetData WS_List_D;
extern Ki_WorkSheetData WS_NDoc_D;
extern Ki_WorkSheetData WS_Podp_D;
extern Ki_WorkSheetData WS_Date_D;
extern Ki_WorkSheetData WS_List1_D;
extern Ki_WorkSheetData WS_ListN_D;
extern Ki_WorkSheetData WS_Segm1_LU;
extern Ki_WorkSheetData WS_Segm2_LU;
extern Ki_WorkSheetData WS_Segm3_LU;
extern Ki_WorkSheetData WS_Segm4_LU;
extern Ki_WorkSheetData WS_Segm5_LU;
extern Ki_WorkSheetData WS_Segm6_LU;
extern Ki_WorkSheetData WS_Segm7_LU;
extern Ki_WorkSheetData WS_Segm8_LU;
extern Ki_WorkSheetData WS_Segm9_LU;
extern Ki_WorkSheetData WS_Segm10_LU;
extern Ki_WorkSheetData WS_Segm11_LU;
extern Ki_WorkSheetData WS_Segm12_LU;
extern Ki_WorkSheetData WS_Segm13_LU;
extern Ki_WorkSheetData WS_Podp1_LU;
extern Ki_WorkSheetData WS_Podp2_LU;
extern Ki_WorkSheetData WS_Podp3_LU;
extern Ki_WorkSheetData WS_Podp4_LU;
extern Ki_WorkSheetData WS_Podp5_LU;
extern Ki_WorkSheetData WS_Podp6_LU;
extern Ki_WorkSheetData WS_Podp7_LU;
extern Ki_WorkSheetData WS_Segm1_LT;
extern Ki_WorkSheetData WS_Segm2_LT;
extern Ki_WorkSheetData WS_Segm3_LT;
extern Ki_WorkSheetData WS_Segm4_LT;
extern Ki_WorkSheetData WS_Segm5_LT;
#endif
#endif // WORKSHEET_H_
File mode changed from 100755 to 100644
......@@ -924,7 +924,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
if( tmp.GetExt() != KiCadFootprintFileExtension )
{
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%'" ),
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) );
}
}
......
......@@ -1770,7 +1770,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
if( tmp.GetExt() != KiCadFootprintFileExtension )
{
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%'" ),
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ),
files[i].GetData(), aLibraryPath.GetData() ) );
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment