For instance, I'm applying filters to large bitmaps. At the moment it works on a Timer, but I'd like to wait until any processing's been completed and progress to the next iteration at that point, instead of forcing it when the next tick comes around.
例如,我正在将过滤器应用于大型位图。目前它适用于Timer,但是我想等到任何处理完成并进入下一次迭代,而不是在下一个时钟周期时强制执行。
Pretty sure this can't be done. Anyone?
很确定无法做到这一点。任何人?
3 个解决方案
#1
0
BitmapFilter
, the super class of all filters, doesn't extend from EventDispatcher
class nor does it implement IEventDispatcher
interface. So no, filters don't dispatch events.
BitmapFilter是所有过滤器的超类,不会从EventDispatcher类扩展,也不会实现IEventDispatcher接口。所以不,过滤器不会调度事件。
#2
0
Filters are called synchronously so there's no event to wait for, it's done once the next line of code is executed.
过滤器是同步调用的,所以没有等待的事件,一旦执行下一行代码就完成了。
#3
0
grapefrukt: well, usually, but applying a glow or blur to a massive bitmap with transparent bits can take ages. So while it's still technically synchronous, I wanted to wait till it was done before doing the next bit.
grapefrukt:通常,但是对于带有透明位的大型位图应用发光或模糊可能需要很长时间。因此,虽然它在技术上仍然是同步的,但我还是要等到它完成之后才进行下一步。
Didn't think it could be done, but thought it was worth a shot! Cheers.
没想到可以做到,但认为值得一试!干杯。
#1
0
BitmapFilter
, the super class of all filters, doesn't extend from EventDispatcher
class nor does it implement IEventDispatcher
interface. So no, filters don't dispatch events.
BitmapFilter是所有过滤器的超类,不会从EventDispatcher类扩展,也不会实现IEventDispatcher接口。所以不,过滤器不会调度事件。
#2
0
Filters are called synchronously so there's no event to wait for, it's done once the next line of code is executed.
过滤器是同步调用的,所以没有等待的事件,一旦执行下一行代码就完成了。
#3
0
grapefrukt: well, usually, but applying a glow or blur to a massive bitmap with transparent bits can take ages. So while it's still technically synchronous, I wanted to wait till it was done before doing the next bit.
grapefrukt:通常,但是对于带有透明位的大型位图应用发光或模糊可能需要很长时间。因此,虽然它在技术上仍然是同步的,但我还是要等到它完成之后才进行下一步。
Didn't think it could be done, but thought it was worth a shot! Cheers.
没想到可以做到,但认为值得一试!干杯。