Corretta gestione colori e files di editing e posizione bitmap
git-svn-id: svn://10.65.10.50/trunk@3302 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3158f1bcfb
commit
51673fd6cd
14
ba/ba0.cpp
14
ba/ba0.cpp
@ -53,10 +53,18 @@ void TPicture_mask::update()
|
||||
{
|
||||
if (_image.ok())
|
||||
{
|
||||
RCT cli; fld(1).get_rect(cli);
|
||||
RCT cli; field(101).get_rect(cli);
|
||||
const int topx = cli.left;
|
||||
|
||||
field(DLG_USER).get_rect(cli);
|
||||
const int topy = cli.top;
|
||||
|
||||
const double ratiox = double(topx) / _image.width();
|
||||
const double ratioy = double(topy) / _image.height();
|
||||
const double ratio = min(ratiox, ratioy);
|
||||
const int maxx = int(ratio * _image.width());
|
||||
const int maxy = int(ratio * _image.height());
|
||||
|
||||
const short maxx = cli.left;
|
||||
const short maxy = short((long)maxx*_image.height()/_image.width());
|
||||
RCT dst; xvt_rect_set(&dst, 1, 1, maxx, maxy);
|
||||
|
||||
if (xvt_dwin_is_update_needed(win(), &dst))
|
||||
|
Loading…
x
Reference in New Issue
Block a user