|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
// EraseContour.h: interface for the CEraseContour class.
|
|
Toshihiro Shimizu |
890ddd |
//
|
|
Toshihiro Shimizu |
890ddd |
//////////////////////////////////////////////////////////////////////
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#if !defined( \
|
|
Shinya Kitaoka |
120a6e |
AFX_ERASECONTOUR_H__53513372_34D4_11D6_B9E7_0040F674BE6A__INCLUDED_)
|
|
Toshihiro Shimizu |
890ddd |
#define AFX_ERASECONTOUR_H__53513372_34D4_11D6_B9E7_0040F674BE6A__INCLUDED_
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
6a4e01 |
#include <memory></memory>
|
|
Shinya Kitaoka |
6a4e01 |
#include <array></array>
|
|
Shinya Kitaoka |
6a4e01 |
|
|
Toshihiro Shimizu |
890ddd |
#include "STColSelPic.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "toonz4.6/raster.h"
|
|
Toshihiro Shimizu |
890ddd |
#include "SDef.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#define MAXNB_NEIGHBOURS 1500
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
class CEraseContour {
|
|
Shinya Kitaoka |
120a6e |
UC_PIXEL *m_picUC;
|
|
Shinya Kitaoka |
120a6e |
US_PIXEL *m_picUS;
|
|
Shinya Kitaoka |
120a6e |
const RASTER *m_ras;
|
|
Shinya Kitaoka |
120a6e |
std::shared_ptr<uchar> m_sel;</uchar>
|
|
Shinya Kitaoka |
120a6e |
int m_lX, m_lY;
|
|
Shinya Kitaoka |
120a6e |
CCIL m_cil;
|
|
Shinya Kitaoka |
120a6e |
std::array<sxydw, maxnb_neighbours=""> m_neighbours;</sxydw,>
|
|
Shinya Kitaoka |
120a6e |
int m_nbNeighbours;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void null();
|
|
Shinya Kitaoka |
120a6e |
int makeSelectionCMAP32();
|
|
Shinya Kitaoka |
120a6e |
int makeSelection();
|
|
Shinya Kitaoka |
120a6e |
void eraseInkColors();
|
|
Shinya Kitaoka |
120a6e |
void prepareNeighbours();
|
|
Shinya Kitaoka |
120a6e |
bool findClosestPaint(const int xx, const int yy, I_PIXEL &ip);
|
|
Shinya Kitaoka |
120a6e |
void sel0123To01();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
CEraseContour()
|
|
Shinya Kitaoka |
120a6e |
: m_picUC(0), m_picUS(0), m_ras(0), m_lX(0), m_lY(0), m_cil() {}
|
|
Shinya Kitaoka |
120a6e |
virtual ~CEraseContour();
|
|
Shinya Kitaoka |
120a6e |
int makeSelection(const CCIL &iil);
|
|
Shinya Kitaoka |
120a6e |
int doIt(const CCIL &iil);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
template <class p=""></class>
|
|
Shinya Kitaoka |
120a6e |
CEraseContour(CSTColSelPic &p) {
|
|
Shinya Kitaoka |
120a6e |
null();
|
|
Shinya Kitaoka |
120a6e |
if (p.m_lX > 0 && p.m_lY > 0 && p.m_sel && p.m_pic && p.m_ras) {
|
|
Shinya Kitaoka |
120a6e |
m_lX = p.m_lX;
|
|
Shinya Kitaoka |
120a6e |
m_lY = p.m_lY;
|
|
Shinya Kitaoka |
120a6e |
m_sel = p.m_sel;
|
|
Shinya Kitaoka |
120a6e |
m_ras = p.m_ras;
|
|
Shinya Kitaoka |
120a6e |
if (p.getType() == ST_RGBM) {
|
|
Shinya Kitaoka |
120a6e |
m_picUC = (UC_PIXEL *)p.m_pic;
|
|
Shinya Kitaoka |
120a6e |
m_picUS = 0;
|
|
Shinya Kitaoka |
120a6e |
} else if (p.getType() == ST_RGBM64) {
|
|
Shinya Kitaoka |
120a6e |
m_picUC = 0;
|
|
Shinya Kitaoka |
120a6e |
m_picUS = (US_PIXEL *)p.m_pic;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif // !defined(AFX_ERASECONTOUR_H__53513372_34D4_11D6_B9E7_0040F674BE6A__INCLUDED_)
|