Re: Clip area of a canvas...
Ian Bell <[email protected]> Fri, 7 Feb 2003 20:44:51 +0000
| Newsgroups | gmane.comp.lang.delphi.kylix |
|---|---|
| Message-ID | <[email protected]> |
On Friday 07 Feb 2003 5:38 pm, Alberto Narduzzi wrote: > Hello... > > after a looong time reading, time has come for me to write something with > Kylix. Wll, actually porting a project form Delphi 5 to Kylix 3 OE. > > Problem: > > under Windows I used to write something like the following, to set a > clipping area on a tcanvas, so that nothing would be drawn outside the > bounds: > > ClipRgn:=CreateRectRgn(FViewPortRect.Left, FViewPortRect.Top, > FViewPortRect.Right+1, FViewPortRect.Bottom+1); > > SelectClipRgn(ImgScreen.Canvas.Handle, ClipRgn); > > but with Kylix such functions don't exist. So my question is: how do I > "translate" the above code to gain the same result with Kylix? (provided I > already tried to use some QTsomething... and QRegionH in place of HRGN with > no results) Use the SetClipRect method of TCanvas Ian ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/i7folB/TM ---------------------------------------------------------------------~-> ------------------------------------------------------- Forum / mailing list for Borland Kylix programmers Our web page: http://groups.yahoo.com/group/kylixgroup To join the forum: [email protected] To unsubscribe: [email protected] To post your messages: [email protected] To contact the moderator: [email protected] ------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/