20 if (geo_result.ok()) {
21 const auto& bounds = *geo_result;
24 .offset_y_tiles = bounds.min_y_tiles,
25 .width_tiles = std::max(1, bounds.width_tiles),
26 .height_tiles = std::max(1, bounds.height_tiles),
32 if (dim_table.IsLoaded()) {
33 auto sel = dim_table.GetSelectionBounds(obj.
id_, obj.
size_);
36 .offset_y_tiles = sel.offset_y,
37 .width_tiles = std::max(1, sel.width),
38 .height_tiles = std::max(1, sel.height),
44 int size_h = obj.
size_ & 0x0F;
45 int size_v = (obj.
size_ >> 4) & 0x0F;
49 .width_tiles = std::max(1, size_h + 1),
50 .height_tiles = std::max(1, size_v + 1),
63 if (geo_result.ok()) {
64 const auto selection = geo_result->GetSelectionBounds();
65 return {obj.
x_ + selection.x_tiles, obj.
y_ + selection.y_tiles,
66 selection.width_tiles, selection.height_tiles};
70 return {obj.
x_ + result.offset_x_tiles, obj.
y_ + result.offset_y_tiles,
71 result.width_tiles, result.height_tiles};
77 if (geo_result.ok()) {
78 const auto selection = geo_result->GetSelectionBounds();
79 int x_px = (obj.
x_ + selection.x_tiles) * 8;
80 int y_px = (obj.
y_ + selection.y_tiles) * 8;
81 return {x_px, y_px, selection.width_pixels(), selection.height_pixels()};
85 int x_px = (obj.
x_ + result.offset_x_tiles) * 8;
86 int y_px = (obj.
y_ + result.offset_y_tiles) * 8;
87 return {x_px, y_px, result.width_pixels(), result.height_pixels()};