mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 07:08:18 +00:00
Make util/geometry.h C++20 friendly
- Move header to base/include to make it applicable for base types like 'Affinity' down the road. - Represent 'Rect' as typle of point and area, which is the most common form of initialization, creates in valid 'Rect' by default. - Turn Point, Area, and Rect into compound types, making x, y, w, h, at, area accessible without a method call - 'Rect::Compound' function for constructing a 'Rect' from two points, replacing a former constructor - Use result type 'Rect::Cut_remainder' instead of out parameters. Fixes #5239
This commit is contained in:
@ -117,7 +117,7 @@ struct Ttf_font::Glyph_buffer
|
||||
alloc(alloc),
|
||||
|
||||
/* glyphs are horizontally stretched by factor 4 */
|
||||
capacity(4*(bounding_box.w() + PAD_X)*(bounding_box.h() + PAD_Y))
|
||||
capacity(4*(bounding_box.w + PAD_X)*(bounding_box.h + PAD_Y))
|
||||
{ }
|
||||
|
||||
~Glyph_buffer() { alloc.free(_values, _num_bytes()); }
|
||||
|
@ -113,8 +113,8 @@ struct Vfs_ttf::Local_factory : File_system_factory, Watch_response_handler
|
||||
{
|
||||
_baseline_fs .value(_font->font.font().baseline());
|
||||
_height_fs .value(_font->font.font().height());
|
||||
_max_width_fs .value(_font->font.font().bounding_box().w());
|
||||
_max_height_fs.value(_font->font.font().bounding_box().h());
|
||||
_max_width_fs .value(_font->font.font().bounding_box().w);
|
||||
_max_height_fs.value(_font->font.font().bounding_box().h);
|
||||
}
|
||||
|
||||
Local_factory(Vfs::Env &env, Xml_node config)
|
||||
|
Reference in New Issue
Block a user