Commit ce9db78c authored by charras's avatar charras

Cleaned and optimized code about new hershey fonts and bold texts handling (see changelog)

parent b4c639a6
......@@ -4,6 +4,16 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-may-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++All:
Cleaned and optimized code about new hershey fonts and bold texts handling.
Bold texts use now the same font as normal texts.
Only the pen size used to draw them is bigger.
- The max pen size allowed depending on texts sizes is now tested
when loading boards and modules, and clamped if too large.
2009-may-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
......
......@@ -19,13 +19,56 @@
#define EDA_DRAWBASE
#include "hershey_fonts.h"
/* factor used to calculate actual size of shapes from hershey fonts (could be adjusted depending on the font name)
* Its value is choosen in order to have letters like M, P .. vertical size equal to the vertical char size parameter
* Of course some shapes can be bigger or smaller than the vertical char size parameter
*/
#define HERSHEY_SCALE_FACTOR 1/21.0
*/
#define HERSHEY_SCALE_FACTOR 1 / 21.0
double s_HerscheyScaleFactor = HERSHEY_SCALE_FACTOR;
/** Function GetPensizeForBold
* @return the "best" value for a pen size to draw/plot a bold text
* @param aTextSize = the char size (height or width)
*/
int GetPenSizeForBold( int aTextSize )
{
return wxRound( aTextSize / 5.0 );
}
/** Function Clamp_Text_PenSize
*As a rule, pen width should not be >1/4em, otherwise the character
* will be cluttered up in its own fatness
* so pen width max is aSize/4 for bold text, and aSize/6 for normal text
* The "best" pen width is aSize/5 for bold texts,
* so the clamp is consistant with bold option.
* @param aPenSize = the pen size to clamp
* @param aSize the char size (height or width)
* @param aBold = true if text accept bold pen size
* @return the max pen size allowed
*/
int Clamp_Text_PenSize( int aPenSize, int aSize, bool aBold )
{
int penSize = aPenSize;
double scale = aBold ? 4.0 : 6.0;
int maxWidth = wxRound( ABS( aSize ) / scale );
if( penSize > maxWidth )
penSize = maxWidth;
return penSize;
}
int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold )
{
int size = MIN( ABS( aSize.x ), ABS( aSize.y ) );
return Clamp_Text_PenSize(aPenSize, size, aBold);;
}
/* Functions to draw / plot a string.
* texts have only one line.
* They can be in italic.
......@@ -53,9 +96,15 @@ int NegableTextLength( const wxString& aText )
}
static const char* get_hershey_recipe( int AsciiCode, bool bold )
{
/* Function GetHersheyShapeDescription()
* return a pointer to the shape corresponding to unicode value AsciiCode
* Note we use the same font for Bold and Normal texts
* because kicad handles a variable pen size to do that
* that gives better results in XOR draw mode.
*/
static const char* GetHersheyShapeDescription( int AsciiCode )
{
#if defined(KICAD_CYRILLIC)
AsciiCode &= 0x7FF;
if( AsciiCode > 0x40F && AsciiCode < 0x450 ) // big small Cyr
......@@ -77,18 +126,11 @@ static const char* get_hershey_recipe( int AsciiCode, bool bold )
AsciiCode = 32; /* Clamp control chars */
AsciiCode -= 32;
if( bold )
{
return hershey_duplex[AsciiCode];
}
else
{
return hershey_simplex[AsciiCode];
}
return hershey_simplex[AsciiCode];
}
int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool italic, bool bold )
int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, bool aWidth )
{
int tally = 0;
int char_count = aText.length();
......@@ -102,7 +144,7 @@ int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool italic, bool
continue;
}
const char* ptcar = get_hershey_recipe( AsciiCode, bold );
const char* ptcar = GetHersheyShapeDescription( AsciiCode );
/* Get metrics */
int xsta = *ptcar++ - 'R';
int xsto = *ptcar++ - 'R';
......@@ -110,7 +152,7 @@ int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool italic, bool
}
/* Italic correction, 1/8em */
if( italic )
if( aItalic )
{
tally += wxRound( aXSize * 0.125 );
}
......@@ -149,35 +191,11 @@ static void DrawGraphicTextPline(
}
/* Helper function for texts with over bar
*/
static int overbar_position( int size_v, int thickness )
{
return wxRound( ((double) size_v * 26 * s_HerscheyScaleFactor ) + ((double) thickness * 1.5) );
}
static int clamp_text_pen_size( int width, int size_h, bool bold )
{
/* As a rule, pen width should not be >1/8em, otherwise the character
* will be cluttered up in its own fatness */
/* XXX @todo: Should be handled in the UI and gerber plotter too */
int maxWidth = wxRound( ABS( size_h ) / 8.0 );
if( width > maxWidth )
{
width = maxWidth;
}
/* Special rule for bold text: the width should be at least 1.42 times the
* quantum unit, otherwise the line pairs will be visible! */
if( bold )
{
int minWidth = wxRound( ABS( size_h ) * 1.42 * s_HerscheyScaleFactor + 0.5 );
if( width < minWidth )
{
width = minWidth;
}
}
return width;
return wxRound( ( (double) size_v * 26 * s_HerscheyScaleFactor ) + ( (double) thickness * 1.5 ) );
}
......@@ -192,10 +210,11 @@ static int clamp_text_pen_size( int width, int size_h, bool bold )
* @param aSize = text size (size.x or size.y can be < 0 for mirrored texts)
* @param aH_justify = horizontal justification (Left, center, right)
* @param aV_justify = vertical justification (bottom, center, top)
* @param aWidth = line width (pen width) (default = 0)
* @param aWidth = line width (pen width) (use default width if aWidth = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* Use a value min(aSize.x, aSize.y) / 5 for a bold text
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font
* @param aBold = true to use a bold font. Useful only with default width value (aWidth = 0)
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
......@@ -233,6 +252,9 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
size_h = aSize.x; /* PLEASE NOTE: H is for HORIZONTAL not for HEIGHT */
size_v = aSize.y;
if( aWidth == 0 && aBold ) // Use default values if aWidth == 0
aWidth = GetPenSizeForBold( MIN( aSize.x, aSize.y ) );
if( aWidth < 0 )
{
aWidth = -aWidth;
......@@ -241,15 +263,13 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
if( size_h < 0 ) // text is mirrored using size.x < 0 (mirror / Y axis)
italic_reverse = true;
aWidth = clamp_text_pen_size( aWidth, size_h, aBold );
char_count = NegableTextLength( aText );
if( char_count == 0 )
return;
current_char_pos = aPos;
dx = ReturnGraphicTextWidth( aText, size_h, aItalic, aBold );
dx = ReturnGraphicTextWidth( aText, size_h, aItalic, aWidth );
dy = size_v;
/* Do not draw the text if out of draw area! */
......@@ -381,7 +401,7 @@ void DrawGraphicText( WinEDA_DrawPanel* aPanel,
AsciiCode = aText.GetChar( ptr + overbars );
const char* ptcar = get_hershey_recipe( AsciiCode, aBold );
const char* ptcar = GetHersheyShapeDescription( AsciiCode );
/* Get metrics */
int xsta = *ptcar++ - 'R';
int xsto = *ptcar++ - 'R';
......@@ -468,7 +488,7 @@ static bool s_Plotbegin; // Flag to init plot
* The call back function
*/
/****************************************************************/
static void s_Callback_plot( int x0, int y0, int xf, int yf )
static void s_Callback_plot( int x0, int y0, int xf, int yf )
/****************************************************************/
{
static wxPoint PenLastPos;
......@@ -514,8 +534,9 @@ static void s_Callback_plot( int x0, int y0, int xf, int yf )
* @param aV_justify = vertical justification (bottom, center, top)
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* Use a value min(aSize.x, aSize.y) / 5 for a bold text
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font
* @param aBold = true to use a bold font Useful only with default width value (aWidth = 0)
*/
/******************************************************************************************/
void PlotGraphicText( int aFormat_plot,
......@@ -531,14 +552,8 @@ void PlotGraphicText( int aFormat_plot,
bool aBold )
/******************************************************************************************/
{
if( aWidth > 0 )
{
aWidth = clamp_text_pen_size( aWidth, aSize.x, aBold );
}
else
{
aWidth = -clamp_text_pen_size( -aWidth, aSize.x, aBold );
}
if( aWidth == 0 && aBold ) // Use default values if aWidth == 0
aWidth = GetPenSizeForBold( MIN( aSize.x, aSize.y ) );
// Initialise the actual function used to plot lines:
switch( aFormat_plot )
......@@ -568,7 +583,8 @@ void PlotGraphicText( int aFormat_plot,
DrawGraphicText( NULL, NULL, aPos, aColor, aText,
aOrient, aSize,
aH_justify, aV_justify,
aWidth, aItalic, aBold,
aWidth, aItalic,
aBold,
s_Callback_plot );
/* end text : pen UP ,no move */
......
......@@ -325,11 +325,7 @@ void GRSetBrush( wxDC* DC, int Color, int fill )
if( ForceBlackPen )
Color = BLACK;
wxBrush DrawBrush;
DrawBrush.SetColour(
ColorRefs[Color].m_Red,
ColorRefs[Color].m_Green,
ColorRefs[Color].m_Blue
);
DrawBrush.SetColour( MakeColour( Color ) );
if( fill )
DrawBrush.SetStyle( wxSOLID );
......
......@@ -19,901 +19,901 @@
Ki_WorkSheetData WS_Date =
{
WS_DATE,
&WS_Licence,
BLOCK_DATE_X, BLOCK_DATE_Y,
0,0,
WS_DATE,
&WS_Licence,
BLOCK_DATE_X, BLOCK_DATE_Y,
0, 0,
#if defined(KICAD_GOST)
NULL, NULL
NULL, NULL
#else
wxT("Date: "), NULL
wxT( "Date: " ),NULL
#endif
};
Ki_WorkSheetData WS_Licence =
{
WS_KICAD_VERSION,
&WS_Revision,
BLOCK_KICAD_VERSION_X, BLOCK_KICAD_VERSION_Y,
0,0,
NULL, NULL
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,
WS_REV,
&WS_SizeSheet,
#if defined(KICAD_GOST)
STAMP_X_185 - 30, STAMP_Y_30 + 90,
STAMP_X_185 - 30,STAMP_Y_30 + 90,
#else
BLOCK_REV_X, BLOCK_REV_Y,
BLOCK_REV_X, BLOCK_REV_Y,
#endif
0,0,
0, 0,
#if defined(KICAD_GOST)
NULL, NULL
NULL, NULL
#else
wxT("Rev: "), NULL
wxT( "Rev: " ), NULL
#endif
};
Ki_WorkSheetData WS_SizeSheet =
{
WS_SIZESHEET,
WS_SIZESHEET,
#if defined(KICAD_GOST)
&WS_Title,
BLOCK_SIZE_SHEET_X, BLOCK_SIZE_SHEET_Y,
0,0,
NULL, NULL
&WS_Title,
BLOCK_SIZE_SHEET_X,BLOCK_SIZE_SHEET_Y,
0, 0,
NULL, NULL
};
#else
&WS_IdentSheet,
BLOCK_SIZE_SHEET_X, BLOCK_SIZE_SHEET_Y,
0,0,
wxT("Size: "),NULL
};
&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
WS_IDENTSHEET,
&WS_Title,
BLOCK_ID_SHEET_X,BLOCK_ID_SHEET_Y,
0, 0,
wxT( "Id: " ), NULL
};
#endif
Ki_WorkSheetData WS_Title =
{
WS_TITLE,
&WS_SheetFilename,
BLOCK_TITLE_X, BLOCK_TITLE_Y,
0,0,
WS_TITLE,
&WS_SheetFilename,
BLOCK_TITLE_X, BLOCK_TITLE_Y,
0, 0,
#if defined(KICAD_GOST)
NULL, NULL
NULL, NULL
#else
wxT("Title: "),NULL
wxT( "Title: " ), NULL
#endif
};
Ki_WorkSheetData WS_SheetFilename =
{
WS_FILENAME,
&WS_FullSheetName,
BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
0,0,
wxT("File: "),NULL
WS_FILENAME,
&WS_FullSheetName,
BLOCK_FILENAME_X, BLOCK_FILENAME_Y,
0, 0,
wxT( "File: " ), NULL
};
Ki_WorkSheetData WS_FullSheetName =
{
WS_FULLSHEETNAME,
&WS_Company,
BLOCK_FULLSHEETNAME_X, BLOCK_FULLSHEETNAME_Y,
0,0,
wxT("Sheet: "),NULL
WS_FULLSHEETNAME,
&WS_Company,
BLOCK_FULLSHEETNAME_X,BLOCK_FULLSHEETNAME_Y,
0, 0,
wxT( "Sheet: " ), NULL
};
Ki_WorkSheetData WS_Company =
{
WS_COMPANY_NAME,
&WS_Comment1,
BLOCK_COMMENT_X, BLOCK_COMPANY_Y,
0,0,
NULL,NULL
WS_COMPANY_NAME,
&WS_Comment1,
BLOCK_COMMENT_X,BLOCK_COMPANY_Y,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Comment1 =
{
WS_COMMENT1,
&WS_Comment2,
WS_COMMENT1,
&WS_Comment2,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X, BLOCK_COMMENT1_Y,
0,0,
BLOCK_COMMENT_X,BLOCK_COMMENT1_Y,
0, 0,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Comment2 =
{
WS_COMMENT2,
&WS_Comment3,
WS_COMMENT2,
&WS_Comment3,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X, BLOCK_COMMENT2_Y,
0,0,
BLOCK_COMMENT_X,BLOCK_COMMENT2_Y,
0, 0,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Comment3 =
{
WS_COMMENT3,
&WS_Comment4,
WS_COMMENT3,
&WS_Comment4,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X, BLOCK_COMMENT3_Y,
0,0,
BLOCK_COMMENT_X,BLOCK_COMMENT3_Y,
0, 0,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Comment4 =
{
WS_COMMENT4,
&WS_MostLeftLine,
WS_COMMENT4,
&WS_MostLeftLine,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
0,0,
BLOCK_COMMENT_X, BLOCK_COMMENT4_Y,
0, 0,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_MostLeftLine = /* segment vertical gauche */
{
WS_LEFT_SEGMENT,
WS_LEFT_SEGMENT,
#if defined(KICAD_GOST)
&WS_MostUpperLine,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
&WS_MostUpperLine,
STAMP_OX, STAMP_OY,
STAMP_OX, 0,
#else
&WS_SeparatorLine,
BLOCK_OX, SIZETEXT * 16,
BLOCK_OX, 0,
NULL,NULL
&WS_SeparatorLine,
BLOCK_OX, SIZETEXT * 16,
BLOCK_OX, 0,
NULL, NULL
};
Ki_WorkSheetData WS_SeparatorLine = /* horizontal segment between filename and comments*/
Ki_WorkSheetData WS_SeparatorLine = /* horizontal segment between filename and comments*/
{
WS_SEGMENT,
&WS_MostUpperLine,
BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
0, VARIABLE_BLOCK_START_POSITION,
WS_SEGMENT,
&WS_MostUpperLine,
BLOCK_OX, VARIABLE_BLOCK_START_POSITION,
0, VARIABLE_BLOCK_START_POSITION,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_MostUpperLine = /* segment horizontal superieur */
Ki_WorkSheetData WS_MostUpperLine = /* segment horizontal superieur */
{
WS_UPPER_SEGMENT,
&WS_Segm3,
WS_UPPER_SEGMENT,
&WS_Segm3,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_OY,
0, STAMP_OY,
STAMP_OX, STAMP_OY,
0, STAMP_OY,
#else
BLOCK_OX, SIZETEXT * 16,
0, SIZETEXT * 16,
BLOCK_OX, SIZETEXT * 16,
0, SIZETEXT * 16,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Segm3 = /* segment horizontal au dessus de NAME COMPANY */
Ki_WorkSheetData WS_Segm3 = /* segment horizontal au dessus de NAME COMPANY */
{
WS_SEGMENT,
&WS_Segm4,
WS_SEGMENT,
&WS_Segm4,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_50,
STAMP_X_120, STAMP_Y_50,
STAMP_OX, STAMP_Y_50,
STAMP_X_120,STAMP_Y_50,
#else
BLOCK_OX, SIZETEXT * 6,
0, SIZETEXT * 6,
BLOCK_OX, SIZETEXT * 6,
0, SIZETEXT * 6,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Segm4 = /* segment vertical a gauche de SHEET et REV */
Ki_WorkSheetData WS_Segm4 = /* segment vertical a gauche de SHEET et REV */
{
WS_SEGMENT,
&WS_Segm5,
WS_SEGMENT,
&WS_Segm5,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_45,
STAMP_X_120, STAMP_Y_45,
STAMP_OX, STAMP_Y_45,
STAMP_X_120, STAMP_Y_45,
#else
BLOCK_REV_X + SIZETEXT, SIZETEXT * 4,
BLOCK_REV_X + SIZETEXT, 0,
BLOCK_REV_X + SIZETEXT,SIZETEXT * 4,
BLOCK_REV_X + SIZETEXT,0,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Segm5 = /* 1er segment horizontal */
Ki_WorkSheetData WS_Segm5 = /* 1er segment horizontal */
{
WS_SEGMENT,
&WS_Segm6,
WS_SEGMENT,
&WS_Segm6,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_40,
0, STAMP_Y_40,
STAMP_OX, STAMP_Y_40,
0, STAMP_Y_40,
#else
BLOCK_OX, SIZETEXT * 2,
0, SIZETEXT * 2,
BLOCK_OX, SIZETEXT * 2,
0, SIZETEXT * 2,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Segm6 = /* 2eme segment horizontal */
Ki_WorkSheetData WS_Segm6 = /* 2eme segment horizontal */
{
WS_SEGMENT,
&WS_Segm7,
WS_SEGMENT,
&WS_Segm7,
#if defined(KICAD_GOST)
STAMP_OX, STAMP_Y_35,
STAMP_X_120, STAMP_Y_35,
STAMP_OX, STAMP_Y_35,
STAMP_X_120,STAMP_Y_35,
#else
BLOCK_OX, SIZETEXT * 4,
0, SIZETEXT * 4,
BLOCK_OX, SIZETEXT * 4,
0, SIZETEXT * 4,
#endif
NULL,NULL
NULL, NULL
};
Ki_WorkSheetData WS_Segm7 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm7 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
WS_SEGMENT,
#if defined(KICAD_GOST)
&WS_Segm8,
STAMP_X_50, STAMP_Y_35,
0, STAMP_Y_35,
NULL,NULL
&WS_Segm8,
STAMP_X_50,STAMP_Y_35,
0, STAMP_Y_35,
NULL, NULL
};
Ki_WorkSheetData WS_Segm8 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm8 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm9,
STAMP_OX, STAMP_Y_30,
STAMP_X_120, STAMP_Y_30,
NULL,NULL
WS_SEGMENT,
&WS_Segm9,
STAMP_OX, STAMP_Y_30,
STAMP_X_120,STAMP_Y_30,
NULL, NULL
};
Ki_WorkSheetData WS_Segm9 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm9 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm10,
STAMP_OX, STAMP_Y_25,
STAMP_X_120, STAMP_Y_25,
NULL,NULL
WS_SEGMENT,
&WS_Segm10,
STAMP_OX, STAMP_Y_25,
STAMP_X_120,STAMP_Y_25,
NULL, NULL
};
Ki_WorkSheetData WS_Segm10 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm10 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm11,
STAMP_OX, STAMP_Y_20,
STAMP_X_120, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Segm11,
STAMP_OX, STAMP_Y_20,
STAMP_X_120,STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Segm11 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm11 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm12,
STAMP_X_50, STAMP_Y_20,
0, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Segm12,
STAMP_X_50,STAMP_Y_20,
0, STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Segm12 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm12 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm13,
STAMP_OX, STAMP_Y_15,
0, STAMP_Y_15,
NULL,NULL
WS_SEGMENT,
&WS_Segm13,
STAMP_OX, STAMP_Y_15,
0, STAMP_Y_15,
NULL, NULL
};
Ki_WorkSheetData WS_Segm13 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm13 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm14,
STAMP_OX, STAMP_Y_10,
STAMP_X_120, STAMP_Y_10,
NULL,NULL
WS_SEGMENT,
&WS_Segm14,
STAMP_OX, STAMP_Y_10,
STAMP_X_120,STAMP_Y_10,
NULL, NULL
};
Ki_WorkSheetData WS_Segm14 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm14 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm15,
STAMP_OX, STAMP_Y_5,
STAMP_X_120, STAMP_Y_5,
NULL,NULL
WS_SEGMENT,
&WS_Segm15,
STAMP_OX, STAMP_Y_5,
STAMP_X_120,STAMP_Y_5,
NULL, NULL
};
Ki_WorkSheetData WS_Segm15 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm15 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm16,
STAMP_X_178, STAMP_OY,
STAMP_X_178, STAMP_Y_30,
NULL,NULL
WS_SEGMENT,
&WS_Segm16,
STAMP_X_178,STAMP_OY,
STAMP_X_178,STAMP_Y_30,
NULL, NULL
};
Ki_WorkSheetData WS_Segm16 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm16 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm17,
STAMP_X_168, STAMP_OY,
STAMP_X_168, 0,
NULL,NULL
WS_SEGMENT,
&WS_Segm17,
STAMP_X_168,STAMP_OY,
STAMP_X_168,0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm17 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm17 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm18,
STAMP_X_145, STAMP_OY,
STAMP_X_145, 0,
NULL,NULL
WS_SEGMENT,
&WS_Segm18,
STAMP_X_145,STAMP_OY,
STAMP_X_145,0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm18 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm18 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm19,
STAMP_X_130, STAMP_OY,
STAMP_X_130, 0,
NULL,NULL
WS_SEGMENT,
&WS_Segm19,
STAMP_X_130,STAMP_OY,
STAMP_X_130,0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm19 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm19 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm20,
STAMP_X_120, STAMP_OY,
STAMP_X_120, 0,
NULL,NULL
WS_SEGMENT,
&WS_Segm20,
STAMP_X_120,STAMP_OY,
STAMP_X_120,0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm20 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm20 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm21,
STAMP_X_50, STAMP_Y_40,
STAMP_X_50, 0,
NULL,NULL
WS_SEGMENT,
&WS_Segm21,
STAMP_X_50,STAMP_Y_40,
STAMP_X_50,0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm21 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm21 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm22,
STAMP_X_45, STAMP_Y_35,
STAMP_X_45, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Segm22,
STAMP_X_45,STAMP_Y_35,
STAMP_X_45,STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Segm22 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm22 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm23,
STAMP_X_40, STAMP_Y_35,
STAMP_X_40, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Segm23,
STAMP_X_40,STAMP_Y_35,
STAMP_X_40,STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Segm23 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm23 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm24,
STAMP_X_35, STAMP_Y_40,
STAMP_X_35, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Segm24,
STAMP_X_35,STAMP_Y_40,
STAMP_X_35,STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Segm24 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm24 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Segm25,
STAMP_X_30, STAMP_Y_20,
STAMP_X_30, STAMP_Y_15,
NULL,NULL
WS_SEGMENT,
&WS_Segm25,
STAMP_X_30,STAMP_Y_20,
STAMP_X_30,STAMP_Y_15,
NULL, NULL
};
Ki_WorkSheetData WS_Segm25 = /* segment vertical apres SIZE */
Ki_WorkSheetData WS_Segm25 = /* segment vertical apres SIZE */
{
WS_SEGMENT,
&WS_Izm,
STAMP_X_18, STAMP_Y_40,
STAMP_X_18, STAMP_Y_20,
NULL,NULL
WS_SEGMENT,
&WS_Izm,
STAMP_X_18,STAMP_Y_40,
STAMP_X_18,STAMP_Y_20,
NULL, NULL
};
Ki_WorkSheetData WS_Izm =
{
WS_PODPIS,
&WS_Razr,
STAMP_X_185 - 30,STAMP_Y_30 + 90,
0,0,
wxT("Изм."), NULL
WS_PODPIS,
&WS_Razr,
STAMP_X_185 - 30,STAMP_Y_30 + 90,
0, 0,
wxT( "Изм." ),NULL
};
Ki_WorkSheetData WS_Razr =
{
WS_PODPIS,
&WS_Prov,
STAMP_X_185 - 30,STAMP_Y_25 + 90,
0,0,
wxT("Разраб."), NULL
WS_PODPIS,
&WS_Prov,
STAMP_X_185 - 30, STAMP_Y_25 + 90,
0, 0,
wxT( "Разраб." ),NULL
};
Ki_WorkSheetData WS_Prov =
{
WS_PODPIS,
&WS_TKon,
STAMP_X_185 - 30,STAMP_Y_20 + 90,
0,0,
wxT("Пров."), NULL
WS_PODPIS,
&WS_TKon,
STAMP_X_185 - 30, STAMP_Y_20 + 90,
0, 0,
wxT( "Пров." ),NULL
};
Ki_WorkSheetData WS_TKon =
{
WS_PODPIS,
&WS_NKon,
STAMP_X_185 - 30,STAMP_Y_15 + 90,
0,0,
wxT("Т.контр."), NULL
WS_PODPIS,
&WS_NKon,
STAMP_X_185 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Т.контр." ),NULL
};
Ki_WorkSheetData WS_NKon =
{
WS_PODPIS,
&WS_Utv,
STAMP_X_185 - 30,STAMP_Y_5 + 90,
0,0,
wxT("Н.контр."), NULL
WS_PODPIS,
&WS_Utv,
STAMP_X_185 - 30, STAMP_Y_5 + 90,
0, 0,
wxT( "Н.контр." ),NULL
};
Ki_WorkSheetData WS_Utv =
{
WS_PODPIS,
&WS_List,
STAMP_X_185 - 30,STAMP_Y_0 + 90,
0,0,
wxT("Утв."), NULL
WS_PODPIS,
&WS_List,
STAMP_X_185 - 30,STAMP_Y_0 + 90,
0, 0,
wxT( "Утв." ),NULL
};
Ki_WorkSheetData WS_List =
{
WS_PODPIS,
&WS_NDoc,
STAMP_X_178 - 30,STAMP_Y_30 + 90,
0,0,
wxT("Лист"), NULL
WS_PODPIS,
&WS_NDoc,
STAMP_X_178 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Лист" ),NULL
};
Ki_WorkSheetData WS_NDoc =
{
WS_PODPIS,
&WS_Podp,
STAMP_X_168 - 30,STAMP_Y_30 + 90,
0,0,
wxT("N докум."), NULL
WS_PODPIS,
&WS_Podp,
STAMP_X_168 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "N докум." ),NULL
};
Ki_WorkSheetData WS_Podp =
{
WS_PODPIS,
&WS_Data,
STAMP_X_145 - 30,STAMP_Y_30 + 90,
0,0,
wxT("Подп."), NULL
WS_PODPIS,
&WS_Data,
STAMP_X_145 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Подп." ),NULL
};
Ki_WorkSheetData WS_Data =
{
WS_PODPIS,
&WS_Art,
STAMP_X_130 - 30,STAMP_Y_30 + 90,
0,0,
wxT("Дата"), NULL
WS_PODPIS,
&WS_Art,
STAMP_X_130 - 30, STAMP_Y_30 + 90,
0, 0,
wxT( "Дата" ),NULL
};
Ki_WorkSheetData WS_Art =
{
WS_PODPIS,
&WS_Mass,
STAMP_X_50 - 30,STAMP_Y_35 + 90,
0,0,
wxT("Арт."), NULL
WS_PODPIS,
&WS_Mass,
STAMP_X_50 - 30, STAMP_Y_35 + 90,
0, 0,
wxT( "Арт." ),NULL
};
Ki_WorkSheetData WS_Mass =
{
WS_PODPIS,
&WS_Msht,
STAMP_X_35 - 30,STAMP_Y_35 + 90,
0,0,
wxT("Масса"), NULL
WS_PODPIS,
&WS_Msht,
STAMP_X_35 - 30, STAMP_Y_35 + 90,
0, 0,
wxT( "Масса" ),NULL
};
Ki_WorkSheetData WS_Msht =
{
WS_PODPIS,
&WS_List1,
STAMP_X_18 - 30,STAMP_Y_35 + 90,
0,0,
wxT("Масштаб"), NULL
WS_PODPIS,
&WS_List1,
STAMP_X_18 - 30, STAMP_Y_35 + 90,
0, 0,
wxT( "Масштаб" ),NULL
};
Ki_WorkSheetData WS_List1 =
{
WS_IDENTSHEET,
&WS_List2,
STAMP_X_50 - 30,STAMP_Y_15 + 90,
0,0,
wxT("Лист "), NULL
WS_IDENTSHEET,
&WS_List2,
STAMP_X_50 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Лист " ),NULL
};
Ki_WorkSheetData WS_List2 =
{
WS_SHEETS,
NULL,
STAMP_X_30 - 30,STAMP_Y_15 + 90,
0,0,
wxT("Листов "), NULL
WS_SHEETS,
NULL,
STAMP_X_30 - 30, STAMP_Y_15 + 90,
0, 0,
wxT( "Листов " ),NULL
};
Ki_WorkSheetData WS_CADRE_D =
{
WS_CADRE,
&WS_Segm1_D,
STAMP_OX, 0,
0,0,
NULL, NULL
WS_CADRE,
&WS_Segm1_D,
STAMP_OX, 0,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm1_D =
{
WS_LEFT_SEGMENT_D,
&WS_Segm2_D,
STAMP_OX, STAMP_Y_15,
STAMP_OX, 0,
NULL, NULL
WS_LEFT_SEGMENT_D,
&WS_Segm2_D,
STAMP_OX, STAMP_Y_15,
STAMP_OX, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm2_D =
{
WS_SEGMENT_D,
&WS_Segm3_D,
STAMP_X_178, STAMP_Y_15,
STAMP_X_178, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm3_D,
STAMP_X_178, STAMP_Y_15,
STAMP_X_178, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm3_D =
{
WS_SEGMENT_D,
&WS_Segm4_D,
STAMP_X_168, STAMP_Y_15,
STAMP_X_168, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm4_D,
STAMP_X_168, STAMP_Y_15,
STAMP_X_168, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm4_D =
{
WS_SEGMENT_D,
&WS_Segm5_D,
STAMP_X_145, STAMP_Y_15,
STAMP_X_145, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm5_D,
STAMP_X_145, STAMP_Y_15,
STAMP_X_145, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm5_D =
{
WS_SEGMENT_D,
&WS_Segm6_D,
STAMP_X_130, STAMP_Y_15,
STAMP_X_130, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm6_D,
STAMP_X_130, STAMP_Y_15,
STAMP_X_130, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm6_D =
{
WS_SEGMENT_D,
&WS_Segm7_D,
STAMP_X_120, STAMP_Y_15,
STAMP_X_120, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm7_D,
STAMP_X_120, STAMP_Y_15,
STAMP_X_120, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm7_D =
{
WS_SEGMENT_D,
&WS_Segm8_D,
STAMP_X_10, STAMP_Y_15,
STAMP_X_10, 0,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm8_D,
STAMP_X_10, STAMP_Y_15,
STAMP_X_10, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm8_D =
{
WS_SEGMENT_D,
&WS_Segm9_D,
STAMP_X_185, STAMP_Y_10,
STAMP_X_120, STAMP_Y_10,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm9_D,
STAMP_X_185, STAMP_Y_10,
STAMP_X_120, STAMP_Y_10,
NULL, NULL
};
Ki_WorkSheetData WS_Segm9_D =
{
WS_SEGMENT_D,
&WS_Segm10_D,
STAMP_X_185, STAMP_Y_5,
STAMP_X_120, STAMP_Y_5,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm10_D,
STAMP_X_185, STAMP_Y_5,
STAMP_X_120, STAMP_Y_5,
NULL, NULL
};
Ki_WorkSheetData WS_Segm10_D =
{
WS_SEGMENT_D,
&WS_Segm11_D,
STAMP_X_10, STAMP_Y_8,
0, STAMP_Y_8,
NULL, NULL
WS_SEGMENT_D,
&WS_Segm11_D,
STAMP_X_10, STAMP_Y_8,
0, STAMP_Y_8,
NULL, NULL
};
Ki_WorkSheetData WS_Segm11_D =
{
WS_SEGMENT_D,
&WS_Izm_D,
STAMP_X_185, STAMP_Y_15,
0, STAMP_Y_15,
NULL, NULL
WS_SEGMENT_D,
&WS_Izm_D,
STAMP_X_185, STAMP_Y_15,
0, STAMP_Y_15,
NULL, NULL
};
Ki_WorkSheetData WS_Izm_D =
{
WS_PODPIS_D,
&WS_List_D,
STAMP_X_185 - 30, STAMP_Y_0 + 90,
0, 0,
wxT("Изм."), NULL
WS_PODPIS_D,
&WS_List_D,
STAMP_X_185 - 30,STAMP_Y_0 + 90,
0, 0,
wxT( "Изм." ),NULL
};
Ki_WorkSheetData WS_List_D =
{
WS_PODPIS_D,
&WS_NDoc_D,
STAMP_X_178 - 30, STAMP_Y_0 + 90,
0, 0,
wxT("Лист"), NULL
WS_PODPIS_D,
&WS_NDoc_D,
STAMP_X_178 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Лист" ),NULL
};
Ki_WorkSheetData WS_NDoc_D =
{
WS_PODPIS_D,
&WS_Podp_D,
STAMP_X_168 - 30, STAMP_Y_0 + 90,
0, 0,
wxT("N докум."), NULL
WS_PODPIS_D,
&WS_Podp_D,
STAMP_X_168 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "N докум." ),NULL
};
Ki_WorkSheetData WS_Podp_D =
{
WS_PODPIS_D,
&WS_Date_D,
STAMP_X_145 - 30, STAMP_Y_0 + 90,
0, 0,
wxT("Подп."), NULL
WS_PODPIS_D,
&WS_Date_D,
STAMP_X_145 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Подп." ),NULL
};
Ki_WorkSheetData WS_Date_D =
{
WS_PODPIS_D,
&WS_List1_D,
STAMP_X_130 - 30, STAMP_Y_0 + 90,
0, 0,
wxT("Дата"), NULL
WS_PODPIS_D,
&WS_List1_D,
STAMP_X_130 - 30, STAMP_Y_0 + 90,
0, 0,
wxT( "Дата" ),NULL
};
Ki_WorkSheetData WS_List1_D =
{
WS_PODPIS_D,
&WS_ListN_D,
STAMP_X_10 - 30, STAMP_Y_8 + 90,
0, 0,
wxT("Лист"), NULL
WS_PODPIS_D,
&WS_ListN_D,
STAMP_X_10 - 30, STAMP_Y_8 + 90,
0, 0,
wxT( "Лист" ),NULL
};
Ki_WorkSheetData WS_ListN_D =
{
WS_IDENTSHEET_D,
NULL,
STAMP_Y_0 + 196, STAMP_Y_0 + 90,
0, 0,
NULL, NULL
WS_IDENTSHEET_D,
NULL,
STAMP_Y_0 + 196,STAMP_Y_0 + 90,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm1_LU =
{
WS_SEGMENT_LU,
&WS_Segm2_LU,
STAMP_12, STAMP_145,
STAMP_12, 0,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm2_LU,
STAMP_12, STAMP_145,
STAMP_12, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm2_LU =
{
WS_SEGMENT_LU,
&WS_Segm3_LU,
STAMP_7, STAMP_145,
STAMP_7, 0,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm3_LU,
STAMP_7, STAMP_145,
STAMP_7, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm3_LU =
{
WS_SEGMENT_LU,
&WS_Segm4_LU,
STAMP_12, STAMP_145,
0, STAMP_145,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm4_LU,
STAMP_12, STAMP_145,
0, STAMP_145,
NULL, NULL
};
Ki_WorkSheetData WS_Segm4_LU =
{
WS_SEGMENT_LU,
&WS_Segm5_LU,
STAMP_12, STAMP_110,
0, STAMP_110,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm5_LU,
STAMP_12, STAMP_110,
0, STAMP_110,
NULL, NULL
};
Ki_WorkSheetData WS_Segm5_LU =
{
WS_SEGMENT_LU,
&WS_Segm6_LU,
STAMP_12, STAMP_85,
0, STAMP_85,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm6_LU,
STAMP_12, STAMP_85,
0, STAMP_85,
NULL, NULL
};
Ki_WorkSheetData WS_Segm6_LU =
{
WS_SEGMENT_LU,
&WS_Segm7_LU,
STAMP_12, STAMP_60,
0, STAMP_60,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm7_LU,
STAMP_12, STAMP_60,
0, STAMP_60,
NULL, NULL
};
Ki_WorkSheetData WS_Segm7_LU =
{
WS_SEGMENT_LU,
&WS_Segm8_LU,
STAMP_12, STAMP_25,
0, STAMP_25,
NULL, NULL
WS_SEGMENT_LU,
&WS_Segm8_LU,
STAMP_12, STAMP_25,
0, STAMP_25,
NULL, NULL
};
Ki_WorkSheetData WS_Segm8_LU =
{
WS_SEGMENT_LU,
&WS_Podp1_LU,
STAMP_12, 0,
0, 0,
NULL, NULL
WS_SEGMENT_LU,
&WS_Podp1_LU,
STAMP_12, 0,
0, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Podp1_LU =
{
WS_PODPIS_LU,
&WS_Podp2_LU,
STAMP_7 + 90, 0 + 492,
0, 0,
wxT("Инв.N подл."), NULL
WS_PODPIS_LU,
&WS_Podp2_LU,
STAMP_7 + 90, 0 + 492,
0, 0,
wxT( "Инв.N подл." ),NULL
};
Ki_WorkSheetData WS_Podp2_LU =
{
WS_PODPIS_LU,
&WS_Podp3_LU,
STAMP_7 + 90, STAMP_25 + 688,
0, 0,
wxT("Подп. и дата"), NULL
WS_PODPIS_LU,
&WS_Podp3_LU,
STAMP_7 + 90, STAMP_25 + 688,
0, 0,
wxT( "Подп. и дата" ),NULL
};
Ki_WorkSheetData WS_Podp3_LU =
{
WS_PODPIS_LU,
&WS_Podp4_LU,
STAMP_7 + 90, STAMP_60 + 492,
0, 0,
wxT("Взам.инв.N"), NULL
WS_PODPIS_LU,
&WS_Podp4_LU,
STAMP_7 + 90, STAMP_60 + 492,
0, 0,
wxT( "Взам.инв.N" ),NULL
};
Ki_WorkSheetData WS_Podp4_LU =
{
WS_PODPIS_LU,
&WS_Podp5_LU,
STAMP_7 + 90, STAMP_85 + 492,
0, 0,
wxT("Инв.N дубл."), NULL
WS_PODPIS_LU,
&WS_Podp5_LU,
STAMP_7 + 90, STAMP_85 + 492,
0, 0,
wxT( "Инв.N дубл." ),NULL
};
Ki_WorkSheetData WS_Podp5_LU =
{
WS_PODPIS_LU,
NULL,
STAMP_7 + 90, STAMP_110 + 688,
0, 0,
wxT("Подп. и дата"), NULL
WS_PODPIS_LU,
NULL,
STAMP_7 + 90, STAMP_110 + 688,
0, 0,
wxT( "Подп. и дата" ),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
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 =
{
WS_SEGMENT_LT,
&WS_Segm3_LT,
STAMP_X_137, STAMP_Y_14,
STAMP_X_137, 0,
NULL, NULL
WS_SEGMENT_LT,
&WS_Segm3_LT,
STAMP_X_137, STAMP_Y_14,
STAMP_X_137, 0,
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
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
WS_SEGMENT_LT,
&WS_Segm5_LT,
STAMP_X_84, STAMP_Y_14,
STAMP_X_84, 0,
NULL, NULL
};
Ki_WorkSheetData WS_Segm5_LT =
{
WS_SEGMENT_LT,
NULL,
STAMP_X_70, STAMP_Y_14,
STAMP_X_70, 0,
WS_SEGMENT_LT,
NULL,
STAMP_X_70, STAMP_Y_14,
STAMP_X_70, 0,
#else
NULL,
BLOCK_OX - (SIZETEXT * 11), SIZETEXT * 4,
BLOCK_OX - (SIZETEXT * 11), SIZETEXT * 2,
NULL,
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 4,
BLOCK_OX - (SIZETEXT * 11),SIZETEXT * 2,
#endif
NULL, NULL
NULL, NULL
};
/*************************************************************************************/
......@@ -926,26 +926,26 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
if( !m_Draw_Sheet_Ref )
return;
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
int ii, jj, xg, yg, ipas, gxpas, gypas;
wxPoint pos;
int refx, refy;
EDA_Colors Color;
wxString Line;
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
int ii, jj, xg, yg, ipas, gxpas, gypas;
wxPoint pos;
int refx, refy;
EDA_Colors Color;
wxString Line;
Ki_WorkSheetData* WsItem;
int scale = m_InternalUnits / 1000;
wxSize size( SIZETEXT * scale, SIZETEXT * scale );
wxSize size_ref( SIZETEXT_REF * scale, SIZETEXT_REF * scale );
int scale = m_InternalUnits / 1000;
wxSize size( SIZETEXT * scale, SIZETEXT * scale );
wxSize size_ref( SIZETEXT_REF * scale, SIZETEXT_REF * scale );
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
Color = RED;
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) );
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: NULL Sheet" ) );
return;
}
......@@ -978,6 +978,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
refx += GRID_REF_W; refy += GRID_REF_W;
xg -= GRID_REF_W; yg -= GRID_REF_W;
}
#endif
/* trace des reperes */
......@@ -986,44 +987,49 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
refy = Sheet->m_Size.y - Sheet->m_BottomMargin; /* Lower left corner */
for( WsItem = &WS_Segm1_LU; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx)* scale;
pos.y = (refy - WsItem->m_Posy)* scale;
pos.x = (refx - WsItem->m_Posx) * scale;
pos.y = (refy - WsItem->m_Posy) * scale;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_CADRE:
case WS_CADRE:
break;
case WS_PODPIS_LU:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
DrawGraphicText(DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_VERT, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,width,
false, false, false);
case WS_PODPIS_LU:
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_VERT, size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, width,
false, false );
break;
case WS_SEGMENT_LU:
case WS_SEGMENT_LU:
xg = Sheet->m_LeftMargin - WsItem->m_Endx;
yg = Sheet->m_Size.y - Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine(&DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
refy = Sheet->m_BottomMargin; /* Left Top corner */
for( WsItem = &WS_Segm1_LT; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx + WsItem->m_Posx)* scale;
pos.y = (refy + WsItem->m_Posy)* scale;
pos.x = (refx + WsItem->m_Posx) * scale;
pos.y = (refy + WsItem->m_Posy) * scale;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_SEGMENT_LT:
case WS_SEGMENT_LT:
xg = Sheet->m_LeftMargin + WsItem->m_Endx;
yg = Sheet->m_BottomMargin + WsItem->m_Endy;
GRLine(&DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
#else
refy = Sheet->m_TopMargin; /* Upper left corner */
xg = Sheet->m_Size.x - Sheet->m_RightMargin;
......@@ -1045,7 +1051,7 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, false, false, false );
width, false, false );
if( ii < xg - PAS_REF / 2 )
{
GRLine( &DrawPanel->m_ClipBox, DC, ii * scale, yg * scale,
......@@ -1053,10 +1059,10 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
}
DrawGraphicText( DrawPanel, DC,
wxPoint( (ii - gxpas / 2) * scale,
(yg - GRID_REF_W / 2) * scale ),
(yg - GRID_REF_W / 2) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, false, false, false );
width, false, false );
}
/* Trace des reperes selon l'axe Y */
......@@ -1076,11 +1082,11 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
}
DrawGraphicText( DrawPanel, DC,
wxPoint( (refx + GRID_REF_W / 2) * scale,
(ii - gypas / 2) * scale ),
(ii - gypas / 2) * scale ),
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, false, false, false );
width, false, false );
if( ii < yg - PAS_REF / 2 )
{
GRLine( &DrawPanel->m_ClipBox, DC, xg * scale, ii * scale,
......@@ -1088,118 +1094,160 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
}
DrawGraphicText( DrawPanel, DC,
wxPoint( (xg - GRID_REF_W / 2) * scale,
(ii - gxpas / 2) * scale ),
(ii - gxpas / 2) * scale ),
Color, Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
width, false, false, false );
width, false, false );
}
#endif
/* Trace du cartouche */
#if defined(KICAD_GOST)
refx = Sheet->m_Size.x - Sheet->m_RightMargin;
refy = Sheet->m_Size.y - Sheet->m_BottomMargin; /* lower right corner */
if (screen->m_ScreenNumber == 1)
if( screen->m_ScreenNumber == 1 )
{
for( WsItem = &WS_Date; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx)* scale;
pos.y = (refy - WsItem->m_Posy)* scale;
pos.x = (refx - WsItem->m_Posx) * scale;
pos.y = (refy - WsItem->m_Posy) * scale;
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;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
width, false, false, false );
width, false, false );
break;
case WS_SIZESHEET:
break;
case WS_IDENTSHEET:
if(WsItem->m_Legende)
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber;
DrawGraphicText( DrawPanel, DC, pos, Color, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, width, false, false, false);
GR_TEXT_VJUSTIFY_CENTER, width, false, false, false );
break;
case WS_SHEETS:
if(WsItem->m_Legende)
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color, msg,
TEXT_ORIENT_HORIZ, size, GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER, width, false, false, false);
GR_TEXT_VJUSTIFY_CENTER, width, false, false, false );
break;
case WS_COMPANY_NAME:
break;
case WS_TITLE:
break;
case WS_COMMENT1:
break;
case WS_COMMENT2:
break;
case WS_COMMENT3:
break;
case WS_COMMENT4:
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)* scale;
WS_MostUpperLine.m_Endy =
WS_MostLeftLine.m_Posy = STAMP_OY;
pos.y = (refy - WsItem->m_Posy) * scale;
case WS_SEGMENT:
xg = Sheet->m_Size.x -
Sheet->m_RightMargin - WsItem->m_Endx;
Sheet->m_RightMargin - WsItem->m_Endx;
yg = Sheet->m_Size.y -
Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine(&DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color);
Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
} else {
}
else
{
for( WsItem = &WS_CADRE_D; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx)* scale;
pos.y = (refy - WsItem->m_Posy)* scale;
pos.x = (refx - WsItem->m_Posx) * scale;
pos.y = (refy - WsItem->m_Posy) * scale;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_CADRE:
/* Begin list number > 1 */
/* Begin list number > 1 */
case WS_PODPIS_D:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
DrawGraphicText(DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,width, false, false, false);
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
DrawGraphicText( DrawPanel,
DC,
pos,
Color,
msg,
TEXT_ORIENT_HORIZ,
size,
GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER,
width,
false,
false,
false );
break;
case WS_IDENTSHEET_D:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber;
DrawGraphicText(DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,width, false, false, false);
DrawGraphicText( DrawPanel,
DC,
pos,
Color,
msg,
TEXT_ORIENT_HORIZ,
size,
GR_TEXT_HJUSTIFY_LEFT,
GR_TEXT_VJUSTIFY_CENTER,
width,
false,
false,
false );
break;
case WS_LEFT_SEGMENT_D:
pos.y = (refy - WsItem->m_Posy)* scale;
pos.y = (refy - WsItem->m_Posy) * scale;
case WS_SEGMENT_D:
xg = Sheet->m_Size.x -
Sheet->m_RightMargin - WsItem->m_Endx;
Sheet->m_RightMargin - WsItem->m_Endx;
yg = Sheet->m_Size.y -
Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine(&DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color);
Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
......@@ -1222,8 +1270,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += screen->m_Date;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, true, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, true );
break;
case WS_REV:
......@@ -1232,8 +1280,9 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += screen->m_Revision;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, true, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ),
false, true );
break;
case WS_KICAD_VERSION:
......@@ -1243,8 +1292,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += wxT( " " ) + GetBuildVersion();
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
break;
case WS_SIZESHEET:
......@@ -1253,8 +1302,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += Sheet->m_Name;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
break;
......@@ -1264,8 +1313,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
break;
case WS_FILENAME:
......@@ -1277,8 +1326,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg << fname << wxT( "." ) << fext;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
}
break;
......@@ -1288,8 +1337,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += GetScreenDesc();
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
break;
......@@ -1301,8 +1350,9 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
{
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, true, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ),
false, true );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
......@@ -1313,8 +1363,9 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
msg += screen->m_Title;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, true, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
GetPenSizeForBold( MIN( size.x, size.y ) ),
false, true );
break;
case WS_COMMENT1:
......@@ -1325,8 +1376,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
{
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
......@@ -1339,8 +1390,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
{
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
......@@ -1353,8 +1404,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
{
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
......@@ -1367,8 +1418,8 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
{
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false, false );
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width,
false, false );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
......@@ -1378,21 +1429,22 @@ void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_w
break;
case WS_LEFT_SEGMENT:
WS_MostUpperLine.m_Posy =
WS_MostUpperLine.m_Posy =
WS_MostUpperLine.m_Endy =
WS_MostLeftLine.m_Posy = UpperLimit;
WS_MostLeftLine.m_Posy = UpperLimit;
pos.y = (refy - WsItem->m_Posy) * scale;
case WS_SEGMENT:
xg = Sheet->m_Size.x -
GRID_REF_W - Sheet->m_RightMargin - WsItem->m_Endx;
GRID_REF_W - Sheet->m_RightMargin - WsItem->m_Endx;
yg = Sheet->m_Size.y -
GRID_REF_W - Sheet->m_BottomMargin - WsItem->m_Endy;
GRID_REF_W - Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
#endif
}
......@@ -1409,14 +1461,14 @@ wxString WinEDA_DrawFrame::GetXYSheetReferences( BASE_SCREEN* aScreen, const wxP
*/
{
Ki_PageDescr* Sheet = aScreen->m_CurrentSheetDesc;
int ii, xg, yg, ipas, gxpas, gypas;
int refx, refy;
wxString msg;
int ii, xg, yg, ipas, gxpas, gypas;
int refx, refy;
wxString msg;
if( Sheet == NULL )
{
DisplayError( this,
wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) );
wxT( "WinEDA_DrawFrame::GetXYSheetReferences() error: NULL Sheet" ) );
return msg;
}
......
......@@ -520,7 +520,7 @@ bool SCH_TEXT::Save( FILE* aFile ) const
if( fprintf( aFile, "Text Notes %-4d %-4d %-4d %-4d %s %d\n%s\n",
m_Pos.x, m_Pos.y,
m_SchematicOrientation, m_Size.x,
shape, (m_Bold?1:0),
shape, m_Width,
CONV_TO_UTF8( text ) ) == EOF )
{
success = false;
......@@ -577,7 +577,7 @@ bool SCH_LABEL::Save( FILE* aFile ) const
if( fprintf( aFile, "Text Label %-4d %-4d %-4d %-4d %s %d\n%s\n",
m_Pos.x, m_Pos.y,
m_SchematicOrientation, m_Size.x, shape, (m_Bold?1:0),
m_SchematicOrientation, m_Size.x, shape, m_Width,
CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
......@@ -616,7 +616,7 @@ bool SCH_GLOBALLABEL::Save( FILE* aFile ) const
m_Pos.x, m_Pos.y,
m_SchematicOrientation, m_Size.x,
SheetLabelType[m_Shape],
shape, (m_Bold?1:0),
shape, m_Width,
CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
......@@ -670,7 +670,7 @@ bool SCH_HIERLABEL::Save( FILE* aFile ) const
m_Pos.x, m_Pos.y,
m_SchematicOrientation, m_Size.x,
SheetLabelType[m_Shape],
shape, (m_Bold?1:0),
shape, m_Width,
CONV_TO_UTF8( m_Text ) ) == EOF )
{
success = false;
......
......@@ -6,6 +6,8 @@
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "base_struct.h"
#include "drawtxt.h"
#include "class_drawpanel.h"
#include "confirm.h"
......@@ -61,9 +63,15 @@ void DialogLabelEditor::TextPropertiesAccept( wxCommandEvent& event )
m_CurrentText->m_Italic = 0;
if ( ( style & 2 ) )
{
m_CurrentText->m_Bold = true;
m_CurrentText->m_Width = GetPenSizeForBold( m_CurrentText->m_Size.x );
}
else
{
m_CurrentText->m_Bold = false;
m_CurrentText->m_Width = 0;
}
m_Parent->GetScreen()->SetModify();
......
......@@ -9,6 +9,7 @@
#include "program.h"
#include "libcmp.h"
#include "general.h"
#include "drawtxt.h"
#include "protos.h"
......@@ -69,7 +70,7 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
if( text == NULL )
return NULL;
if( Name1[0] == 'L' )
if( Name1[0] == 'L' ) // Reading a simple label (SCH_LABEL item)
{
SCH_LABEL* TextStruct =
new SCH_LABEL( pos, CONV_FROM_UTF8( text ) );
......@@ -80,12 +81,13 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
{
thickness = atol( Name3 );
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Width = TextStruct->m_Bold ? GetPenSizeForBold( size ) : 0;
}
Struct = TextStruct;
if( stricmp( Name2, "Italic" ) == 0 )
TextStruct->m_Italic = 1;
}
else if( Name1[0] == 'G' && aSchematicFileVersion > '1' )
else if( Name1[0] == 'G' && aSchematicFileVersion > '1' ) // Reading a global label (SCH_GLOBALLABEL item)
{
SCH_GLOBALLABEL* TextStruct =
new SCH_GLOBALLABEL( pos, CONV_FROM_UTF8( text ) );
......@@ -94,7 +96,8 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
TextStruct->m_Size.x = TextStruct->m_Size.y = size;
TextStruct->SetSchematicTextOrientation( orient );
TextStruct->m_Shape = NET_INPUT;
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Width = TextStruct->m_Bold ? GetPenSizeForBold( size ) : 0;
if( stricmp( Name2, SheetLabelType[NET_OUTPUT] ) == 0 )
TextStruct->m_Shape = NET_OUTPUT;
......@@ -107,7 +110,7 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
if( stricmp( Name3, "Italic" ) == 0 )
TextStruct->m_Italic = 1;
}
else if( (Name1[0] == 'H')
else if( (Name1[0] == 'H') // Reading a hierarchical label (SCH_HIERLABEL item)
|| (Name1[0] == 'G' && aSchematicFileVersion == '1') ) //in schematic file version 1, glabels were actually hierarchal labels.
{
SCH_HIERLABEL* TextStruct =
......@@ -117,7 +120,8 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
TextStruct->m_Size.x = TextStruct->m_Size.y = size;
TextStruct->SetSchematicTextOrientation( orient );
TextStruct->m_Shape = NET_INPUT;
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Width = TextStruct->m_Bold ? GetPenSizeForBold( size ) : 0;
if( stricmp( Name2, SheetLabelType[NET_OUTPUT] ) == 0 )
TextStruct->m_Shape = NET_OUTPUT;
......@@ -130,7 +134,7 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
if( stricmp( Name3, "Italic" ) == 0 )
TextStruct->m_Italic = 1;
}
else
else // reading a graphic text (comment)
{
wxString val = CONV_FROM_UTF8( text );
......@@ -152,7 +156,8 @@ SCH_ITEM* ReadTextDescr( FILE* aFile,
if( isdigit( Name3[0] ) )
{
thickness = atol( Name3 );
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Bold = (thickness != 0);
TextStruct->m_Width = TextStruct->m_Bold ? GetPenSizeForBold( size ) : 0;
}
if( strnicmp( Name2, "Italic", 6 ) == 0 )
......
/* Hershey Cyrillic definition
* First shape has unicode value 0x410
*/
const static char* hershey_cyrillic[] =
{
"H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",
"G]LFL[ RMFM[ RIFYFYLXF RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",
"G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",
"I[NFN[ ROFO[ RKFZFZLYF RK[R[",
"F^NFNLMTLXKZJ[ RXFX[ RYFY[ RKF\\F RG[\\[ RG[Gb RH[Gb R[[\\b R\\[\\b",
"G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",
"CbRFR[ RSFS[ ROFVF RGGHHGIFHFGGFHFIGJIKMLONPWPYOZM[I\\G]F^F_G_H^I]H^G RNPLQKSJXIZH[ RNPMQLSKXJZI[G[FZEX RWPYQZS[X\\Z][ RWPXQYSZX[Z\\[^[_Z`X RO[V[",
"H\\LIKFKLLINGPFTFWGXIXLWNTOQO RTFVGWIWLVNTO RTOVPXRYTYWXYWZT[O[MZLYKWKVLUMVLW RWQXTXWWYVZT[",
"F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RXHLY RH[O[ RU[\\[",
"F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RXHLY RH[O[ RU[\\[ RN@N?M?M@NBPCTCVBW@",
"F^KFK[ RLFL[ RHFOF RLPSPUOVMWIXGYFZF[G[HZIYHZG RSPUQVSWXXZY[ RSPTQUSVXWZX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bHMH[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[``_[",
"H]QMQ[ RRMR[ RLMKRKMUM RRTVTYUZWZXYZV[N[ RVTXUYWYXXZV[", /* ъ */
"E_JMJ[ RKMK[ RGMNM RKTOTRUSWSXRZO[G[ ROTQURWRXQZO[ RYMY[ RZMZ[ RVM]M RV[][", /* ы */
"J[OMO[ RPMP[ RLMSM RPTTTWUXWXXWZT[L[ RTTVUWWWXVZT[", /* ь */
"H]LIKFKLLINGQFSFVGXIYKZNZSYVXXVZS[P[MZLYKWKVLUMVLW RSFUGWIXKYNYSXVWXUZS[ RPPYP", /* э */
"DaIMI[ RJMJ[ RFMMM RF[M[ RVMSNQPPSPUQXSZV[X[[Z]X^U^S]P[NXMVM RVMTNRPQSQURXTZV[ RX[ZZ\\X]U]S\\PZNXM RJTPT", /* ю */
"G\\VMV[ RWMW[ RZMOMLNKPKQLSOTVT ROMMNLPLQMSOT RTTQUPVNZM[ RTTRUQVOZN[L[KZJX RS[Z[" /* я */
};
/* Hershey Simplex Roman (sans) definition
* First shape has unicode (or ascii) value 0x20 (space)
*/
const static char* hershey_simplex[] =
{
"JZ",
"MWRFRT RRYQZR[SZRY",
"JZNFNM RVFVM",
"H]SBLb RYBRb RLOZO RKUYU",
"H\\PBP_ RTBT_ RYIWGTFPFMGKIKKLMMNOOUQWRXSYUYXWZT[P[MZKX",
"F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT",
"E_\\O\\N[MZMYNXPVUTXRZP[L[JZIYHWHUISJRQNRMSKSIRGPFNGMIMKNNPQUXWZY[[[\\Z\\Y",
"MWRHQGRFSGSIRKQL",
"KYVBTDRGPKOPOTPYR]T`Vb",
"KYNBPDRGTKUPUTTYR]P`Nb",
"JZRFRR RMIWO RWIMO",
"E_RIR[ RIR[R",
"MWSZR[QZRYSZS\\R^Q_",
"E_IR[R",
"MWRYQZR[SZ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PWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX",
"MYRFRWSZU[W[ ROMVM",
"I\\MMMWNZP[S[UZXW RXMX[",
"JZLMR[ RXMR[",
"G]JMN[ RRMN[ RRMV[ RZMV[",
"J[MMX[ RXMM[",
"JZLMR[ RXMR[P_NaLbKb",
"J[XMM[ RMMXM RM[X[",
"KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",
"NVRBRb",
"KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",
"F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",
"KYQFOGNINKOMQNSNUMVKVIUGSFQF"
};
......@@ -491,14 +491,14 @@ public:
wxString m_Text; /* text! */
wxPoint m_Pos; /* XY position of anchor text. */
wxSize m_Size; /* XY size of text */
int m_Width; /* text width */
int m_Width; /* pen size used to draw this text */
int m_Orient; /* Orient in 0.1 degrees */
bool m_Mirror; // Display Normal / mirror
bool m_Mirror; /* Display Normal / mirror */
int m_Attributs; /* flags (visible...) */
bool m_Italic; /* true to simulate an italic font... */
bool m_Bold; /* true to use a bold font... */
GRTextHorizJustifyType m_HJustify; /* Horiz Justify */
GRTextVertJustifyType m_VJustify; /* Vertical and Vert Justify */
bool m_Italic; /* true to simulate (or use if exists) an italic font... */
bool m_Bold; /* true to simulate a bold font ... */
GRTextHorizJustifyType m_HJustify; /* Horiz justification */
GRTextVertJustifyType m_VJustify; /* Vertical justification */
bool m_MultilineAllowed; /* true to use multiline option, false to use only single line text
* Single line is faster in calculations than multiline */
......@@ -576,7 +576,7 @@ public:
* If aLine == -1, the full area (considering all lines) is returned
*/
EDA_Rect GetTextBox( int aLine = -1);
/** Function GetInterline
* return the distance between 2 text lines
* has meaning only for multiline texts
......
......@@ -9,6 +9,26 @@
class WinEDA_DrawPanel;
/** Function Clamp_Text_PenSize
*As a rule, pen width should not be >1/4em, otherwise the character
* will be cluttered up in its own fatness
* The pen width max is aSize/4 for bold texts, and aSize/6 for normal texts
* The "best" pen width is aSize/5 for bold texts,
* so the clamp is consistant with bold option.
* @param aPenSize = the pen size to clamp
* @param aSize the char size (height or width, od its wxSize)
* @param aBold = true if text accept bold pen size
* @return the max pen size allowed
*/
int Clamp_Text_PenSize( int aPenSize, int aSize, bool aBold = true);
int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold = true);
/** Function GetPensizeForBold
* @return the "best" value for a pen size to draw/plot a bold text
* @param aTextSize = the char size (height or width)
*/
int GetPenSizeForBold( int aTextSize );
/** Function ReturnGraphicTextWidth
* @return the X size of the graphic text
* the full X size is ReturnGraphicTextWidth + the thickness of graphic lines
......@@ -32,9 +52,9 @@ int NegableTextLength( const wxString& aText );
* @param aV_justify = vertical justification (bottom, center, top)
* @param aWidth = line width (pen width) (default = 0)
* if width < 0 : draw segments in sketch mode, width = abs(width)
* Use a value min(aSize.x, aSize.y) / 5 for a bold text
* @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font
* @param aNegable = true to enable the ~ char for overbarring
* @param aCallback() = function called (if non null) to draw each segment.
* used to draw 3D texts or for plotting, NULL for normal drawings
*/
......@@ -49,7 +69,7 @@ void DrawGraphicText( WinEDA_DrawPanel * aPanel,
enum GRTextVertJustifyType aV_justify,
int aWidth,
bool aItalic,
bool aBold,
bool aBold,
void (*aCallback)( int x0, int y0, int xf, int yf ) = NULL );
/** Function PlotGraphicText
......
......@@ -27,7 +27,7 @@
/*
* Hershey fonts are vectored fonts.
* Note one can find many formats for these vectored fonts
* here is the formats used :
* here is the format used :
* >shapes are a set of polygons.
* >A given shape includes one or more polygons.
* >corner coordinates are coded by a XY pair.
......@@ -35,273 +35,8 @@
* >The coordinate (-50,0) or " R" is the Pen Up command (end of the current polygon)
*/
/* Hershey Simplex Roman (sans) definition */
const static char* hershey_simplex[] =
{
"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LSXSXQWOVNTMQMONMPLSLUMXOZQ[T[VZXX",
"MYWFUFSGRJR[ ROMVM",
"I\\XMX]W`VaTbQbOa RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",
"I\\MFM[ RMQPNRMUMWNXQX[",
"NVQFRGSFREQF RRMR[",
"MWRFSGTFSERF RSMS^RaPbNb",
"IZMFM[ RWMMW RQSX[",
"NVRFR[",
"CaGMG[ RGQJNLMOMQNRQR[ RRQUNWMZM\\N]Q][",
"I\\MMM[ RMQPNRMUMWNXQX[",
"I\\QMONMPLSLUMXOZQ[T[VZXXYUYSXPVNTMQM",
"H[LMLb RLPNNPMSMUNWPXSXUWXUZS[P[NZLX",
"I\\XMXb RXPVNTMQMONMPLSLUMXOZQ[T[VZXX",
"KXOMO[ ROSPPRNTMWM",
"J[XPWNTMQMNNMPNRPSUTWUXWXXWZT[Q[NZMX",
"MYRFRWSZU[W[ ROMVM",
"I\\MMMWNZP[S[UZXW RXMX[",
"JZLMR[ RXMR[",
"G]JMN[ RRMN[ RRMV[ RZMV[",
"J[MMX[ RXMM[",
"JZLMR[ RXMR[P_NaLbKb",
"J[XMM[ RMMXM RM[X[",
"KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",
"NVRBRb",
"KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",
"F^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",
"KYQFOGNINKOMQNSNUMVKVIUGSFQF"
};
#include "HersheySimplexRoman_sans_normal.h"
/* Hershey Duplex Roman (sans bold) definition */
const static char* hershey_duplex[] =
{
"JZ",
"MXRFRTST RRFSFST RRXQYQZR[S[TZTYSXRX RRYRZSZSYRY",
"I[NFMGMM RNGMM RNFOGMM RWFVGVM RWGVM RWFXGVM",
"H]SFLb RYFRb R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H[ RIMI[ RRMR[ RSMS[ R\\M\\[ R]M][ REMLM ROMVM RYM`M RE[`[``_[",
"H]QMQ[ RRMR[ RLMKRKMUM RRTVTYUZWZXYZV[N[ RVTXUYWYXXZV[", /* ъ */
"E_JMJ[ RKMK[ RGMNM RKTOTRUSWSXRZO[G[ ROTQURWRXQZO[ RYMY[ RZMZ[ RVM]M RV[][", /* ы */
"J[OMO[ RPMP[ RLMSM RPTTTWUXWXXWZT[L[ RTTVUWWWXVZT[", /* ь */
"H]LIKFKLLINGQFSFVGXIYKZNZSYVXXVZS[P[MZLYKWKVLUMVLW RSFUGWIXKYNYSXVWXUZS[ RPPYP", /* э */
"DaIMI[ RJMJ[ RFMMM RF[M[ RVMSNQPPSPUQXSZV[X[[Z]X^U^S]P[NXMVM RVMTNRPQSQURXTZV[ RX[ZZ\\X]U]S\\PZNXM RJTPT", /* ю */
"G\\VMV[ RWMW[ RZMOMLNKPKQLSOTVT ROMMNLPLQMSOT RTTQUPVNZM[ RTTRUQVOZN[L[KZJX RS[Z[" /* я */
};
#include "HersheyCyrillic.h"
#endif
......@@ -11,32 +11,32 @@
#ifndef __WORKSHEET_H__
#define __WORKSHEET_H__
#define GRID_REF_W 70 /* hauteur de la bande de reference grille */
#define SIZETEXT 60 /* Dimension des textes du cartouche */
#define SIZETEXT_REF 50 /* Dimension des lettres du marquage des reperes */
#define PAS_REF 2000 /* pas des marquages de reference des reperes */
#define TEXT_VTAB_HEIGHT SIZETEXT*2
#define GRID_REF_W 70 /* hauteur de la bande de reference grille */
#define SIZETEXT 60 /* Dimension des textes du cartouche */
#define SIZETEXT_REF 50 /* Dimension des lettres du marquage des reperes */
#define PAS_REF 2000 /* pas des marquages de reference des reperes */
#define TEXT_VTAB_HEIGHT SIZETEXT * 2
#if defined(KICAD_GOST)
/* Shtamp */
#define STAMP_OX 185 * 10000 / 254
#define STAMP_OY 55 * 10000 / 254
#define STAMP_OX 185 * 10000 / 254
#define STAMP_OY 55 * 10000 / 254
#define STAMP_Y_0 0
#define STAMP_Y_5 5 * 10000 / 254
#define STAMP_Y_8 8 * 10000 / 254
#define STAMP_Y_7 7 * 10000 / 254
#define STAMP_Y_10 10 * 10000 / 254
#define STAMP_Y_14 14 * 10000 / 254
#define STAMP_Y_15 15 * 10000 / 254
#define STAMP_Y_20 20 * 10000 / 254
#define STAMP_Y_25 25 * 10000 / 254
#define STAMP_Y_30 30 * 10000 / 254
#define STAMP_Y_35 35 * 10000 / 254
#define STAMP_Y_40 40 * 10000 / 254
#define STAMP_Y_45 45 * 10000 / 254
#define STAMP_Y_50 50 * 10000 / 254
#define STAMP_Y_55 55 * 10000 / 254
#define STAMP_Y_0 0
#define STAMP_Y_5 5 * 10000 / 254
#define STAMP_Y_8 8 * 10000 / 254
#define STAMP_Y_7 7 * 10000 / 254
#define STAMP_Y_10 10 * 10000 / 254
#define STAMP_Y_14 14 * 10000 / 254
#define STAMP_Y_15 15 * 10000 / 254
#define STAMP_Y_20 20 * 10000 / 254
#define STAMP_Y_25 25 * 10000 / 254
#define STAMP_Y_30 30 * 10000 / 254
#define STAMP_Y_35 35 * 10000 / 254
#define STAMP_Y_40 40 * 10000 / 254
#define STAMP_Y_45 45 * 10000 / 254
#define STAMP_Y_50 50 * 10000 / 254
#define STAMP_Y_55 55 * 10000 / 254
#define STAMP_X_0 0
#define STAMP_X_10 10 * 10000 / 254
......@@ -58,59 +58,58 @@
#define STAMP_X_178 178 * 10000 / 254
#define STAMP_X_185 185 * 10000 / 254
#define STAMP_5 5 * 10000 / 254
#define STAMP_7 7 * 10000 / 254
#define STAMP_12 12 * 10000 / 254
#define STAMP_5 5 * 10000 / 254
#define STAMP_7 7 * 10000 / 254
#define STAMP_12 12 * 10000 / 254
#define STAMP_145 145 * 10000 / 254
#define STAMP_110 110 * 10000 / 254
#define STAMP_85 85 * 10000 / 254
#define STAMP_60 60 * 10000 / 254
#define STAMP_25 25 * 10000 / 254
#define STAMP_145 145 * 10000 / 254
#define STAMP_110 110 * 10000 / 254
#define STAMP_85 85 * 10000 / 254
#define STAMP_60 60 * 10000 / 254
#define STAMP_25 25 * 10000 / 254
#endif
/* Les coord ci dessous sont relatives au coin bas - droit de la feuille, et
seront soustraires de cette origine
*/
#define BLOCK_OX 4200
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
#define BLOCK_KICAD_VERSION_Y SIZETEXT
#define BLOCK_REV_X 820
#define BLOCK_REV_Y (SIZETEXT*3)
#define BLOCK_DATE_X BLOCK_OX - (SIZETEXT*15)
#define BLOCK_DATE_Y (SIZETEXT*3)
#define BLOCK_ID_SHEET_X 820
#define BLOCK_ID_SHEET_Y SIZETEXT
#define BLOCK_SIZE_SHEET_X BLOCK_OX - SIZETEXT
#define BLOCK_SIZE_SHEET_Y (SIZETEXT*3)
#define BLOCK_TITLE_X BLOCK_OX - SIZETEXT
#define BLOCK_TITLE_Y (SIZETEXT*5)
#define BLOCK_FULLSHEETNAME_X BLOCK_OX - SIZETEXT
#define BLOCK_FULLSHEETNAME_Y (SIZETEXT * 7)
#define BLOCK_FILENAME_X BLOCK_OX - SIZETEXT
#define BLOCK_FILENAME_Y (SIZETEXT * 9)
#define BLOCK_COMMENT_X BLOCK_OX - SIZETEXT
* seront soustraires de cette origine
*/
#define BLOCK_OX 4200
#define BLOCK_KICAD_VERSION_X BLOCK_OX - SIZETEXT
#define BLOCK_KICAD_VERSION_Y SIZETEXT
#define BLOCK_REV_X 820
#define BLOCK_REV_Y (SIZETEXT * 3)
#define BLOCK_DATE_X BLOCK_OX - (SIZETEXT * 15)
#define BLOCK_DATE_Y (SIZETEXT * 3)
#define BLOCK_ID_SHEET_X 820
#define BLOCK_ID_SHEET_Y SIZETEXT
#define BLOCK_SIZE_SHEET_X BLOCK_OX - SIZETEXT
#define BLOCK_SIZE_SHEET_Y (SIZETEXT * 3)
#define BLOCK_TITLE_X BLOCK_OX - SIZETEXT
#define BLOCK_TITLE_Y (SIZETEXT * 5)
#define BLOCK_FULLSHEETNAME_X BLOCK_OX - SIZETEXT
#define BLOCK_FULLSHEETNAME_Y (SIZETEXT * 7)
#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)
#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)
struct Ki_WorkSheetData
{
public:
int m_Type; /* nombre permettant de reconnaitre la description */
Ki_WorkSheetData * Pnext;
int m_Posx, m_Posy; /* position de l'element ou point de depart du segment */
int m_Endx, m_Endy; /* extremite d'un element type segment ou cadre */
const wxChar * m_Legende; /* Pour m_Textes: texte a afficher avant le texte lui meme */
const wxChar * m_Text; /* Pour m_Textes:pointeur sur le texte a afficher */
int m_Type; /* nombre permettant de reconnaitre la description */
Ki_WorkSheetData* Pnext;
int m_Posx, m_Posy; /* position de l'element ou point de depart du segment */
int m_Endx, m_Endy; /* extremite d'un element type segment ou cadre */
const wxChar* m_Legende; /* Pour m_Textes: texte a afficher avant le texte lui meme */
const wxChar* m_Text; /* Pour m_Textes:pointeur sur le texte a afficher */
};
/* Type des descriptions Ki_WorkSheetData */
enum TypeKi_WorkSheetData
{
enum TypeKi_WorkSheetData {
WS_DATE,
WS_REV,
WS_KICAD_VERSION,
......
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -205,6 +205,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 )
DisplayIsol = FALSE;
SetAlpha(&color, 170);
switch( GetShape() )
{
case PAD_CIRCLE:
......
......@@ -5,7 +5,9 @@
#include "fctsys.h"
#include "wxstruct.h"
#include "gr_basic.h"
#include "base_struct.h"
#include "common.h"
#include "drawtxt.h"
#include "kicad_string.h"
#include "pcbnew.h"
......@@ -42,6 +44,7 @@ void TEXTE_PCB::Copy( TEXTE_PCB* source )
m_Width = source->m_Width;
m_Attributs = source->m_Attributs;
m_Italic = source->m_Italic;
m_Bold = source->m_Bold;
m_HJustify = source->m_HJustify;
m_VJustify = source->m_VJustify;
m_MultilineAllowed = m_MultilineAllowed;
......@@ -131,6 +134,11 @@ int TEXTE_PCB::ReadTextePcbDescr( FILE* File, int* LineNum )
}
}
// Set a reasonnable width:
if( m_Width < 1 )
m_Width = 1;
m_Width = Clamp_Text_PenSize( m_Width, m_Size );
return 1;
}
......@@ -194,7 +202,7 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
GRFillMode fillmode = FILLED;
if ( DisplayOpt.DisplayDrawItems == SKETCH)
fillmode = SKETCH;
EDA_TextStruct::Draw(
panel, DC,
offset,
......
......@@ -166,19 +166,18 @@ int TEXTE_MODULE::ReadDescr( char* aLine, FILE* aFile, int* aLineNum )
ReadDelimitedText( BufLine, aLine, sizeof(BufLine) );
m_Text = CONV_FROM_UTF8( BufLine );
// Test for a reasonnable width:
if( m_Width <= 1 )
m_Width = 1;
if( m_Width > TEXTS_MAX_WIDTH )
m_Width = TEXTS_MAX_WIDTH;
// Test for a reasonnable size:
if( m_Size.x < TEXTS_MIN_SIZE )
m_Size.x = TEXTS_MIN_SIZE;
if( m_Size.y < TEXTS_MIN_SIZE )
m_Size.y = TEXTS_MIN_SIZE;
return success;
// Set a reasonnable width:
if( m_Width < 1 )
m_Width = 1;
m_Width = Clamp_Text_PenSize( m_Width, m_Size );
return success;
}
......@@ -203,6 +202,8 @@ void TEXTE_MODULE::Copy( TEXTE_MODULE* source )
m_Size = source->m_Size;
m_Width = source->m_Width;
m_Italic = source->m_Italic;
m_Bold = source->m_Bold;
m_Text = source->m_Text;
}
......
......@@ -10,6 +10,8 @@
#include "common.h"
#include "class_drawpanel.h"
#include "pcbnew.h"
#include "drawtxt.h"
#include "confirm.h"
#include "dialog_edit_module_text_base.h"
......@@ -178,9 +180,12 @@ void DialogEditModuleText::OnOkClick( wxCommandEvent& event )
// Test for a reasonnable width:
if( width <= 1 )
width = 1;
int minthickness = min(m_CurrentTextMod->m_Size.x, m_CurrentTextMod->m_Size.y) / 4;
if( width > minthickness )
width = minthickness;
int maxthickness = Clamp_Text_PenSize(width, m_CurrentTextMod->m_Size );
if( width > maxthickness )
{
DisplayError(this, _("The text thickness is too large for the text size. It will be clamped"));
width = maxthickness;
}
m_CurrentTextMod->SetWidth( width );
m_CurrentTextMod->m_NoShow = (m_Show->GetSelection() == 0) ? 0 : 1;
......
......@@ -7,6 +7,8 @@
#include "common.h"
#include "class_drawpanel.h"
#include "pcbnew.h"
#include "drawtxt.h"
#include "confirm.h"
enum id_TextPCB_properties {
ID_TEXTPCB_SELECT_LAYER = 1900
......@@ -221,10 +223,12 @@ void WinEDA_TextPCBPropertiesFrame::OnOkClick( wxCommandEvent& event )
CurrentTextPCB->m_Width = m_TxtWidthCtlr->GetValue();
// test for acceptable values for parameters:
int max_tickness = min( CurrentTextPCB->m_Size.x, CurrentTextPCB->m_Size.y );
max_tickness /= 4;
if( CurrentTextPCB->m_Width > max_tickness )
CurrentTextPCB->m_Width = max_tickness;
int maxthickness = Clamp_Text_PenSize( CurrentTextPCB->m_Width, CurrentTextPCB->m_Size );
if( CurrentTextPCB->m_Width > maxthickness )
{
DisplayError(this, _("The text thickness is too large for the text size. It will be clamped"));
CurrentTextPCB->m_Width = maxthickness;
}
CurrentTextPCB->m_Mirror = (m_Mirror->GetSelection() == 1) ? true : false;
CurrentTextPCB->m_Orient = m_Orient->GetSelection() * 900;
......
......@@ -11,6 +11,7 @@
#include "class_drawpanel.h"
#include "pcbnew.h"
#include "drawtxt.h"
#include "trigo.h"
#include "protos.h"
......@@ -44,6 +45,8 @@ TEXTE_MODULE* WinEDA_BasePcbFrame::CreateTextModule( MODULE* Module, wxDC* DC )
Text->m_Text = wxT( "text" );
ModuleTextWidth = Clamp_Text_PenSize( ModuleTextWidth,
MIN(ModuleTextSize.x, ModuleTextSize.y), true );
Text->m_Size = ModuleTextSize;
Text->m_Width = ModuleTextWidth;
Text->m_Pos = GetScreen()->m_Curseur;
......
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