UIBufferedElementRaw

Extending the UIElement with an owned drawing buffer. This is intended to have easier dirtyrect-compliant widgets. Also caches expensive drawing, but it's not free at all.

No less than three additional opacity channels must be filled to be able to blend the widgets explicitely. The semantic of the opacity channels are: opacity left at 0 => pixel untouched opacity > 0 => pixel is touched, blending will occur

Constructors

this
this(UIContext context, uint flags)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

doNotClearBuffers
void doNotClearBuffers()

Does not initialize buffers. onDrawBufferedRaw will be returned the same content, unless the buffer size has changed. This is needed for widgets might want their own Raw and Opacity buffer to stay unchanged, if their size didn't change. This is typically an optimization.

onDrawBufferedRaw
void onDrawBufferedRaw(ImageRef!RGBA rawMap, ImageRef!L8 opacity)

Redraws the whole widget without consideration for drawing only in dirty rects.

onDrawRaw
void onDrawRaw(ImageRef!RGBA rawMap, box2i[] dirtyRects)
Undocumented in source. Be warned that the author may not have intended to support it.
setDirty
void setDirty(box2i rect, UILayer layer)
Undocumented in source. Be warned that the author may not have intended to support it.
setDirtyWhole
void setDirtyWhole(UILayer layer)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta