KiCad PCB EDA Suite
|
#include "gfx_import_utils.h"
#include <stdint.h>
#include <lib_symbol.h>
#include <sch_shape.h>
#include <import_gfx/graphics_importer_lib_symbol.h>
#include <import_gfx/svg_import_plugin.h>
Go to the source code of this file.
Functions | |
std::unordered_map< uint32_t, SHAPE_POLY_SET > | ConvertImageToPolygons (wxImage img, VECTOR2D pixelScale) |
void | ConvertImageToLibShapes (LIB_SYMBOL *aSymbol, int unit, wxImage img, VECTOR2D pixelScale, VECTOR2D offset) |
void | ConvertSVGToLibShapes (LIB_SYMBOL *aSymbol, int unit, const wxMemoryBuffer &aImageData, VECTOR2D pixelScale, VECTOR2D offset) |
void ConvertImageToLibShapes | ( | LIB_SYMBOL * | aSymbol, |
int | unit, | ||
wxImage | img, | ||
VECTOR2D | pixelScale, | ||
VECTOR2D | offset | ||
) |
Definition at line 109 of file gfx_import_utils.cpp.
References LIB_SYMBOL::AddDrawItem(), color, ConvertImageToPolygons(), FILLED_WITH_COLOR, LAYER_DEVICE, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, and POLY.
Referenced by SCH_EASYEDAPRO_PARSER::ParseSymbol(), and SCH_EASYEDA_PARSER::ParseSymbolShapes().
std::unordered_map< uint32_t, SHAPE_POLY_SET > ConvertImageToPolygons | ( | wxImage | img, |
VECTOR2D | pixelScale | ||
) |
Definition at line 34 of file gfx_import_utils.cpp.
References SHAPE_POLY_SET::AddOutline(), SHAPE_LINE_CHAIN::Append(), color, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE, SHAPE_LINE_CHAIN::SetClosed(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ConvertImageToLibShapes().
void ConvertSVGToLibShapes | ( | LIB_SYMBOL * | aSymbol, |
int | unit, | ||
const wxMemoryBuffer & | aImageData, | ||
VECTOR2D | pixelScale, | ||
VECTOR2D | offset | ||
) |
Definition at line 144 of file gfx_import_utils.cpp.
References SVG_IMPORT_PLUGIN::Import(), EDA_IU_SCALE::IUTomm(), SVG_IMPORT_PLUGIN::LoadFromMemory(), schIUScale, GRAPHICS_IMPORT_PLUGIN::SetImporter(), GRAPHICS_IMPORTER::SetImportOffsetMM(), GRAPHICS_IMPORTER::SetScale(), VECTOR2< T >::x, and VECTOR2< T >::y.