KiCad PCB EDA Suite
|
#include "svg_import_plugin.h"
#include <nanosvg.h>
#include <algorithm>
#include <cmath>
#include <locale_io.h>
#include <eda_item.h>
#include "graphics_importer.h"
Go to the source code of this file.
Functions | |
static VECTOR2D | calculateBezierBoundingBoxExtremity (const float *aCurvePoints, std::function< const float &(const float &, const float &) > comparator) |
static float | calculateBezierSegmentationThreshold (const float *aCurvePoints) |
static void | segmentBezierCurve (const VECTOR2D &aStart, const VECTOR2D &aEnd, float aOffset, float aStep, const float *aCurvePoints, float aSegmentationThreshold, std::vector< VECTOR2D > &aGeneratedPoints) |
static void | createNewBezierCurveSegments (const VECTOR2D &aStart, const VECTOR2D &aMiddle, const VECTOR2D &aEnd, float aOffset, float aStep, const float *aCurvePoints, float aSegmentationThreshold, std::vector< VECTOR2D > &aGeneratedPoints) |
static VECTOR2D | getBezierPoint (const float *aCurvePoints, float aStep) |
static VECTOR2D | getPoint (const float *aPointCoordinates) |
static VECTOR2D | getPointInLine (const VECTOR2D &aLineStart, const VECTOR2D &aLineEnd, float aDistance) |
static float | distanceFromPointToLine (const VECTOR2D &aPoint, const VECTOR2D &aLineStart, const VECTOR2D &aLineEnd) |
Variables | |
static const int | SVG_DPI = 96 |
|
static |
Definition at line 368 of file svg_import_plugin.cpp.
Referenced by calculateBezierSegmentationThreshold().
|
static |
Definition at line 353 of file svg_import_plugin.cpp.
References calculateBezierBoundingBoxExtremity(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by SVG_IMPORT_PLUGIN::DrawCubicBezierCurve().
|
static |
Definition at line 400 of file svg_import_plugin.cpp.
References segmentBezierCurve().
Referenced by segmentBezierCurve().
|
static |
Definition at line 418 of file svg_import_plugin.cpp.
References distance(), VECTOR2< T >::Perpendicular(), and VECTOR2< T >::Resize().
Referenced by segmentBezierCurve().
|
static |
Definition at line 326 of file svg_import_plugin.cpp.
References getPoint(), and getPointInLine().
Referenced by SVG_IMPORT_PLUGIN::DrawCubicBezierCurve(), and segmentBezierCurve().
|
static |
Definition at line 320 of file svg_import_plugin.cpp.
Referenced by getBezierPoint().
|
static |
Definition at line 346 of file svg_import_plugin.cpp.
Referenced by getBezierPoint().
|
static |
Definition at line 384 of file svg_import_plugin.cpp.
References createNewBezierCurveSegments(), distanceFromPointToLine(), and getBezierPoint().
Referenced by createNewBezierCurveSegments(), and SVG_IMPORT_PLUGIN::DrawCubicBezierCurve().
|
static |
Definition at line 36 of file svg_import_plugin.cpp.
Referenced by SVG_IMPORT_PLUGIN::GetImageHeight(), SVG_IMPORT_PLUGIN::GetImageWidth(), SVG_IMPORT_PLUGIN::Load(), and SVG_IMPORT_PLUGIN::LoadFromMemory().