Page 1 of 1

Picshow Overdraw Problem

PostPosted: January 17th, 2008, 1:56 pm
by Cylence
Hi,

i want to use TPicshow Component... when i add pictures that dont have the same size...then the overdraw effect cant be enabled, the picture will be erased and then the new picture slides in... are i am doing anything wrong?
Ive set Proportional and Stretch and Overdraw to TRUE. But Overdraw always only possible when pics have same pixel-size...

i hope i am doing anything wrong :-)

or anybody can help me

Thanx

Cylence

PostPosted: January 19th, 2008, 10:26 am
by Kambiz
This behavior is by intention, sorry.

PostPosted: January 22nd, 2008, 7:31 am
by Cylence
Ok, but what can i do? Do i have to Resiza all Pictures to the same Size? And how can i Resize Pictures without loosing aspect ratio? Can you help?

PostPosted: January 22nd, 2008, 2:20 pm
by Kambiz
Use the following function to calculate the proportinal size of the scaled image.

Code: Select all
function ProportialScale(iW, iH, rW, rH): TSize;
begin
  if (rW / iW) < (rH / iH) then
  begin
    Result.cy := MulDiv(iH, rW, iW);
    Result.cx := rW;
  end
  else
  begin
    Result.cx := MulDiv(iW, rH, iH);
    Result.cy := rH;
  end;
end;


iW and iH are the image size, and rW and rH are the maximum requested size.

PostPosted: January 23rd, 2008, 8:00 am
by Cylence
Cool Thanx I will try this! Thank You very much!!!