Functions
new
new(width, height, model?) -> int<collection.CRATE_CACHEDIMAGE>
- width
int - height
int - model
int<image.ColorModel>
int<collection.CRATE_CACHEDIMAGE>
new_filled
new_filled(width, height, color, model?) -> int<collection.CRATE_CACHEDIMAGE>
- width
int - height
int - color
struct<image.Color> - model
int<image.ColorModel>
int<collection.CRATE_CACHEDIMAGE>
new_random
new_random(width, height, enableAlpha?, model?) -> int<collection.CRATE_CACHEDIMAGE>
- width
int - height
int - enableAlpha
bool - model
int<image.ColorModel>
int<collection.CRATE_CACHEDIMAGE>
new_empty
new_empty() -> int<collection.CRATE_CACHEDIMAGE>
Sets the cached image to a 1px by 1px gray image.
int<collection.CRATE_CACHEDIMAGE>
store
store(id, nocopy?) -> int<collection.CRATE_CACHEDIMAGE>
@blocking
This stores an image in non-accessable storage. This allows the original image item to be reused without losing the image data. Cached images do not have a log file, and do not have a goroutine for scheduling.
- id
int<collection.IMAGE>- ID of the image to cache. - nocopy
bool
int<collection.CRATE_CACHEDIMAGE>
store_into
store_into(cid, id, nocopy?)
@blocking
This stores an image in non-accessable storage. This allows the original image item to be reused without losing the image data. Cached images do not have a log file, and do not have a goroutine for scheduling.
- id
int<collection.IMAGE>- ID of the image to cache. - cid
int<collection.CRATE_CACHEDIMAGE>- Preexisting cache item to store the image into. - nocopy
bool
retrieve
retrieve(cid, id, nocopy?)
@blocking
This keeps the encoding and name of the image item.
- cid
int<collection.CRATE_CACHEDIMAGE>- ID of the image to retrieve from the cache. - id
int<collection.IMAGE>- ID of the image item to move the cached image into. - nocopy
bool
retrieve_ext
retrieve_ext(cid, id, name, encoding, nocopy?)
@blocking
- cid
int<collection.CRATE_CACHEDIMAGE>- ID of the image to retrieve from the cache. - id
int<collection.IMAGE>- ID of the image item to move the cached image into. - name
string - encoding
int<image.Encoding> - nocopy
bool
remove
remove(id)
After this, the cached image cannot be used.
- id
int<collection.CRATE_CACHEDIMAGE>- ID of the cached image to clean.
empty
empty(id)
Sets the cached image to a 1px by 1px gray image.
- id
int<collection.CRATE_CACHEDIMAGE>- ID of the cached image to set to an empty image.