class WrapCache public
A cache that stores the results of WrapStream. Utiltiy methods are provided to quickly fetch a subset of tokens Based on a given window's coordinates (canvas)
#<<(token) public
Adds a token
Arguments
- token - Hokusai::Util::Wrapped
Returns
Returns nothing
#selected_area_for_tokens(target_tokens, selector, &block) public
Populate the selection positions from geometry and yield selection areas
Arguments
- target_tokens - an Array(Hokusai::Util::Wrapped)
- selector - a Hokusai::Util::Selection
- block - a callback which takes a param of Hokusai::Rect
Returns
Returns nothing
#tokens_for(canvas) public
Get cached tokens for a given Hokusai::Canvas
Arguments
- canvas - a Hokusai::Canvas
Returns
Return Array(Hokusai::Util::Wrapped)