mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Improve API for C++ TargetPixelBuffer::draw_texture's blending color
This commit is contained in:
parent
b896cc394b
commit
f6d61c1b09
1 changed files with 8 additions and 6 deletions
|
@ -595,8 +595,8 @@ struct TargetPixelBuffer
|
|||
/// the texture if it's unclipped. Each pixel of the texture is to be blended with the given
|
||||
/// colorize color as well as the alpha value.
|
||||
virtual bool draw_texture(int16_t x, int16_t y, int16_t width, int16_t height, int16_t span_y,
|
||||
const Texture &texture, uint32_t colorize, uint8_t alpha,
|
||||
int screen_rotation_degrees) = 0;
|
||||
const Texture &texture, const RgbaColor<uint8_t> &colorize,
|
||||
uint8_t alpha, int screen_rotation_degrees) = 0;
|
||||
};
|
||||
# endif
|
||||
|
||||
|
@ -786,8 +786,9 @@ public:
|
|||
.source_offset_x = internal_texture->source_offset_x,
|
||||
.source_offset_y = internal_texture->source_offset_y,
|
||||
};
|
||||
return buffer->draw_texture(x, y, width, height, span_y, texture, colorize,
|
||||
alpha, screen_rotation_degrees);
|
||||
return buffer->draw_texture(x, y, width, height, span_y, texture,
|
||||
Color::from_argb_encoded(colorize), alpha,
|
||||
screen_rotation_degrees);
|
||||
}
|
||||
};
|
||||
auto r =
|
||||
|
@ -838,8 +839,9 @@ public:
|
|||
.source_offset_x = internal_texture->source_offset_x,
|
||||
.source_offset_y = internal_texture->source_offset_y,
|
||||
};
|
||||
return buffer->draw_texture(x, y, width, height, span_y, texture, colorize,
|
||||
alpha, screen_rotation_degrees);
|
||||
return buffer->draw_texture(x, y, width, height, span_y, texture,
|
||||
Color::from_argb_encoded(colorize), alpha,
|
||||
screen_rotation_degrees);
|
||||
}
|
||||
};
|
||||
auto r = cbindgen_private::slint_software_renderer_render_accel_rgb565(inner,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue