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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/imbuf/intern/dds/Image.h
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/imbuf/intern/dds/Image.h')
-rw-r--r--source/blender/imbuf/intern/dds/Image.h77
1 files changed, 36 insertions, 41 deletions
diff --git a/source/blender/imbuf/intern/dds/Image.h b/source/blender/imbuf/intern/dds/Image.h
index fa8cacd3142..b6191b7e96c 100644
--- a/source/blender/imbuf/intern/dds/Image.h
+++ b/source/blender/imbuf/intern/dds/Image.h
@@ -18,7 +18,6 @@
* \ingroup imbdds
*/
-
/*
* This file is based on a similar file from the NVIDIA texture tools
* (http://nvidia-texture-tools.googlecode.com/)
@@ -35,64 +34,60 @@
#include <Color.h>
/// 32 bit RGBA image.
-class Image
-{
-public:
+class Image {
+ public:
+ enum Format {
+ Format_RGB,
+ Format_ARGB,
+ };
- enum Format
- {
- Format_RGB,
- Format_ARGB,
- };
+ Image();
+ ~Image();
- Image();
- ~Image();
-
- void allocate(uint w, uint h);
+ void allocate(uint w, uint h);
#if 0
- bool load(const char *name);
+ bool load(const char *name);
- void wrap(void *data, uint w, uint h);
- void unwrap();
+ void wrap(void *data, uint w, uint h);
+ void unwrap();
#endif
- uint width() const;
- uint height() const;
+ uint width() const;
+ uint height() const;
- const Color32 *scanline(uint h) const;
- Color32 *scanline(uint h);
+ const Color32 *scanline(uint h) const;
+ Color32 *scanline(uint h);
- const Color32 *pixels() const;
- Color32 *pixels();
+ const Color32 *pixels() const;
+ Color32 *pixels();
- const Color32 & pixel(uint idx) const;
- Color32 & pixel(uint idx);
+ const Color32 &pixel(uint idx) const;
+ Color32 &pixel(uint idx);
- const Color32 & pixel(uint x, uint y) const;
- Color32 & pixel(uint x, uint y);
+ const Color32 &pixel(uint x, uint y) const;
+ Color32 &pixel(uint x, uint y);
- Format format() const;
- void setFormat(Format f);
+ Format format() const;
+ void setFormat(Format f);
-private:
- void free();
+ private:
+ void free();
-private:
- uint m_width;
- uint m_height;
- Format m_format;
- Color32 *m_data;
+ private:
+ uint m_width;
+ uint m_height;
+ Format m_format;
+ Color32 *m_data;
};
-
-inline const Color32 & Image::pixel(uint x, uint y) const
+inline const Color32 &Image::pixel(uint x, uint y) const
{
- return pixel(y * width() + x);
+ return pixel(y * width() + x);
}
-inline Color32 & Image::pixel(uint x, uint y)
+inline Color32 &Image::pixel(uint x, uint y)
{
- return pixel(y * width() + x);
+ return pixel(y * width() + x);
}
-#endif /* __IMAGE_H__ */
+#endif /* __IMAGE_H__ */