[Gambas-user] gb3: DrawAlpha
kevinfishburne at ...1887...
Tue Jul 5 04:39:11 CEST 2011
Since DrawImage just copies the RGBA channels and PaintImage blends the
channels using the alpha channel, I'm assuming that DrawAlpha copies
(but does not blend) the alpha channel. Is that the case?
If so then it follows there should be a PaintAlpha, which blends one
alpha channel into another rather than overwriting it. Or maybe there's
a workaround that I haven't thought of.
What I'm trying to do is this:
1) Create a landscape image
2) Create a solar lighting image
3) Create an object lighting image
4) Composite them
The landscape image is just the landscape with no lighting. The solar
lighting image is RGBA and reflects the solar light level and color tint
applied to the landscape image. The object lighting image is pure alpha
and is generated by whatever non-solar light sources are in the scene
(fire, generally). It should modify only the solar lighting image
(blending its alpha channel), which is then drawn on top of the
landscape image via PaintImage. This will allow the landscape to be
colored and darkened by the solar lighting image, which has had "holes"
made in it by the object lighting image.
Is any of this possible? I've been thinking about it for about a week
and have just started to implement code to experiment. I also have some
gut feeling that I may need to invert an alpha channel to accomplish
this, but there's no evidence to support that yet. Any thoughts are
appreciated as always.
e-mail: sales at ...1887...
phone: (770) 853-6271
More information about the User