Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp')
-rw-r--r--source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
index 61ad78a8567..952b9752a3e 100644
--- a/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
+++ b/source/blender/freestyle/intern/view_map/AverageAreaGridDensityProvider.cpp
@@ -100,10 +100,10 @@ void AverageAreaGridDensityProvider::initialize(const real proscenium[4], real s
// Make sure the grid exceeds the proscenium by a small amount
float safetyZone = 0.1f;
if (_cellsX * _cellSize < prosceniumWidth * (1.0 + safetyZone)) {
- _cellsX = prosceniumWidth * (1.0 + safetyZone) / _cellSize;
+ _cellsX = ceil(prosceniumWidth * (1.0 + safetyZone) / _cellSize);
}
if (_cellsY * _cellSize < prosceniumHeight * (1.0 + safetyZone)) {
- _cellsY = prosceniumHeight * (1.0 + safetyZone) / _cellSize;
+ _cellsY = ceil(prosceniumHeight * (1.0 + safetyZone) / _cellSize);
}
if (G.debug & G_DEBUG_FREESTYLE) {
cout << _cellsX << "x" << _cellsY << " cells of size " << _cellSize << " square." << endl;