2024-01-19 08:54:58 +00:00
|
|
|
// parameters of CIS
|
|
|
|
//
|
|
|
|
// Date: 2024-01-19
|
|
|
|
#pragma once
|
2024-02-22 02:31:24 +00:00
|
|
|
#include <vector>
|
2024-01-19 08:54:58 +00:00
|
|
|
|
2024-02-21 09:44:32 +00:00
|
|
|
#define CIS_SECTOR_COUNT 6 // how many sectors of ONE CIS
|
|
|
|
#define CIS_CORRECT_DATA_PATH "/usr/local/huago2/"
|
2024-01-19 08:54:58 +00:00
|
|
|
|
|
|
|
|
2024-02-21 09:44:32 +00:00
|
|
|
class gb_json;
|
|
|
|
|
2024-01-19 08:54:58 +00:00
|
|
|
namespace cis
|
|
|
|
{
|
2024-02-22 02:31:24 +00:00
|
|
|
std::vector<int> get_fixed_resolution(void);
|
|
|
|
|
2024-01-19 08:54:58 +00:00
|
|
|
// Function: how many pixels one sector generated
|
|
|
|
//
|
|
|
|
// Parameter: sec_num - sector index, from Zero to CIS_SECTOR_COUNT - 1
|
|
|
|
//
|
|
|
|
// dpi - this sector or CIS resolution
|
|
|
|
//
|
|
|
|
// side - true: front, false: back
|
|
|
|
int get_sector_pixels(int sec_num, int dpi, bool side);
|
|
|
|
|
|
|
|
// Function: get pixels for ONE scan line
|
|
|
|
//
|
|
|
|
// Parameter: dpi - this sector or CIS resolution
|
|
|
|
//
|
|
|
|
// color - true: color, false: gray
|
|
|
|
int get_line_stream_length(int dpi, bool color);
|
2024-02-21 09:44:32 +00:00
|
|
|
|
|
|
|
// Function: update correct data
|
|
|
|
//
|
|
|
|
// Parameter: init_dpi - default DPI
|
|
|
|
//
|
|
|
|
// init_clr - default color mode, true: color; false: gray
|
|
|
|
//
|
|
|
|
// force - ignore file time and force update
|
|
|
|
void update_correct_data(int init_dpi = 200, bool init_clr = true, bool force = false);
|
|
|
|
|
|
|
|
void load_correct_data_to_json(gb_json* jsn);
|
2024-01-19 08:54:58 +00:00
|
|
|
};
|