drawcanvas class added
This commit is contained in:
59
include/amscppsimpledraw/amscppsimpledraw.hpp
Normal file
59
include/amscppsimpledraw/amscppsimpledraw.hpp
Normal file
@ -0,0 +1,59 @@
|
||||
#ifndef __AMSCPPSIMPLEDRAW_HPP__
|
||||
#define __AMSCPPSIMPLEDRAW_HPP__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include <amsmathutil25/amsmathutil25.hpp>
|
||||
|
||||
|
||||
namespace ams
|
||||
{
|
||||
namespace simpledraw
|
||||
{
|
||||
|
||||
static const int simpledraw_success = 1;
|
||||
static const int simpledraw_failure = -1;
|
||||
|
||||
|
||||
class drawcanvas
|
||||
{
|
||||
public:
|
||||
int width;
|
||||
int height;
|
||||
|
||||
double *data; //size [5,width,height] - {r,g,b,alpha,z}
|
||||
|
||||
drawcanvas();
|
||||
~drawcanvas();
|
||||
drawcanvas(const drawcanvas &other);
|
||||
drawcanvas(drawcanvas &&other) noexcept;
|
||||
drawcanvas& operator=(const drawcanvas &other);
|
||||
drawcanvas& operator=(drawcanvas &&other) noexcept;
|
||||
|
||||
int resize(int _width, int _height);
|
||||
|
||||
double& operator[](int64_t ind);
|
||||
const double& operator[](int64_t ind) const;
|
||||
double& operator()(int channel, int ix, int iy);
|
||||
const double& operator()(int channel, int ix, int iy) const;
|
||||
double& at(int channel, int ix, int iy);
|
||||
const double& at(int channel, int ix, int iy) const;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
void test_drawcanvas1();
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
#include <amscppsimpledraw/amscppsimpledraw_util.hpp>
|
||||
|
||||
#endif
|
||||
15
include/amscppsimpledraw/amscppsimpledraw_util.hpp
Normal file
15
include/amscppsimpledraw/amscppsimpledraw_util.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __AMSCPPSIMPLEDRAW_UTIL_HPP__
|
||||
#define __AMSCPPSIMPLEDRAW_UTIL_HPP__
|
||||
|
||||
namespace ams
|
||||
{
|
||||
namespace simpledraw
|
||||
{
|
||||
|
||||
};
|
||||
}; //end namespace ams
|
||||
|
||||
#include <amscppsimpledraw/amscppsimpledraw_utilimpl.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
15
include/amscppsimpledraw/amscppsimpledraw_utilimpl.hpp
Normal file
15
include/amscppsimpledraw/amscppsimpledraw_utilimpl.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __AMSCPPSIMPLEDRAW_UTILIMPL_HPP__
|
||||
#define __AMSCPPSIMPLEDRAW_UTILIMPL_HPP__
|
||||
|
||||
namespace ams
|
||||
{
|
||||
namespace simpledraw
|
||||
{
|
||||
|
||||
};
|
||||
}; //end namespace ams
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user