|
|
|
@ -477,6 +477,7 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con |
|
|
|
|
|
|
|
// draw the lines
|
|
|
|
int i_start_contour = 0; |
|
|
|
wxPoint lines[( GetNumCorners()*2)+2]; |
|
|
|
for( int ic = 0; ic < GetNumCorners(); ic++ ) |
|
|
|
{ |
|
|
|
seg_start = GetCornerPosition( ic ) + offset; |
|
|
|
@ -489,18 +490,23 @@ void ZONE_CONTAINER::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, con |
|
|
|
seg_end = GetCornerPosition( i_start_contour ) + offset; |
|
|
|
i_start_contour = ic + 1; |
|
|
|
} |
|
|
|
GRLine( &panel->m_ClipBox, DC, seg_start.x, seg_start.y, seg_end.x, seg_end.y, 0, color ); |
|
|
|
lines[ic*2].x = seg_start.x; |
|
|
|
lines[ic*2].y = seg_start.y; |
|
|
|
lines[ic*2+1].x = seg_start.x; |
|
|
|
lines[ic*2+1].y = seg_start.y; |
|
|
|
} |
|
|
|
GRLineArray(&panel->m_ClipBox, DC, lines, GetNumCorners(), 0, color); |
|
|
|
|
|
|
|
// draw hatches
|
|
|
|
wxPoint hatches[(m_Poly->m_HatchLines.size() *2)+2]; |
|
|
|
for( unsigned ic = 0; ic < m_Poly->m_HatchLines.size(); ic++ ) |
|
|
|
{ |
|
|
|
int xi = m_Poly->m_HatchLines[ic].xi + offset.x; |
|
|
|
int yi = m_Poly->m_HatchLines[ic].yi + offset.y; |
|
|
|
int xf = m_Poly->m_HatchLines[ic].xf + offset.x; |
|
|
|
int yf = m_Poly->m_HatchLines[ic].yf + offset.y; |
|
|
|
GRLine( &panel->m_ClipBox, DC, xi, yi, xf, yf, 0, color ); |
|
|
|
hatches[ic*2].x = m_Poly->m_HatchLines[ic].xi + offset.x; |
|
|
|
hatches[ic*2].y = m_Poly->m_HatchLines[ic].yi + offset.y; |
|
|
|
hatches[ic*2+1].x = m_Poly->m_HatchLines[ic].xf + offset.x; |
|
|
|
hatches[ic*2+1].y = m_Poly->m_HatchLines[ic].yf + offset.y; |
|
|
|
} |
|
|
|
GRLineArray(&panel->m_ClipBox, DC, hatches, m_Poly->m_HatchLines.size(), 0, color ); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|