Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!feeder1-1.proxad.net!proxad.net!feeder1-2.proxad.net!74.125.46.80.MISMATCH!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: 88888 Dihedral Newsgroups: comp.lang.pascal.delphi.misc Subject: Re: How to clear transparent Canvas? Date: Tue, 27 Dec 2011 12:20:29 -0800 (PST) Organization: http://groups.google.com Lines: 53 Message-ID: <21491746.601.1325017230000.JavaMail.geo-discussion-forums@prmu8> References: <4ef8a45d$0$1200$65785112@news.neostrada.pl> <4ef8f5cd$0$1208$65785112@news.neostrada.pl> Reply-To: comp.lang.pascal.delphi.misc@googlegroups.com NNTP-Posting-Host: 1.168.132.181 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1325017230 1245 127.0.0.1 (27 Dec 2011 20:20:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 27 Dec 2011 20:20:30 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=1.168.132.181; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.pascal.delphi.misc:136 Jamie=E6=96=BC 2011=E5=B9=B412=E6=9C=8827=E6=97=A5=E6=98=9F=E6=9C=9F=E4=BA= =8CUTC+8=E4=B8=8A=E5=8D=8810=E6=99=8227=E5=88=8652=E7=A7=92=E5=AF=AB=E9=81= =93=EF=BC=9A > aaaa wrote: > > I know that and I wonder how to do this most efficiently. > >=20 > > When I do: > > MyComponent.Visible :=3D False; > > MyComponent.Visible :=3D True; > > everything that is behind my component gets repainted and then my=20 > > component's Paint() method gets called and everything looks great. > > And my component is transparent because I can see the labels and other= =20 > > controls placed behind it. > >=20 > > The thing is- what exactly is this "Visible" doing...? > >=20 > > The idea of saving the snapshop as TBitmap is nice- I think it should= =20 > > make "clearing" faster. After all nothing will change behind my=20 > > component as long as it is Focused and when it looses Focus I can resav= e=20 > > the snapshop. > >=20 > > How to get the snapshop in the best way? Should I iterate all controls= =20 > > of my component's parent and invoke their WM_PAINT somehow onto my=20 > > snapshot's TBitmap? Or is there any easier way? > >=20 > > Best regards, > > A > You could wedge into the Paint Method of each control but wouldn't > be easier to simply create a control of your own that will do this for yo= u? > You simply start with an existing control and build on that. >=20 > Its not clear exactly what you're trying to do yet.. >=20 > P.S. >=20 > If you have not made a control yet, maybe this is a good time to > learn. >=20 > Jamie In Delphie the object in the display image of a Window is different=20 from the image.scanline[j] as far as I know.=20 The container and the content are separate objects to be programmed=20 by the programmer.=20