When Specifying the brush or pen to be used with Graphics.FillPath or Graphics.DrawPath is there a way to have these operations use AND logic? Failing that, can one specify AND-ing for Graphics.DrawImg?
I'm designing a program to create HeightMaps. The 3d engine I'm using specifies a 24 bit BMP for the height map, but only derives it's height information from the red channel. So I'm using the unused space in the blue and green channels to bit-encode additional information into the hieght map. In the VB6 days, you could use an AND operator when painting an image over top of another. Does .Net maintain this capability? I'm using GraphicPaths to allow the user to specify area type information and it would sure speed things up if I could specify AND-ing behavior for .DrawPath and .FillPath. If that is not possible, then I could draw this information to a scratch image then use .DrawImg with AND-ing. Currently, since I was unable to figure out how to do this (I'm still kind of new to .Net) I've been iterating over the image and manually AND-ing the Blue and Green bits. That's turning out to be painfully slow (go figure).
I'm designing a program to create HeightMaps. The 3d engine I'm using specifies a 24 bit BMP for the height map, but only derives it's height information from the red channel. So I'm using the unused space in the blue and green channels to bit-encode additional information into the hieght map. In the VB6 days, you could use an AND operator when painting an image over top of another. Does .Net maintain this capability? I'm using GraphicPaths to allow the user to specify area type information and it would sure speed things up if I could specify AND-ing behavior for .DrawPath and .FillPath. If that is not possible, then I could draw this information to a scratch image then use .DrawImg with AND-ing. Currently, since I was unable to figure out how to do this (I'm still kind of new to .Net) I've been iterating over the image and manually AND-ing the Blue and Green bits. That's turning out to be painfully slow (go figure).
Last edited: