diff --git a/src/DrawingProgram/DrawingProgramCache.cpp b/src/DrawingProgram/DrawingProgramCache.cpp index b8c0bf6..51ed9d7 100644 --- a/src/DrawingProgram/DrawingProgramCache.cpp +++ b/src/DrawingProgram/DrawingProgramCache.cpp @@ -341,10 +341,10 @@ void DrawingProgramCache::refresh_draw_cache(const std::shared_ptr((iBounds.max.x() - bvhNode->bounds.min.x()) / bDim.x()) * bvhNode->resolution.x(), static_cast((iBounds.max.y() - bvhNode->bounds.min.y()) / bDim.y()) * bvhNode->resolution.y()}; - SkIRect clipRect = SkIRect::MakeLTRB(std::max(clipBoundMin.x() - 2, 0), - std::max(clipBoundMin.y() - 2, 0), - std::min(clipBoundMax.x() + 2, bvhNode->resolution.x() - 1), - std::min(clipBoundMax.y() + 2, bvhNode->resolution.y() - 1)); + SkIRect clipRect = SkIRect::MakeLTRB(clipBoundMin.x() - 2, + clipBoundMin.y() - 2, + clipBoundMax.x() + 2, + clipBoundMax.y() + 2); SCollision::AABB clipRectBoundAABB{clipBoundMin - Vector2f{4, 4}, clipBoundMax + Vector2f{4, 4}}; SCollision::AABB clipRectBoundAABBWorld{