3 #ifndef __ZtColoredMatrix_H
4 #define __ZtColoredMatrix_H
7 #include <mix/FloatAr.H>
8 #include <ldb/dbtools.h>
10 #include <zm/ZtObject.H>
11 #include <zm/ZScaledPalette.H>
12 #include <zm/ZBarBuffer.H>
13 #include <zm/ZtvTypes.h>
40 #define AnyAr ZtCMPixelItemAr
41 #define AnyType ZtCMPixelItem
42 #define AnyFormatSpec "\np[%d]=%d: ic=%u:%u k=%g c=%g (+=%g -=%g)"
43 #define AnyPrintList i, item.p, item.ic_beg, item.ic_end, \
44 item.k, item.c, item.c_plus, item.c_minus
45 #include <mix/AnyAr.H>
49 typedef float (*ZCMatixAccess)(
unsigned xi,
unsigned yi,
void* ptr);
63 ZGroupId pxid, ZGroupId pyid,
64 ZGroupId nxid, ZGroupId nyid);
70 void attach_xc (
unsigned xc_n,
float* pXC);
73 void attach_xc (
unsigned xc_n,
float x0,
float dx);
76 void attach_yc (
unsigned yc_n,
float* pYC);
79 void attach_yc (
unsigned yc_n,
float y0,
float dy);
84 void attach_matrix (ZDimension storage_policy,
float* pMatrix);
87 void attach_matrix (ZCMatixAccess pFunc,
void* pCustomData = NULL);
106 virtual ZInputStatus
input (
const XEvent* xev);
109 virtual const char*
class_id ()
const;
140 Logic
find_cell (
unsigned& xi,
unsigned& yi,
142 float x_pr = 0.0,
float y_pr = 0.0)
const;
154 ZtCMPixelItemAr& piar);
157 static Logic
in_range (Logic ascent,
float c1,
float c,
float c2);
160 static float restrict_range (Logic ascent,
float c1,
float c,
float c2);
static float restrict_range(Logic ascent, float c1, float c, float c2)
float x_prec
Definition: ZtColoredMatrix.H:125
float get_height(unsigned xi, unsigned yi)
ZBarDraw * fdm
Definition: ZtColoredMatrix.H:134
unsigned ic_beg
Definition: ZtColoredMatrix.H:27
ZtvFillMode fill_mode
Definition: ZtColoredMatrix.H:121
Logic find_cell(unsigned &xi, unsigned &yi, float x, float y, float x_pr=0.0, float y_pr=0.0) const
void attach_xc(unsigned xc_n, float *pXC)
Definition: ZPixelCoord.H:102
virtual ~ZtColoredMatrix()
void attach_yc(unsigned yc_n, float *pYC)
FloatAr yc
Definition: ZtColoredMatrix.H:118
Logic get_status_of_matrix() const
float c_plus
Definition: ZtColoredMatrix.H:36
virtual const char * class_id() const
void attach_matrix(ZDimension storage_policy, float *pMatrix)
Definition: ZtColoredMatrix.H:19
ZtCMPixelItemAr xpiar
Definition: ZtColoredMatrix.H:128
Definition: ZtColoredMatrix.H:57
ZtvFillMode get_fill_mode() const
static void prepare_pixel_list(const ZNCoordSlave &ns, const ZPCoordSlave &ps, const FloatAr &car, ZtCMPixelItemAr &piar)
virtual ZInputStatus input(const XEvent *xev)
Definition: ZtObject.H:57
int p
Definition: ZtColoredMatrix.H:22
ZtCMPixelItemAr ypiar
Definition: ZtColoredMatrix.H:131
static Logic in_range(Logic ascent, float c1, float c, float c2)
ZDimension stpol
Definition: ZtColoredMatrix.H:117
Definition: ZScaledPalette.H:15
ZtColoredMatrix(ZtMain *pManager, ZGroupId pxid, ZGroupId pyid, ZGroupId nxid, ZGroupId nyid)
Definition: ZBarDraw.H:19
float * matrix
Definition: ZtColoredMatrix.H:114
float c
Definition: ZtColoredMatrix.H:33
void set_fill_mode(ZtvFillMode fm)
void draw_pixel(unsigned xpi, unsigned ypi)
Definition: ZNaturalCoord.H:88
double k
Definition: ZtColoredMatrix.H:30
void * mafptr
Definition: ZtColoredMatrix.H:116
ZCMatixAccess mafunc
Definition: ZtColoredMatrix.H:115