mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Use fill() to fill an entire image instead of setting pixels individually.
This commit is contained in:
parent
c09c4e0154
commit
c9f5d88f3a
6 changed files with 9 additions and 43 deletions
|
|
@ -803,11 +803,8 @@ Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, cons
|
|||
im.create(thumbnail_size, thumbnail_size / 2, false, Image::FORMAT_RGBA8);
|
||||
|
||||
Color bg_color(0.1, 0.1, 0.1, 1.0);
|
||||
for (int i = 0; i < thumbnail_size; i++) {
|
||||
for (int j = 0; j < thumbnail_size / 2; j++) {
|
||||
im.set_pixel(i, j, bg_color);
|
||||
}
|
||||
}
|
||||
|
||||
im.fill(bg_color);
|
||||
|
||||
Color line_color(0.8, 0.8, 0.8, 1.0);
|
||||
float range_y = curve.get_max_value() - curve.get_min_value();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue