| 
    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, LIB_SYMBOL::GetDrawItems(), LAYER_DEVICE, POLY, and MULTIVECTOR< T, FIRST_TYPE_VAL, LAST_TYPE_VAL >::sort().
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(), chain, color, 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 146 of file gfx_import_utils.cpp.
References SVG_IMPORT_PLUGIN::Import(), SVG_IMPORT_PLUGIN::LoadFromMemory(), schIUScale, GRAPHICS_IMPORT_PLUGIN::SetImporter(), GRAPHICS_IMPORTER::SetImportOffsetMM(), GRAPHICS_IMPORTER::SetScale(), VECTOR2< T >::x, and VECTOR2< T >::y.