Link to home
Start Free TrialLog in
Avatar of hakanwaag
hakanwaag

asked on

Drawing textures

Is there anyway that I can overlay a tileset of a texture I have on a polygonal area drawm earlier in the same code? I want it all done in the background and it should show the texture of my choice on for example everything of RGB(130,90,50).

I would really appreciate any help!
ASKER CERTIFIED SOLUTION
Avatar of KhollAD
KhollAD

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hakanwaag
hakanwaag

ASKER

I like the idea behind this code, however, i didn't get it to work, maybe you could give me some information on how to implement it?
hi hakanwaag,

Sorry if I haven't explained it very well.

But I need to give a idea for what is heappen, Ok ?!

Can you explain more about the problem ?

See u later, Kholl.
I'm sorry that I was so unclear with the problem. After I had posted that message, I was experimenting with the code, hopyfully finding an answer, I found that the code did apply the texture on the texture picture object so i simply copied the texture objects content to my other picture.

Well, now that it works i will give you the points. I'll wait with it a little to give you a chance to say anything, more points or anything. But i will defenitely give you an Excellent! rating.
hi hakanwaag,

I was thinking the code get a error or some like that.

You are right. The TileBackground sub, creates a tileset of your texture using the own texture on PicDest.

After, the TransparentBlt sub makes a hole in the PicSource in whole areas that contains the RGB color that you choose and put this masked picture in PicDest.

If the code works fine for you, I'll appreciate your initials points (200)

Thanks,
Kholl.

Any doubts, send a comment here.
I do not have any doubts, really, and I assure you I will give you the points. But I encounterer a minor problem when trying the same code on a larger picture (2000x1500).

If you don't know what's wrong I will give you the points anyway (I cannot say you don't deserve them when it's me who don't understand it)
I thought i'll simply accept your answer now. You probably haven't got time working on my problems.
Hi hakanwaag,

I could just today work with my computer (I was traveling)  
 
 Firstly thank you for the points.  
 
 I tested the code with a picture like you mentioned (2000x1500) and works fine.  
 
 I need to know which sub doesn't work. TileBackground or TransparentBlt or both?  
 
 Make an individual test for each sub (not forgetting about REFRESH after the test)  
 
      
 Send for me the comment about your results.

I am quite surprised to say that it somehow worked this time. I don't know what I've changed but it worked, so i guess everythings alright now.
Nice !! such things happen in the amazing Microsoft universe.

Sometimes these things happen with me !!

Any problems, talk to me.

See u later,

Kholl.