selective clearing
This commit is contained in:
parent
483131062f
commit
9bb36c990d
7 changed files with 98 additions and 30 deletions
|
|
@ -34,7 +34,8 @@ TextElement::TextElement(std::int_fast32_t anchorX, std::int_fast32_t anchorY, s
|
|||
|
||||
}
|
||||
|
||||
void TextElement::RenderText(const std::string_view text, float size, Pixel_BU8_GU8_RU8_AU8 color, Font& font, TextAlignment alignment, VerticalTextAlignment verticalAlignment, TextOverflowMode overflowMode) {
|
||||
void TextElement::RenderText(Window& window, const std::string_view text, float size, Pixel_BU8_GU8_RU8_AU8 color, Font& font, TextAlignment alignment, VerticalTextAlignment verticalAlignment, TextOverflowMode overflowMode) {
|
||||
window.AddDirtyRect(scaled);
|
||||
// Calculate the actual size needed for the text
|
||||
float scale = stbtt_ScaleForPixelHeight(&font.font, size);
|
||||
int baseline = (int)(font.ascent * scale);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue