KiCad PCB EDA Suite
HPGL_plotter.cpp File Reference

Kicad: specialized plotter for HPGL files format Since this plot engine is mostly intended for import in external programs, sadly HPGL/2 isn't supported a lot... More...

#include <cstdio>
#include <eda_base_frame.h>
#include <fill_type.h>
#include <kicad_string.h>
#include <convert_basic_shapes_to_polygon.h>
#include <math/util.h>
#include <trigo.h>
#include "plotter_hpgl.h"

Go to the source code of this file.

Functions

static double dpoint_dist (DPOINT a, DPOINT b)
 Compute the distance between two DPOINT points. More...
 

Variables

static const char hpgl_end_polygon_cmd [] = "PM 2; FP; EP;\n"
 
static const double PLUsPERDECIMIL = 0.1016
 

Detailed Description

Kicad: specialized plotter for HPGL files format Since this plot engine is mostly intended for import in external programs, sadly HPGL/2 isn't supported a lot...

some of the primitives use overlapped strokes to fill the shape

Definition in file HPGL_plotter.cpp.

Function Documentation

◆ dpoint_dist()

static double dpoint_dist ( DPOINT  a,
DPOINT  b 
)
static

Compute the distance between two DPOINT points.

Definition at line 970 of file HPGL_plotter.cpp.

971 {
972  DPOINT diff = a - b;
973  return sqrt( diff.x * diff.x + diff.y * diff.y );
974 }

References VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by HPGL_PLOTTER::sortItems().

Variable Documentation

◆ hpgl_end_polygon_cmd

const char hpgl_end_polygon_cmd[] = "PM 2; FP; EP;\n"
static

◆ PLUsPERDECIMIL

const double PLUsPERDECIMIL = 0.1016
static

Definition at line 220 of file HPGL_plotter.cpp.

Referenced by HPGL_PLOTTER::SetViewport().