mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: add the gg.Context.remove_cached_image_by_idx() method (#13206)
This commit is contained in:
@ -38,6 +38,10 @@ pub fn (mut ctx Context) get_cached_image_by_idx(image_idx int) &Image {
|
||||
return &ctx.image_cache[image_idx]
|
||||
}
|
||||
|
||||
pub fn (mut ctx Context) remove_cached_image_by_idx(image_idx int) {
|
||||
ctx.image_cache.delete(image_idx)
|
||||
}
|
||||
|
||||
// Draw part of an image using uv coordinates
|
||||
// img_rect is the size and position (in pixels on screen) of the displayed rectangle (ie the draw_image args)
|
||||
// part_rect is the size and position (in absolute pixels in the image) of the wanted part
|
||||
|
Reference in New Issue
Block a user