🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.delphi.graphics
13 messages
13 total messages Started by David HAROUCHE Wed, 23 Jul 2008 15:55
transparent bitmap
#141
Author: David HAROUCHE
Date: Wed, 23 Jul 2008 15:55
6 lines
933 bytes
I'm trying to display successive rotated transparent bitmap on a TPaintBox, 
and that leaves traces...

How not to...?

DH 
Re: transparent bitmap
#142
Author: GrandmasterB
Date: Wed, 23 Jul 2008 18:16
6 lines
1165 bytes
"David HAROUCHE" <metanil@hotmail.com> wrote in message 
news:48875484$1@newsgroups.borland.com...
> I'm trying to display successive rotated transparent bitmap on a 
> TPaintBox, and that leaves traces...

It leaves traces?  Do you mean like fingerprints and DNA evidence?
Re: transparent bitmap
#145
Author: David HAROUCHE
Date: Wed, 23 Jul 2008 19:22
9 lines
1174 bytes
Yes, Scotland Yard just went out after my call and they say they just don't 
understand...

Sherlock Holmes is now on the stage : refreshing the TPaintBox. after a 
canvas.Draw with a modified bitmap leaves some foot prints...

Should I take a snapshot of what is under ...?

DH 
Re: transparent bitmap
#147
Author: Pieter Zijlstra
Date: Wed, 23 Jul 2008 19:55
18 lines
1747 bytes
GrandmasterB wrote:

> "David HAROUCHE" <metanil@hotmail.com> wrote in message
> news:48878507@newsgroups.borland.com...
> > Sherlock Holmes is now on the stage : refreshing the TPaintBox.
> > after a  canvas.Draw with a modified bitmap leaves some foot
> > prints...
> > 
> > Should I take a snapshot of what is under ...?
> 
> It's elementary, my dear Watson... clear the canvas before you do the
> paint. Then no evidence will be left behind.

Dear Sherlock, you really don't get it, do you. He wants to be caught
and therefor leave some traces behind. ;-)

-- 
Pieter
Re: transparent bitmap
#146
Author: GrandmasterB
Date: Wed, 23 Jul 2008 20:48
9 lines
1369 bytes
"David HAROUCHE" <metanil@hotmail.com> wrote in message 
news:48878507@newsgroups.borland.com...
> Sherlock Holmes is now on the stage : refreshing the TPaintBox. after a 
> canvas.Draw with a modified bitmap leaves some foot prints...
>
> Should I take a snapshot of what is under ...?

It's elementary, my dear Watson... clear the canvas before you do the paint. 
Then no evidence will be left behind.
Re: transparent bitmap
#148
Author: Nils Haeck
Date: Wed, 23 Jul 2008 20:54
15 lines
1305 bytes
It looks like your algorithm to transform (rotate) the bitmap doesn't set 
all destination pixels correctly. You might look at that. Graphics32 has 
some good code.

Nils

"David HAROUCHE" <metanil@hotmail.com> schreef in bericht 
news:48875484$1@newsgroups.borland.com...
> I'm trying to display successive rotated transparent bitmap on a 
> TPaintBox, and that leaves traces...
>
> How not to...?
>
> DH
> 
Re: transparent bitmap
#149
Author: David HAROUCHE
Date: Wed, 23 Jul 2008 21:50
9 lines
1294 bytes
>> Clear the canvas before you do the paint.
Clearing ?

how ?

>> Then no evidence will be left behind.
Did you engaged Alfred Hitchcock  ?

DH 
Re: transparent bitmap
#150
Author: David HAROUCHE
Date: Wed, 23 Jul 2008 21:53
11 lines
1374 bytes
>> It looks like your algorithm to transform (rotate) the >>bitmap doesn't 
>> set all destination pixels correctly.
No, it works fine, and leaves "transparent" pixels as it should...

The problem is that if I draw the bitmap on the Canvas (bitmap;transparent 
is set to true) firs as it is, then rotated, the transparency dosent apply 
correctly on a transparent TForm :

the form's background is a snapshot of what it was before under the  form...

DH 
Re: transparent bitmap
#153
Author: GrandmasterB
Date: Thu, 24 Jul 2008 18:48
9 lines
1480 bytes
"David HAROUCHE" <metanil@hotmail.com> wrote in message 
news:4887a7a0@newsgroups.borland.com...
>>> Clear the canvas before you do the paint.
> Clearing ?
> how ?

Its going to depend on what it is you are specifically doing.  But in 
general, draw a rectangle over the canvas with the background color.  Then 
draw your background image.  Then draw your bitmap rotated at its new angle.
Re: transparent bitmap
#167
Author: David HAROUCHE
Date: Fri, 25 Jul 2008 13:42
15 lines
1736 bytes
>> Its going to depend on what it is you are specifically doing.
I just try to use bitmap.Transparent efficiently when I draw successives 
images on a TPaintBox located on a TForm that is Transparent...!!!

>>But in general, draw a rectangle
You surely mean canvas.FillRect !

>>Then draw your background image.
Thats' where I think about a snapshot of the desktop of what is under the 
TPaintBox...! But what if a change occurs on the desktop ?

>> Then draw your bitmap rotated at its new angle.
That causes more flickers on screen...

DH 
Re: transparent bitmap
#173
Author: GrandmasterB
Date: Fri, 25 Jul 2008 20:08
17 lines
1791 bytes
"David HAROUCHE" <metanil@hotmail.com> wrote in message 
news:4889d858@newsgroups.borland.com...
>>>But in general, draw a rectangle
> You surely mean canvas.FillRect !

No - I mean what I say, and say what I mean!

And what I mean is draw a rectangle over the background, regardless of what 
graphics interface you are using.  If you are using vcl drawing routines, 
then fillrect will do.  I personally dont use the vcl routines much, so am 
more likely to use native gdi calls or gdi+ methods.

>>> Then draw your bitmap rotated at its new angle.
> That causes more flickers on screen...

Then it sounds to me your real problem is flickering.  I would focus on 
fixing that.
Re: transparent bitmap
#175
Author: David HAROUCHE
Date: Fri, 25 Jul 2008 20:12
6 lines
1234 bytes
>> Then it sounds to me your real problem is flickering.
I started another thread...

;)

DH 
Re: transparent bitmap
#330
Author: Doug Eilertson
Date: Mon, 19 Oct 2009 16:43
12 lines
1408 bytes
Wrong name for a dumb ass.
"GrandmasterB" <Fizzle@shizzle.com> wrote in message 
news:488767e5$1@newsgroups.borland.com...
> "David HAROUCHE" <metanil@hotmail.com> wrote in message 
> news:48875484$1@newsgroups.borland.com...
>> I'm trying to display successive rotated transparent bitmap on a 
>> TPaintBox, and that leaves traces...
>
> It leaves traces?  Do you mean like fingerprints and DNA evidence?
>
>
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads