diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-23 21:16:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-23 21:24:49 +0300 |
commit | 1287fa3f7c5a0dc4484aa7e94267d21cc8b0b1f0 (patch) | |
tree | 20ab632c21b31b5994481978a2e8f1d8d44f0558 /source/blender/blenkernel/BKE_icons.h | |
parent | 20105fc8454a34c342f0f5500497c4452ec2b7ee (diff) |
UI: option to load icon from file
Diffstat (limited to 'source/blender/blenkernel/BKE_icons.h')
-rw-r--r-- | source/blender/blenkernel/BKE_icons.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index fb40e5be281..ffcbd231524 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -65,8 +65,11 @@ struct Icon { struct Icon_Geom { int icon_id; int coords_len; + int coords_range[2]; const unsigned char (*coords)[2]; const unsigned char (*colors)[4]; + /* when not NULL, the memory of coords and colors is a sub-region of this pointer. */ + const void *mem; }; typedef struct Icon Icon; @@ -84,8 +87,6 @@ int BKE_icon_id_ensure(struct ID *id); int BKE_icon_preview_ensure(struct ID *id, struct PreviewImage *preview); -int BKE_icon_geom_ensure(struct Icon_Geom *geom); - /* retrieve icon for id */ struct Icon *BKE_icon_get(const int icon_id); @@ -149,6 +150,9 @@ struct PreviewImage *BKE_previewimg_cached_thumbnail_read( void BKE_previewimg_cached_release(const char *name); void BKE_previewimg_cached_release_pointer(struct PreviewImage *prv); +int BKE_icon_geom_ensure(struct Icon_Geom *geom); +struct Icon_Geom *BKE_icon_geom_from_file(const char *filename); + struct ImBuf *BKE_icon_geom_rasterize( const struct Icon_Geom *geom, const unsigned int size_x, const unsigned int size_y); |