-
-
- Colour c(0.5,0.5,1,1);
- // make the bounds just a little bit bigger
- pix_bounds.x--;
- pix_bounds.w++;
- pix_bounds.y--;
- pix_bounds.h++;
- /*
- ObjectRenderer::RenderLineOnCPU(pix_bounds.x, pix_bounds.y, pix_bounds.x+pix_bounds.w, pix_bounds.y, target, c);
- ObjectRenderer::RenderLineOnCPU(pix_bounds.x, pix_bounds.y+pix_bounds.h, pix_bounds.x+pix_bounds.w, pix_bounds.y+pix_bounds.h, target, c);
- ObjectRenderer::RenderLineOnCPU(pix_bounds.x, pix_bounds.y, pix_bounds.x, pix_bounds.y+pix_bounds.h, target, c);
- ObjectRenderer::RenderLineOnCPU(pix_bounds.x+pix_bounds.w, pix_bounds.y, pix_bounds.x+pix_bounds.w, pix_bounds.y+pix_bounds.h, target, c);
- */
- // Attempt to shade the region
- // Assumes the outline has been drawn first...
- for (int64_t y = max((int64_t)0, pix_bounds.y); y <= min(pix_bounds.y+pix_bounds.h, target.h-1); ++y)
+ pix_bounds.x-=1;
+ pix_bounds.w+=2;
+ pix_bounds.y-=1;
+ pix_bounds.h+=2;
+ const Path & path = objects.paths[objects.data_indices[m_indexes[i]]];
+ if (path.m_fill.a == 0 || !view.PerformingShading())
+ continue;
+
+
+ pair<int64_t,int64_t> top(CPUPointLocation(path.m_top, view, target));
+ pair<int64_t,int64_t> bottom(CPUPointLocation(path.m_bottom, view, target));
+ pair<int64_t,int64_t> left(CPUPointLocation(path.m_left, view, target));
+ pair<int64_t,int64_t> right(CPUPointLocation(path.m_right, view, target));
+ FloodFillOnCPU(top.first, top.second+1, pix_bounds, target, path.m_fill);
+ FloodFillOnCPU(bottom.first, bottom.second-1, pix_bounds, target, path.m_fill);
+ FloodFillOnCPU(left.first+1, left.second, pix_bounds, target, path.m_fill);
+ FloodFillOnCPU(right.first-1, right.second, pix_bounds, target, path.m_fill);
+
+ if (view.ShowingObjectBounds())