more compact naming for layout struct and added simple doc comments to layout sruct

This commit is contained in:
johan0A 2024-09-24 22:48:04 +02:00
parent 5c14648e9f
commit 38cc535235
5 changed files with 103 additions and 60 deletions

View file

@ -226,7 +226,7 @@ pub fn measureText(clay_text: []const u8, config: *cl.TextElementConfig) cl.Dime
if (temp_text_width < text_width) temp_text_width = text_width;
return cl.Dimensions{
.height = text_height,
.width = temp_text_width * scale_factor + @as(f32, @floatFromInt(temp_byte_counter - 1)) * letter_spacing,
.h = text_height,
.w = temp_text_width * scale_factor + @as(f32, @floatFromInt(temp_byte_counter - 1)) * letter_spacing,
};
}