setWindowRegion(w, hrgn);
}
protected void setMask(final Component w, final Raster raster) {
GDI32 gdi = GDI32.INSTANCE;
final HRGN region = raster != null
? gdi.CreateRectRgn(0, 0, 0, 0) : null;
if (region != null) {
final HRGN tempRgn = gdi.CreateRectRgn(0, 0, 0, 0);
try {
RasterRangesUtils.outputOccupiedRanges(raster, new RasterRangesUtils.RangesOutput() {
public boolean outputRange(int x, int y, int w, int h) {
GDI32 gdi = GDI32.INSTANCE;
gdi.SetRectRgn(tempRgn, x, y, x + w, y + h);