Sign in to follow this  

Color fill is not working

This topic is 4486 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

VB.NET using DX9. I have the following code:
        Dim oRect As Rectangle = New Rectangle(Left, Top, Width, Height)
        Dim oTmpSurf As Surface = oDevice.GetRenderTarget(0)
        oDevice.ColorFill(oTmpSurf, oRect, System.Drawing.Color.FromArgb(255, 64, 128, 192))

The code breaks on Colorfill saying that I have an invalid call... any ideas why? I checked oTmpSurf in the debugger and it is coming back as a Default pool object. Thanks in advance.

Share this post


Link to post
Share on other sites
Have you tried running your application with the debug runtimes? they are usually pretty good at giving you good information as to what/why things are exploding [grin]

Have a look at the link in my signiture if you haven't used the debug runtimes before...

hth
Jack

Share this post


Link to post
Share on other sites
No, found the problem. When I went to check the surface I was writing a message to your reply (thanks for the reply btw). The surface was 608x800 or something like that because I was running in windowed mode. The rectangle defined an area beyond those dimensions... namely 100x100 for x,y and 600x600 for width and height.

So... got that fixed.

Share this post


Link to post
Share on other sites

This topic is 4486 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this