It builds again.
[libdcp.git] / src / argb_frame.h
index c5c35768aa7d8da6d35039ce193a6499bc9e127a..a1b3b4276da68c8ee290533c3ac76bc28486fcd3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 */
 
 /** @file  src/argb_frame.h
- *  @brief Container for a single image from a picture asset.
+ *  @brief ARGBFrame class. 
  */
 
+#include "util.h"
 #include <stdint.h>
 
-namespace libdcp
+namespace dcp
 {
 
 /** @class ARGBFrame
@@ -33,18 +34,18 @@ namespace libdcp
  *
  *  <pre>
  *  Byte   /- 0 -------|- 1 --------|- 2 --------|- 3 --------|- 4 --------|- 5 --------| ...
- *         |(0, 0) Blue|(0, 0) Red  |(0, 0) Blue |(0, 0) Alpha|(0, 1) Blue |(0, 1) Red  | ...
+ *         |(0, 0) Blue|(0, 0)Green |(0, 0) Red  |(0, 0) Alpha|(0, 1) Blue |(0, 1) Green| ...
  *  </pre>
  *
  *  So that the first byte is the blue component of the pixel at x=0, y=0, the second
- *  is the red component, and so on.
+ *  is the green component, and so on.
  *
  *  Lines are packed so that the second row directly follows the first.
  */
-class ARGBFrame
+class ARGBFrame : boost::noncopyable
 {
 public:
-       ARGBFrame (int width, int height);
+       ARGBFrame (Size size);
        ~ARGBFrame ();
 
        uint8_t* data () const {
@@ -54,18 +55,13 @@ public:
        /** Length of one picture row in bytes */
        int stride () const;
 
-       int width () const {
-               return _width;
-       }
-
-       int height () const {
-               return _height;
+       Size size () const {
+               return _size;
        }
 
 private:
-       int _width;
-       int _height;
-       uint8_t* _data;
+       Size _size;     ///< frame size in pixels
+       uint8_t* _data; ///< pointer to image data
 };
 
 }