Picshow Overdraw Problem

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

Picshow Overdraw Problem

Postby Cylence » January 17th, 2008, 1:56 pm

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
Cylence
Member
Member
 
Posts: 3
Joined: January 17th, 2008, 1:48 pm

Postby Kambiz » January 19th, 2008, 10:26 am

This behavior is by intention, sorry.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Cylence » January 22nd, 2008, 7:31 am

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?
Cylence
Member
Member
 
Posts: 3
Joined: January 17th, 2008, 1:48 pm

Postby Kambiz » January 22nd, 2008, 2:20 pm

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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm

Postby Cylence » January 23rd, 2008, 8:00 am

Cool Thanx I will try this! Thank You very much!!!
Cylence
Member
Member
 
Posts: 3
Joined: January 17th, 2008, 1:48 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron