Exemplo n.º 1
0
void ROUTER_PREVIEW_ITEM::drawLineChain( const SHAPE_LINE_CHAIN& aL, KIGFX::GAL* aGal ) const
{
    for( int s = 0; s < aL.SegmentCount(); s++ )
        aGal->DrawLine( aL.CSegment( s ).A, aL.CSegment( s ).B );

    if( aL.IsClosed() )
        aGal->DrawLine( aL.CSegment( -1 ).B, aL.CSegment( 0 ).A );
}
int SHAPE_POLY_SET::AddOutline( const SHAPE_LINE_CHAIN& aOutline )
{
    assert( aOutline.IsClosed() );

    POLYGON poly;

    poly.push_back( aOutline );

    m_polys.push_back( poly );

    return m_polys.size() - 1;
}
Exemplo n.º 3
0
int SHAPE_POLY_SET::AddOutline( const SHAPE_LINE_CHAIN& aOutline )
{
    assert ( aOutline.IsClosed() );

    Path p = convert ( aOutline );
    Paths poly;

    if( !Orientation( p ) )
        ReversePath(p); // outlines are always CW

    poly.push_back( p );

    m_polys.push_back( poly );

    return m_polys.size() - 1;
}