2018-08-03 11:51:41 +00:00
|
|
|
#include "fctsys.h"
|
|
|
|
#include "gr_basic.h"
|
|
|
|
#include "base_screen.h"
|
|
|
|
#include "common.h"
|
|
|
|
#include "macros.h"
|
|
|
|
#include "class_drawpanel.h"
|
|
|
|
#include "marker_base.h"
|
|
|
|
#include "dialog_display_info_HTML_base.h"
|
|
|
|
|
|
|
|
|
2019-04-04 22:49:49 +00:00
|
|
|
void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset )
|
2018-08-03 11:51:41 +00:00
|
|
|
{
|
2018-12-19 14:07:07 +00:00
|
|
|
// Build the marker shape polygon in internal units:
|
|
|
|
const int ccount = GetShapePolygonCornerCount();
|
|
|
|
std::vector<wxPoint> shape;
|
|
|
|
shape.reserve( ccount );
|
|
|
|
|
|
|
|
for( int ii = 0; ii < ccount; ii++ )
|
2019-04-04 22:49:49 +00:00
|
|
|
{
|
2018-12-19 14:07:07 +00:00
|
|
|
shape.push_back( wxPoint( GetShapePolygonCorner( ii ).x * MarkerScale(),
|
|
|
|
GetShapePolygonCorner( ii ).y * MarkerScale() ) );
|
2019-04-04 22:49:49 +00:00
|
|
|
}
|
2018-08-03 11:51:41 +00:00
|
|
|
|
2018-12-19 14:07:07 +00:00
|
|
|
for( int ii = 0; ii < ccount; ii++ )
|
2018-08-03 11:51:41 +00:00
|
|
|
{
|
2018-12-19 14:07:07 +00:00
|
|
|
shape[ii] += m_Pos + aOffset;
|
2018-08-03 11:51:41 +00:00
|
|
|
}
|
|
|
|
|
2018-12-19 14:07:07 +00:00
|
|
|
GRClosedPoly( aPanel->GetClipBox(), aDC, ccount, &shape[0],
|
2018-08-03 11:51:41 +00:00
|
|
|
true, // = Filled
|
|
|
|
0, // outline width
|
|
|
|
m_Color, // outline color
|
|
|
|
m_Color // fill collor
|
|
|
|
);
|
|
|
|
}
|