13
0

canvas: change Item::bb_clean() to better named Item::set_bbox_clean()

This commit is contained in:
Paul Davis 2022-04-26 22:02:22 -06:00
parent c75ceb31ab
commit f913373351
19 changed files with 24 additions and 24 deletions

View File

@ -64,7 +64,7 @@ Arc::compute_bounding_box () const
bbox = bbox.expand (0.5 + (_outline_width / 2)); bbox = bbox.expand (0.5 + (_outline_width / 2));
_bounding_box = bbox; _bounding_box = bbox;
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -79,7 +79,7 @@ Arrow::compute_bounding_box () const
_line->x1() + (head_width / 2.0) + outline_pad, _line->x1() + (head_width / 2.0) + outline_pad,
_line->y1()); _line->y1());
bb_clean (); set_bbox_clean ();
} }
/** Set whether to show an arrow head at one end or other /** Set whether to show an arrow head at one end or other

View File

@ -78,7 +78,7 @@ Box::compute_bounding_box () const
_bounding_box = Rect(); _bounding_box = Rect();
if (_items.empty()) { if (_items.empty()) {
bb_clean (); set_bbox_clean ();
return; return;
} }
@ -93,7 +93,7 @@ Box::compute_bounding_box () const
left_padding + outline_width() + left_margin); left_padding + outline_width() + left_margin);
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -335,7 +335,7 @@ public:
mutable Rect _bounding_box; mutable Rect _bounding_box;
PackOptions _pack_options; PackOptions _pack_options;
void bb_clean () const; void set_bbox_clean () const;
void set_bbox_dirty () const; void set_bbox_dirty () const;
bool bbox_dirty() const { return _bounding_box_dirty; } bool bbox_dirty() const { return _bounding_box_dirty; }

View File

@ -54,5 +54,5 @@ Container::compute_bounding_box () const
{ {
_bounding_box = Rect (); _bounding_box = Rect ();
/* nothing to do here; Item::bounding_box() will add all children for us */ /* nothing to do here; Item::bounding_box() will add all children for us */
bb_clean (); set_bbox_clean ();
} }

View File

@ -88,7 +88,7 @@ Grid::compute_bounding_box () const
_bounding_box = Rect(); _bounding_box = Rect();
if (_items.empty()) { if (_items.empty()) {
bb_clean (); set_bbox_clean ();
return; return;
} }
@ -103,7 +103,7 @@ Grid::compute_bounding_box () const
outline_width() + left_margin + left_padding); outline_width() + left_margin + left_padding);
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -69,7 +69,7 @@ void
Image::compute_bounding_box () const Image::compute_bounding_box () const
{ {
_bounding_box = Rect (0, 0, _width, _height); _bounding_box = Rect (0, 0, _width, _height);
bb_clean (); set_bbox_clean ();
} }
boost::shared_ptr<Image::Data> boost::shared_ptr<Image::Data>

View File

@ -1334,7 +1334,7 @@ Item::set_layout_sensitive (bool yn)
} }
void void
Item::bb_clean () const Item::set_bbox_clean () const
{ {
_bounding_box_dirty = false; _bounding_box_dirty = false;
} }

View File

@ -52,7 +52,7 @@ Line::compute_bounding_box () const
bbox = bbox.expand (0.5 + (_outline_width / 2)); bbox = bbox.expand (0.5 + (_outline_width / 2));
_bounding_box = bbox; _bounding_box = bbox;
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -71,7 +71,7 @@ LineSet::compute_bounding_box () const
} }
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -170,13 +170,13 @@ Meter::compute_bounding_box () const
{ {
if (!_canvas) { if (!_canvas) {
_bounding_box = Rect (); _bounding_box = Rect ();
bb_clean (); set_bbox_clean ();
return; return;
} }
Rect r (0, 0, pixwidth + 2, pixheight + 2); Rect r (0, 0, pixwidth + 2, pixheight + 2);
_bounding_box = r; _bounding_box = r;
bb_clean (); set_bbox_clean ();
} }

View File

@ -52,7 +52,7 @@ Pixbuf::compute_bounding_box () const
_bounding_box = Rect (); _bounding_box = Rect ();
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -63,7 +63,7 @@ PolyItem::compute_bounding_box () const
_bounding_box = Rect (); _bounding_box = Rect ();
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -175,7 +175,7 @@ Rectangle::compute_bounding_box () const
_bounding_box = _rect.fix().expand (_outline_width * 0.5); _bounding_box = _rect.fix().expand (_outline_width * 0.5);
} }
bb_clean (); set_bbox_clean ();
} }
void void

View File

@ -69,7 +69,7 @@ StepButton::compute_bounding_box () const
/* Item::bounding_box() will add children */ /* Item::bounding_box() will add children */
bb_clean (); set_bbox_clean ();
} }
#define CORNER_RADIUS 5 #define CORNER_RADIUS 5

View File

@ -110,7 +110,7 @@ Table::compute_bounding_box() const
{ {
if (cells.empty()) { if (cells.empty()) {
_bounding_box = Rect(); _bounding_box = Rect();
bb_clean (); set_bbox_clean ();
return; return;
} }
@ -125,7 +125,7 @@ Table::compute_bounding_box() const
DEBUG_TRACE (DEBUG::CanvasTable, string_compose ("bounding box computed as %1\n", _bounding_box)); DEBUG_TRACE (DEBUG::CanvasTable, string_compose ("bounding box computed as %1\n", _bounding_box));
bb_clean (); set_bbox_clean ();
} }

View File

@ -254,7 +254,7 @@ Text::compute_bounding_box () const
{ {
if (!_canvas || _text.empty()) { if (!_canvas || _text.empty()) {
_bounding_box = Rect (); _bounding_box = Rect ();
bb_clean (); set_bbox_clean ();
return; return;
} }
@ -268,7 +268,7 @@ Text::compute_bounding_box () const
_redraw (); _redraw ();
} }
_bounding_box = Rect (0, 0, min (_clamped_width, (double) _image->get_width() * retina_factor), _image->get_height() * retina_factor); _bounding_box = Rect (0, 0, min (_clamped_width, (double) _image->get_width() * retina_factor), _image->get_height() * retina_factor);
bb_clean (); set_bbox_clean ();
} }
} }

View File

@ -131,5 +131,5 @@ Widget::compute_bounding_box () const
_bounding_box = Rect (0., 0., req.width, req.height); _bounding_box = Rect (0., 0., req.width, req.height);
} }
bb_clean (); set_bbox_clean ();
} }

View File

@ -115,7 +115,7 @@ XFadeCurve::compute_bounding_box () const
_bounding_box = Rect (); _bounding_box = Rect ();
} }
bb_clean (); set_bbox_clean ();
} }
void void