projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various attempts to clean up DCP comparison code.
[libdcp.git]
/
src
/
argb_frame.cc
diff --git
a/src/argb_frame.cc
b/src/argb_frame.cc
index 7a9ad2b94825b421cf4e7ee2a9b4d28cab073221..99d6c8145154a3efb0fa6caa5d76502cec42611a 100644
(file)
--- a/
src/argb_frame.cc
+++ b/
src/argb_frame.cc
@@
-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
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
@@
-17,15
+17,22
@@
*/
*/
+/** @file src/argb_frame.cc
+ * @brief ARGBFrame class.
+ */
+
#include "argb_frame.h"
#include "argb_frame.h"
-using namespace
lib
dcp;
+using namespace dcp;
-ARGBFrame::ARGBFrame (int width, int height)
- : _width (width)
- , _height (height)
+/** Construct an empty ARGBFrame of a given size and with
+ * undefined contents.
+ * @param size Size in pixels.
+ */
+ARGBFrame::ARGBFrame (Size size)
+ : _size (size)
{
{
- _data = new uint8_t[
width *
height * 4];
+ _data = new uint8_t[
_size.width * _size.
height * 4];
}
}
@@
-34,8
+41,9
@@
ARGBFrame::~ARGBFrame ()
delete[] _data;
}
delete[] _data;
}
+/** @return The stride, in bytes; that is, the number of bytes per row of the image */
int
ARGBFrame::stride () const
{
int
ARGBFrame::stride () const
{
- return _width * 4;
+ return _
size.
width * 4;
}
}