From: Reini U. <ru...@x-...> - 2006-06-26 13:53:13
|
why not Win32::GUI::Region->ExtCreateRegion() and Win32::GUI::Region->GetRegionData() ? Rgn != Region 2006/6/24, Robert May <rm...@po...>: > I just committed 2 new functions for handling windows regions: > > New region method: > my $data = $rgn->GetRgnData(); > wraps the win32 API GetRegionData() function > > New region constructor: > my $newrgn = Win32::GUI::Region->ExtCreateRgn($data); > wraps the win32 API ExtCreateRegion() function > > Tracker 1469648: > https://sourceforge.net/tracker/index.php?func=detail&aid=1469648&group_id=16572&atid=366572 > > As a quick test I did the following: > > #!perl -w > use strict; > use warnings; > > use Win32::GUI(); > > my $mw = Win32::GUI::Window->new( > -title => "Region test", > -size => [400,300], > ); > > $mw->Show(); > my $DC = $mw->GetDC(); > > my $rgn = Win32::GUI::Region->CreateRoundRectRgn(0,0,100,100,50,50); > $DC->InvertRgn($rgn); > > my $rgndata = $rgn->GetRgnData(); > my $newrgn = Win32::GUI::Region->ExtCreateRgn($rgndata); > $newrgn->OffsetRgn(150,150); > $DC->InvertRgn($newrgn); > > > Win32::GUI::Dialog(); > $mw->Hide(); > exit(0); > __END__ > > Regards, > Rob. -- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://spacemovie.mur.at/ http://helsinki.at/ |