You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Use fill() to fill an entire image instead of setting pixels individually.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user