I
illegal.prime
Hi all, I'm looking for the right way to create a checkered background
in a PictureBox. I will be applying various images to this PictureBox
and I want to to see the checkered background based on the level of
alpha in the image.
I have an algorithm that will traverse a bitmap's pixel and on a pixel
by pixel basis determine the alpha of the image. But my problem is
where to put this algorithm. If I put it in here:
protected override void OnPaintBackground(PaintEventArgs pevent)
it seems to just constantly be invoked whether or not anything is being
done to the image. It may be that the very assignment I'm doing inside
this method is causing it to be reinvoked - i.e. I assign to this.Image
inside this method. Though if that were the case, I would expect the
call stack to grow as time progressed, but it never does.
Any hints as to how to integrate this code into a class that extends
PictureBox? A URL where someone else has done this would also be
useful.
Thanks,
Novice
in a PictureBox. I will be applying various images to this PictureBox
and I want to to see the checkered background based on the level of
alpha in the image.
I have an algorithm that will traverse a bitmap's pixel and on a pixel
by pixel basis determine the alpha of the image. But my problem is
where to put this algorithm. If I put it in here:
protected override void OnPaintBackground(PaintEventArgs pevent)
it seems to just constantly be invoked whether or not anything is being
done to the image. It may be that the very assignment I'm doing inside
this method is causing it to be reinvoked - i.e. I assign to this.Image
inside this method. Though if that were the case, I would expect the
call stack to grow as time progressed, but it never does.
Any hints as to how to integrate this code into a class that extends
PictureBox? A URL where someone else has done this would also be
useful.
Thanks,
Novice