[buffer] small changes in comments/test svg

This commit is contained in:
Barend Gehrels 2014-09-17 16:32:25 +02:00
parent 9298ac2a2c
commit c55e000eef
3 changed files with 16 additions and 4 deletions

View File

@ -175,7 +175,7 @@ struct buffered_piece_collection
// 1: half, part of offsetted_rings
segment_identifier first_seg_id;
int last_segment_index; // no segment-identifier - it is the same as first_seg_id
int offsetted_count;
int offsetted_count; // part in robust_ring which is part of offsetted ring
#if defined(BOOST_GEOMETRY_BUFFER_USE_HELPER_POINTS)
// 2: half, not part of offsetted rings - part of robust ring

View File

@ -207,7 +207,7 @@ public:
{
// It is on the border but not on the offsetted ring.
// Then it is somewhere on the helper-segments
// Classify it as inside
// Classify it as "within"
geometry_code = 1;
mutable_turn.count_on_helper++; // can still become "near_offsetted"
}

View File

@ -168,7 +168,7 @@ struct svg_visitor
offsets[it->get_robust_point()] += 10;
int offset = offsets[it->get_robust_point()];
m_mapper.map(it->point, fill, 6);
m_mapper.map(it->point, fill, 4);
m_mapper.text(it->point, out.str(), "fill:rgb(0,0,0);font-family='Arial';font-size:9px;", 5, offset);
offsets[it->get_robust_point()] += 25;
@ -500,8 +500,20 @@ void test_buffer(std::string const& caseid, Geometry const& geometry,
}
#if defined(TEST_WITH_SVG)
bool const areal = boost::is_same
<
typename bg::tag_cast<tag, bg::areal_tag>::type, bg::areal_tag
>::type::value;
// Map input geometry in green
mapper.map(geometry, "opacity:0.5;fill:rgb(0,128,0);stroke:rgb(0,128,0);stroke-width:10");
if (areal)
{
mapper.map(geometry, "opacity:0.5;fill:rgb(0,128,0);stroke:rgb(0,128,0);stroke-width:2");
}
else
{
mapper.map(geometry, "opacity:0.5;stroke:rgb(0,128,0);stroke-width:10");
}
BOOST_FOREACH(GeometryOut const& polygon, buffered)
{