APIs for passing KIFONT::FONT pointers around.

Also some clean-up and bug fixes.
This commit is contained in:
Jeff Young
2021-12-29 17:32:19 +00:00
parent dd6cd7d184
commit ccb94fd1a7
29 changed files with 454 additions and 226 deletions
+3 -2
View File
@@ -32,8 +32,8 @@
#include <gr_basic.h>
#include <plotters/plotter.h>
#include <trigo.h>
#include <base_screen.h>
#include <math/util.h> // for KiROUND
#include <font/font.h>
#include <basic_gal.h>
@@ -117,6 +117,7 @@ int GraphicTextWidth( const wxString& aText, const wxSize& aSize, bool aItalic,
* Use a value min(aSize.x, aSize.y) / 5 for a bold text.
* @param aItalic is the true to simulate an italic font.
* @param aBold use true to use a bold font. Useful only with default width value (aWidth = 0).
* @param aFont is the font to use, or nullptr for the KiCad stroke font
* @param aCallback( int x0, int y0, int xf, int yf, void* aData ) is a function called
* (if non null) to draw each segment. used to draw 3D texts or for plotting.
* NULL for normal drawings
@@ -128,7 +129,7 @@ int GraphicTextWidth( const wxString& aText, const wxSize& aSize, bool aItalic,
void GRText( wxDC* aDC, const wxPoint& aPos, const COLOR4D& aColor, const wxString& aText,
const EDA_ANGLE& aOrient, const wxSize& aSize, enum GR_TEXT_H_ALIGN_T aH_justify,
enum GR_TEXT_V_ALIGN_T aV_justify, int aWidth, bool aItalic, bool aBold,
void (* aCallback)( int x0, int y0, int xf, int yf, void* aData ),
KIFONT::FONT* aFont, void (* aCallback)( int x0, int y0, int xf, int yf, void* aData ),
void* aCallbackData, PLOTTER* aPlotter )
{
bool fill_mode = true;