diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-30 10:50:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-01 00:58:27 +0300 |
commit | 1e8697cd8094183a3f356bf8564284a31ffb89fc (patch) | |
tree | 554b1ac7856f3f168c58476ce53d1953beaa760e /source/blender/freestyle/intern/image | |
parent | 5ca8ac51d04c6feb9d29d75fb2525168d30fbe74 (diff) |
Cleanup: comments (long lines) in freestyle
Diffstat (limited to 'source/blender/freestyle/intern/image')
4 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index 5b74e622c33..e6824fcb81e 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -46,7 +46,8 @@ class GaussianFilter { float _sigma; float *_mask; int _bound; - // the real mask size (must be odd)(the size of the mask we store is ((_maskSize+1)/2)*((_maskSize+1)/2)) + // the real mask size (must be odd)(the size of the mask we store is + // ((_maskSize+1)/2)*((_maskSize+1)/2)) int _maskSize; int _storedMaskSize; // (_maskSize+1)/2) @@ -56,13 +57,13 @@ class GaussianFilter { GaussianFilter &operator=(const GaussianFilter &); virtual ~GaussianFilter(); - /*! Returns the value for pixel x,y of image "map" after a gaussian blur, made using the sigma value. - * The sigma value determines the mask size (~ 2 x sigma). - * \param map: - * The image we wish to work on. The Map template must implement the following methods: - * - float pixel(unsigned int x,unsigned int y) const; - * - unsigned width() const; - * - unsigned height() const; + /*! Returns the value for pixel x,y of image "map" after a gaussian blur, made using the sigma + * value. The sigma value determines the mask size (~ 2 x sigma). + * \param map: The image we wish to work on. + * The Map template must implement the following methods: + * - float pixel(unsigned int x,unsigned int y) const; + * - unsigned width() const; + * - unsigned height() const; * \param x: * The abscissa of the pixel where we want to evaluate the gaussian blur. * \param y: @@ -127,8 +128,8 @@ template<class Map> float GaussianFilter::getSmoothedPixel(Map *map, int x, int { float sum = 0.0f; float L = 0.0f; - int w = (int)map->width(); //soc - int h = (int)map->height(); //soc + int w = (int)map->width(); // soc + int h = (int)map->height(); // soc // Current pixel is x,y // Sum surrounding pixels L value: @@ -145,7 +146,7 @@ template<class Map> float GaussianFilter::getSmoothedPixel(Map *map, int x, int sum += m; } } - //L /= sum; + // L /= sum; return L; } diff --git a/source/blender/freestyle/intern/image/Image.h b/source/blender/freestyle/intern/image/Image.h index 344766bfa63..b854e411a83 100644 --- a/source/blender/freestyle/intern/image/Image.h +++ b/source/blender/freestyle/intern/image/Image.h @@ -35,9 +35,10 @@ namespace Freestyle { // /////////////////////////////////////////////////////////////////////////////// -/*! This class allows the storing of part of an image, while allowing a normal access to its pixel values. - * You can for example only a rectangle of sw*sh, whose lower-left corner is at (ox, oy), of an image of - * size w*h, and access these pixels using x,y coordinates specified in the whole image coordinate system. +/*! This class allows the storing of part of an image, while allowing a normal access to its pixel + * values. You can for example only a rectangle of sw*sh, whose lower-left corner is at (ox, oy), + * of an image of size w*h, and access these pixels using x,y coordinates specified in the whole + * image coordinate system. */ class FrsImage { public: @@ -209,7 +210,8 @@ class RGBImage : public FrsImage { /*! Builds an RGB partial image from the useful part buffer. * \param rgb: * The array of size 3*sw*sh containing the RGB values of the sw*sh pixels we need to stored. - * These sw*sh pixels constitute a rectangular part of a bigger RGB image containing w*h pixels. + * These sw*sh pixels constitute a rectangular part of a bigger + * RGB image containing w*h pixels. * \param w: * The width of the complete image * \param h: @@ -346,7 +348,8 @@ class GrayImage : public FrsImage { /*! Builds a partial image from the useful part buffer. * \param lvl: * The array of size sw*sh containing the gray values of the sw*sh pixels we need to stored. - * These sw*sh pixels constitute a rectangular part of a bigger gray image containing w*h pixels. + * These sw*sh pixels constitute a rectangular part of a bigger + * gray image containing w*h pixels. * \param w: * The width of the complete image * \param h: diff --git a/source/blender/freestyle/intern/image/ImagePyramid.cpp b/source/blender/freestyle/intern/image/ImagePyramid.cpp index 12d322d7472..e5b4053fbf4 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.cpp +++ b/source/blender/freestyle/intern/image/ImagePyramid.cpp @@ -153,7 +153,7 @@ void GaussianPyramid::BuildPyramid(GrayImage *level0, unsigned nbLevels) unsigned w = pLevel->width(); unsigned h = pLevel->height(); if (nbLevels != 0) { - for (unsigned int i = 0; i < nbLevels; ++i) { //soc + for (unsigned int i = 0; i < nbLevels; ++i) { // soc w = pLevel->width() >> 1; h = pLevel->height() >> 1; GrayImage *img = new GrayImage(w, h); diff --git a/source/blender/freestyle/intern/image/ImagePyramid.h b/source/blender/freestyle/intern/image/ImagePyramid.h index 0e388fdf20c..8c6a8bcdff4 100644 --- a/source/blender/freestyle/intern/image/ImagePyramid.h +++ b/source/blender/freestyle/intern/image/ImagePyramid.h @@ -43,7 +43,7 @@ class ImagePyramid { { } ImagePyramid(const ImagePyramid &iBrother); - //ImagePyramid(const GrayImage& level0, unsigned nbLevels); + // ImagePyramid(const GrayImage& level0, unsigned nbLevels); virtual ~ImagePyramid(); /*! Builds the pyramid. |