Patch level : 12.0 1070
Files correlati : ba8.exe Commento : Migliorato disegno sfondo generazione report
This commit is contained in:
parent
94d0d2311b
commit
463374db35
@ -2067,26 +2067,34 @@ void TReport_window::draw_field(const TReport_field& rf)
|
|||||||
void TReport_window::draw_bg()
|
void TReport_window::draw_bg()
|
||||||
{
|
{
|
||||||
const TReport_section& rs = curr_section();
|
const TReport_section& rs = curr_section();
|
||||||
|
|
||||||
if (_draw_bg && (rs.level() > 0 || rs.type() != 'B'))
|
if (_draw_bg && (rs.level() > 0 || rs.type() != 'B'))
|
||||||
{
|
{
|
||||||
const TReport_section* back = _report->find_section('B', 0);
|
const TReport_section* back = _report->find_section('B', 0);
|
||||||
|
|
||||||
if (back != NULL && back->items() > 0)
|
if (back != NULL && back->items() > 0)
|
||||||
{
|
{
|
||||||
int offset_y = 0;
|
int offset_y = 0;
|
||||||
if (rs.type() == 'F')
|
|
||||||
|
if (rs.type() == 'F' && rs.height() > 0)
|
||||||
|
offset_y = printer().formlen() - (rs.height() / 100);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
offset_y = back->height() - rs.height();
|
if (rs.pos_y() > 0)
|
||||||
}
|
offset_y = rs.pos_y() / 100;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const int lev = rs.type() == 'B' ? _report->find_max_level('H') : rs.level() -1 ;
|
const int lev = rs.type() == 'B' ? _report->find_max_level('H') : rs.level() -1 ;
|
||||||
for (int i = lev; i > 0; i--)
|
|
||||||
|
for (int i = lev; i >= 0; i--)
|
||||||
{
|
{
|
||||||
const TReport_section* h = _report->find_section('H', i);
|
const TReport_section* h = _report->find_section('H', i);
|
||||||
if (h != NULL)
|
if (h != nullptr)
|
||||||
offset_y += h->compute_size().y/100;
|
offset_y += (h->compute_size().y / 100) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
update_thumb(origin().x, origin().y + offset_y);
|
update_thumb(origin().x, origin().y + offset_y);
|
||||||
for (int i = 0; i < back->items(); i++)
|
for (int i = 0; i < back->items(); i++)
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
#include <report.h>
|
#include <report.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __PRINTER_H
|
||||||
|
#include <printer.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TReport_tree
|
// TReport_tree
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
@ -251,6 +251,8 @@ public:
|
|||||||
|
|
||||||
int width() const { return _size.x; }
|
int width() const { return _size.x; }
|
||||||
int height() const { return _size.y; }
|
int height() const { return _size.y; }
|
||||||
|
int pos_x() const { return _pos.x; }
|
||||||
|
int pos_y() const { return _pos.y; }
|
||||||
void set_width(short w) { _size.x = w; }
|
void set_width(short w) { _size.x = w; }
|
||||||
void set_height(short h) { _size.y = h; }
|
void set_height(short h) { _size.y = h; }
|
||||||
const TReport_size& size() const { return _size; }
|
const TReport_size& size() const { return _size; }
|
||||||
@ -259,6 +261,8 @@ public:
|
|||||||
const TReport_pnt& pos() const { return _pos; }
|
const TReport_pnt& pos() const { return _pos; }
|
||||||
void set_pos(const TReport_pnt& p) { _pos = p; }
|
void set_pos(const TReport_pnt& p) { _pos = p; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void set_fore_color(COLOR c) { _fgcolor = c; }
|
void set_fore_color(COLOR c) { _fgcolor = c; }
|
||||||
COLOR fore_color() const { return _fgcolor; }
|
COLOR fore_color() const { return _fgcolor; }
|
||||||
void set_back_color(COLOR c) { _bgcolor = c; }
|
void set_back_color(COLOR c) { _bgcolor = c; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user