mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +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
|
@ -32,7 +32,7 @@
|
|||
|
||||
namespace PixelPaint {
|
||||
|
||||
RefPtr<Image> Image::create_with_size(const Gfx::Size& size)
|
||||
RefPtr<Image> Image::create_with_size(const Gfx::IntSize& size)
|
||||
{
|
||||
if (size.is_empty())
|
||||
return nullptr;
|
||||
|
@ -43,12 +43,12 @@ RefPtr<Image> Image::create_with_size(const Gfx::Size& size)
|
|||
return adopt(*new Image(size));
|
||||
}
|
||||
|
||||
Image::Image(const Gfx::Size& size)
|
||||
Image::Image(const Gfx::IntSize& size)
|
||||
: m_size(size)
|
||||
{
|
||||
}
|
||||
|
||||
void Image::paint_into(GUI::Painter& painter, const Gfx::Rect& dest_rect)
|
||||
void Image::paint_into(GUI::Painter& painter, const Gfx::IntRect& dest_rect)
|
||||
{
|
||||
float scale = (float)dest_rect.width() / (float)rect().width();
|
||||
Gfx::PainterStateSaver saver(painter);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue