diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-11-24 16:34:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 16:34:01 +0100 |
commit | b1bf82d2b4be775e4d10b571d9c21aa25265b32c (patch) | |
tree | be24406bac67ed5f069a30ce0c11358537f295b8 /core/io/image.h | |
parent | da25843b402e7da87dea935945bbd4a8fc10a1fc (diff) | |
parent | 92ca300ab17faa044b92d753a05a71f892d7bede (diff) | |
download | redot-engine-b1bf82d2b4be775e4d10b571d9c21aa25265b32c.tar.gz |
Merge pull request #52456 from kleonc/image-fill-rect
Diffstat (limited to 'core/io/image.h')
-rw-r--r-- | core/io/image.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/io/image.h b/core/io/image.h index d31a065aa7..9023463b08 100644 --- a/core/io/image.h +++ b/core/io/image.h @@ -190,8 +190,10 @@ private: static int _get_dst_image_size(int p_width, int p_height, Format p_format, int &r_mipmaps, int p_mipmaps = -1, int *r_mm_width = nullptr, int *r_mm_height = nullptr); bool _can_modify(Format p_format) const; - _FORCE_INLINE_ void _put_pixelb(int p_x, int p_y, uint32_t p_pixelsize, uint8_t *p_data, const uint8_t *p_pixel); - _FORCE_INLINE_ void _get_pixelb(int p_x, int p_y, uint32_t p_pixelsize, const uint8_t *p_data, uint8_t *p_pixel); + _FORCE_INLINE_ void _put_pixelb(int p_x, int p_y, uint32_t p_pixel_size, uint8_t *p_data, const uint8_t *p_pixel); + _FORCE_INLINE_ void _get_pixelb(int p_x, int p_y, uint32_t p_pixel_size, const uint8_t *p_data, uint8_t *p_pixel); + + _FORCE_INLINE_ void _repeat_pixel_over_subsequent_memory(uint8_t *p_pixel, int p_pixel_size, int p_count); void _set_data(const Dictionary &p_data); Dictionary _get_data() const; @@ -362,7 +364,8 @@ public: void blit_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, const Rect2 &p_src_rect, const Point2 &p_dest); void blend_rect(const Ref<Image> &p_src, const Rect2 &p_src_rect, const Point2 &p_dest); void blend_rect_mask(const Ref<Image> &p_src, const Ref<Image> &p_mask, const Rect2 &p_src_rect, const Point2 &p_dest); - void fill(const Color &c); + void fill(const Color &p_color); + void fill_rect(const Rect2 &p_rect, const Color &p_color); Rect2 get_used_rect() const; Ref<Image> get_rect(const Rect2 &p_area) const; |