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:
authorJulian Eisel <julian@blender.org>2022-11-10 15:17:42 +0300
committerJulian Eisel <julian@blender.org>2022-11-10 15:17:42 +0300
commit7246c387435769a169ac24c91434c615df6434b4 (patch)
tree61842e3e0ce85e80720fdd7476d44d2e629f59fd /source/blender/freestyle/intern/application/AppCanvas.cpp
parentc5f55d17096d373791363e46004176e3f7f7ae52 (diff)
parent0b4bd3ddc016298e868169a541cf6c132b10c587 (diff)
Merge branch 'master' into asset-browser-grid-viewasset-browser-grid-view
Diffstat (limited to 'source/blender/freestyle/intern/application/AppCanvas.cpp')
-rw-r--r--source/blender/freestyle/intern/application/AppCanvas.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/application/AppCanvas.cpp b/source/blender/freestyle/intern/application/AppCanvas.cpp
index ee316bbf220..109afd48b1b 100644
--- a/source/blender/freestyle/intern/application/AppCanvas.cpp
+++ b/source/blender/freestyle/intern/application/AppCanvas.cpp
@@ -89,7 +89,7 @@ void AppCanvas::init()
void AppCanvas::postDraw()
{
- for (unsigned int i = 0; i < _StyleModules.size(); i++) {
+ for (uint i = 0; i < _StyleModules.size(); i++) {
if (!_StyleModules[i]->getDisplayed() || !_Layers[i]) {
continue;
}
@@ -118,8 +118,8 @@ void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) co
int ymax = border().getMax().y();
int rectx = _pass_diffuse.width;
int recty = _pass_diffuse.height;
- float xfac = ((float)rectx) / ((float)(xmax - xmin));
- float yfac = ((float)recty) / ((float)(ymax - ymin));
+ float xfac = float(rectx) / float(xmax - xmin);
+ float yfac = float(recty) / float(ymax - ymin);
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
printf("readColorPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
@@ -138,12 +138,12 @@ void AppCanvas::readColorPixels(int x, int y, int w, int h, RGBImage &oImage) co
#endif
int ii, jj;
for (int j = 0; j < h; j++) {
- jj = (int)((y - ymin + j) * yfac);
+ jj = int((y - ymin + j) * yfac);
if (jj < 0 || jj >= recty) {
continue;
}
for (int i = 0; i < w; i++) {
- ii = (int)((x - xmin + i) * xfac);
+ ii = int((x - xmin + i) * xfac);
if (ii < 0 || ii >= rectx) {
continue;
}
@@ -167,8 +167,8 @@ void AppCanvas::readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) c
int ymax = border().getMax().y();
int rectx = _pass_z.width;
int recty = _pass_z.height;
- float xfac = ((float)rectx) / ((float)(xmax - xmin));
- float yfac = ((float)recty) / ((float)(ymax - ymin));
+ float xfac = float(rectx) / float(xmax - xmin);
+ float yfac = float(recty) / float(ymax - ymin);
#if 0
if (G.debug & G_DEBUG_FREESTYLE) {
printf("readDepthPixels %d x %d @ (%d, %d) in %d x %d [%d x %d] -- %d x %d @ %d%%\n",
@@ -187,12 +187,12 @@ void AppCanvas::readDepthPixels(int x, int y, int w, int h, GrayImage &oImage) c
#endif
int ii, jj;
for (int j = 0; j < h; j++) {
- jj = (int)((y - ymin + j) * yfac);
+ jj = int((y - ymin + j) * yfac);
if (jj < 0 || jj >= recty) {
continue;
}
for (int i = 0; i < w; i++) {
- ii = (int)((x - xmin + i) * xfac);
+ ii = int((x - xmin + i) * xfac);
if (ii < 0 || ii >= rectx) {
continue;
}