KiCad PCB EDA Suite
common_plotDXF_functions.cpp File Reference

KiCad: Common plot DXF Routines. More...

#include <fctsys.h>
#include <gr_basic.h>
#include <trigo.h>
#include <wxstruct.h>
#include <base_struct.h>
#include <plot_common.h>
#include <macros.h>
#include <kicad_string.h>
#include <convert_basic_shapes_to_polygon.h>

Go to the source code of this file.

Functions

bool containsNonAsciiChars (const wxString &string)
 Checks if a given string contains non-ASCII characters. More...
 

Variables

static const double DXF_OBLIQUE_ANGLE = 15
 Oblique angle for DXF native text (I don't remember if 15 degrees is the ISO value... More...
 

Detailed Description

KiCad: Common plot DXF Routines.

Definition in file common_plotDXF_functions.cpp.

Function Documentation

bool containsNonAsciiChars ( const wxString &  string)

Checks if a given string contains non-ASCII characters.

FIXME: the performance of this code is really poor, but in this case it can be acceptable because the plot operation is not called very often.

Parameters
stringString to check
Returns
true if it contains some non-ASCII character, false if all characters are inside ASCII range (<=255).

Definition at line 693 of file common_plotDXF_functions.cpp.

Referenced by DXF_PLOTTER::Text().

694 {
695  for( unsigned i = 0; i < string.length(); i++ )
696  {
697  wchar_t ch = string[i];
698  if( ch > 255 )
699  return true;
700  }
701  return false;
702 }

Variable Documentation

const double DXF_OBLIQUE_ANGLE = 15
static

Oblique angle for DXF native text (I don't remember if 15 degrees is the ISO value...

it looks nice anyway)

Definition at line 43 of file common_plotDXF_functions.cpp.

Referenced by DXF_PLOTTER::StartPlot(), and DXF_PLOTTER::Text().