Board index » delphi » Flip a part of a canvas with Bitblt

Flip a part of a canvas with Bitblt

Hello,

I would like to flip the content of a window with bitblt, is it possible?

thanks

Armindo

 

Re:Flip a part of a canvas with Bitblt


You can do it with StretchBlt.

procedure TForm1.Button1Click(Sender: TObject);
var
  dc: HDC;
begin
  dc := GetWindowDC(GetDesktopWindow);
  StretchBlt(dc, 0, 0, Screen.Width, Screen.Height, dc, Screen.Width-1,
Screen.Height-1, -Screen.Width, -Screen.Height, SRCCOPY);
  ReleaseDC(GetDesktopWindow, dc);
end;
--
Finn Tolderlund

Quote
"ADS" <goa...@spammerboy.com> wrote in message

news:3e2bc6af@newsgroups.borland.com...
Quote
> I would like to flip the content of a window with bitblt, is it possible?

Re:Flip a part of a canvas with Bitblt


Thanks Finn

Quote
> You can do it with StretchBlt.

> procedure TForm1.Button1Click(Sender: TObject);
> var
>   dc: HDC;
> begin
>   dc := GetWindowDC(GetDesktopWindow);
>   StretchBlt(dc, 0, 0, Screen.Width, Screen.Height, dc, Screen.Width-1,
> Screen.Height-1, -Screen.Width, -Screen.Height, SRCCOPY);
>   ReleaseDC(GetDesktopWindow, dc);
> end;
> --
> Finn Tolderlund

> "ADS" <goa...@spammerboy.com> wrote in message
> news:3e2bc6af@newsgroups.borland.com...
> > I would like to flip the content of a window with bitblt, is it
possible?

Re:Flip a part of a canvas with Bitblt


Hi

    Yes, but not with BitBlt. Use StretchBlt where destination width is
negative.

Tomaz

Quote
"ADS" <goa...@spammerboy.com> wrote in message

news:3e2bc6af@newsgroups.borland.com...
Quote
> Hello,

> I would like to flip the content of a window with bitblt, is it possible?

> thanks

> Armindo

Other Threads