mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much better visual clue about what type of metric is being used.
This commit is contained in:
parent
656b01eb0f
commit
116cf92156
212 changed files with 1144 additions and 1144 deletions
|
@ -449,7 +449,7 @@ void LayoutBlock::render(RenderingContext& context)
|
|||
}
|
||||
}
|
||||
|
||||
HitTestResult LayoutBlock::hit_test(const Gfx::Point& position) const
|
||||
HitTestResult LayoutBlock::hit_test(const Gfx::IntPoint& position) const
|
||||
{
|
||||
if (!children_are_inline())
|
||||
return LayoutBox::hit_test(position);
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
LineBox& ensure_last_line_box();
|
||||
LineBox& add_line_box();
|
||||
|
||||
virtual HitTestResult hit_test(const Gfx::Point&) const override;
|
||||
virtual HitTestResult hit_test(const Gfx::IntPoint&) const override;
|
||||
|
||||
LayoutBlock* previous_sibling() { return to<LayoutBlock>(LayoutNode::previous_sibling()); }
|
||||
const LayoutBlock* previous_sibling() const { return to<LayoutBlock>(LayoutNode::previous_sibling()); }
|
||||
|
|
|
@ -240,7 +240,7 @@ void LayoutBox::render(RenderingContext& context)
|
|||
context.painter().draw_rect(enclosing_int_rect(absolute_rect()), Color::Magenta);
|
||||
}
|
||||
|
||||
HitTestResult LayoutBox::hit_test(const Gfx::Point& position) const
|
||||
HitTestResult LayoutBox::hit_test(const Gfx::IntPoint& position) const
|
||||
{
|
||||
// FIXME: It would be nice if we could confidently skip over hit testing
|
||||
// parts of the layout tree, but currently we can't just check
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
float absolute_y() const { return absolute_rect().y(); }
|
||||
Gfx::FloatPoint absolute_position() const { return absolute_rect().location(); }
|
||||
|
||||
virtual HitTestResult hit_test(const Gfx::Point& absolute_position) const override;
|
||||
virtual HitTestResult hit_test(const Gfx::IntPoint& absolute_position) const override;
|
||||
virtual void set_needs_display() override;
|
||||
|
||||
bool is_body() const;
|
||||
|
|
|
@ -66,7 +66,7 @@ void LayoutDocument::layout(LayoutMode layout_mode)
|
|||
});
|
||||
}
|
||||
|
||||
void LayoutDocument::did_set_viewport_rect(Badge<Frame>, const Gfx::Rect& a_viewport_rect)
|
||||
void LayoutDocument::did_set_viewport_rect(Badge<Frame>, const Gfx::IntRect& a_viewport_rect)
|
||||
{
|
||||
Gfx::FloatRect viewport_rect(a_viewport_rect.x(), a_viewport_rect.y(), a_viewport_rect.width(), a_viewport_rect.height());
|
||||
for_each_in_subtree_of_type<LayoutImage>([&](auto& layout_image) {
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
const LayoutRange& selection() const { return m_selection; }
|
||||
LayoutRange& selection() { return m_selection; }
|
||||
|
||||
void did_set_viewport_rect(Badge<Frame>, const Gfx::Rect&);
|
||||
void did_set_viewport_rect(Badge<Frame>, const Gfx::IntRect&);
|
||||
|
||||
virtual bool is_root() const override { return true; }
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ LayoutListItemMarker::~LayoutListItemMarker()
|
|||
|
||||
void LayoutListItemMarker::render(RenderingContext& context)
|
||||
{
|
||||
Gfx::Rect bullet_rect { 0, 0, 4, 4 };
|
||||
Gfx::IntRect bullet_rect { 0, 0, 4, 4 };
|
||||
bullet_rect.center_within(enclosing_int_rect(absolute_rect()));
|
||||
// FIXME: It would be nicer to not have to go via the parent here to get our inherited style.
|
||||
auto color = parent()->style().color_or_fallback(CSS::PropertyID::Color, document(), context.palette().base_text());
|
||||
|
|
|
@ -98,7 +98,7 @@ void LayoutNode::render(RenderingContext& context)
|
|||
});
|
||||
}
|
||||
|
||||
HitTestResult LayoutNode::hit_test(const Gfx::Point& position) const
|
||||
HitTestResult LayoutNode::hit_test(const Gfx::IntPoint& position) const
|
||||
{
|
||||
HitTestResult result;
|
||||
for_each_child([&](auto& child) {
|
||||
|
|
|
@ -94,7 +94,7 @@ class LayoutNode : public TreeNode<LayoutNode> {
|
|||
public:
|
||||
virtual ~LayoutNode();
|
||||
|
||||
virtual HitTestResult hit_test(const Gfx::Point&) const;
|
||||
virtual HitTestResult hit_test(const Gfx::IntPoint&) const;
|
||||
|
||||
bool is_anonymous() const { return !m_node; }
|
||||
const Node* node() const { return m_node; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue