KiCad PCB EDA Suite
create_3Dgraphic_brd_items.cpp File Reference

Go to the source code of this file.

Macros

#define SEG_CNT_MAX   128
 

Functions

void addTextSegmToContainer (int x0, int y0, int xf, int yf, void *aData)
 

Variables

static int s_textWidth
 
static CGENERICCONTAINER2Ds_dstcontainer = NULL
 
static float s_biuTo3Dunits
 
static const BOARD_ITEMs_boardItem = NULL
 

Macro Definition Documentation

◆ SEG_CNT_MAX

#define SEG_CNT_MAX   128

Function Documentation

◆ addTextSegmToContainer()

void addTextSegmToContainer ( int  x0,
int  y0,
int  xf,
int  yf,
void *  aData 
)

Definition at line 66 of file create_3Dgraphic_brd_items.cpp.

67 {
68  const SFVEC2F start3DU( x0 * s_biuTo3Dunits, -y0 * s_biuTo3Dunits );
69  const SFVEC2F end3DU ( xf * s_biuTo3Dunits, -yf * s_biuTo3Dunits );
70 
71  if( Is_segment_a_circle( start3DU, end3DU ) )
72  s_dstcontainer->Add( new CFILLEDCIRCLE2D( start3DU,
73  ( s_textWidth / 2 ) * s_biuTo3Dunits,
74  *s_boardItem) );
75  else
76  s_dstcontainer->Add( new CROUNDSEGMENT2D( start3DU,
77  end3DU,
79  *s_boardItem ) );
80 }
static int s_textWidth
bool Is_segment_a_circle(const SFVEC2F &aStart, const SFVEC2F &aEnd)
Segment_is_a_circle - check if segment start and end is very close to each other should used to check...
glm::vec2 SFVEC2F
Definition: xv3d_types.h:45
static float s_biuTo3Dunits
static CGENERICCONTAINER2D * s_dstcontainer
void Add(COBJECT2D *aObject)
Definition: ccontainer2d.h:52
static const BOARD_ITEM * s_boardItem

References CGENERICCONTAINER2D::Add(), Is_segment_a_circle(), s_biuTo3Dunits, s_boardItem, s_dstcontainer, and s_textWidth.

Referenced by BOARD_ADAPTER::AddGraphicsShapesWithClearanceToContainer(), and BOARD_ADAPTER::AddShapeWithClearanceToContainer().

Variable Documentation

◆ s_biuTo3Dunits

◆ s_boardItem

◆ s_dstcontainer

◆ s_textWidth