From 3b370c2ff54bee087f9f75ebc792988f419d17f2 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 22 Apr 2020 20:20:04 -0300 Subject: [PATCH] Minor formatting changes --- src/doc/algorithm/shift_image.cpp | 4 ++-- src/doc/image.cpp | 2 +- src/doc/mask.cpp | 11 ++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/doc/algorithm/shift_image.cpp b/src/doc/algorithm/shift_image.cpp index c89967eaf..e8e4d7b45 100644 --- a/src/doc/algorithm/shift_image.cpp +++ b/src/doc/algorithm/shift_image.cpp @@ -1,5 +1,5 @@ // Aseprite Document Library -// Copyright (c) 2019 Igara Studio S.A. +// Copyright (c) 2019-2020 Igara Studio S.A. // Copyright (c) 2001-2018 David Capello // // This file is released under the terms of the MIT license. @@ -46,7 +46,7 @@ void shift_image(Image* image, int dx, int dy, double angle) // To simplify the algorithm we use a copy of the original image, we // could avoid this copy swapping rows and columns. ImageRef crop(crop_image(image, bounds.x, bounds.y, bounds.w, bounds.h, - image->maskColor())); + image->maskColor())); for (int y=0; ywidth(), image->height(), - image->maskColor(), buffer); + image->maskColor(), buffer); } } // namespace doc diff --git a/src/doc/mask.cpp b/src/doc/mask.cpp index bc67aa0c3..c12b8b8a9 100644 --- a/src/doc/mask.cpp +++ b/src/doc/mask.cpp @@ -233,7 +233,8 @@ void Mask::intersect(const gfx::Rect& bounds) Image* image = NULL; if (!newBounds.isEmpty()) { - image = crop_image(m_bitmap.get(), + image = crop_image( + m_bitmap.get(), newBounds.x-m_bounds.x, newBounds.y-m_bounds.y, newBounds.w, @@ -429,7 +430,8 @@ void Mask::reserve(const gfx::Rect& bounds) gfx::Rect newBounds = m_bounds.createUnion(bounds); if (m_bounds != newBounds) { - Image* image = crop_image(m_bitmap.get(), + Image* image = crop_image( + m_bitmap.get(), newBounds.x-m_bounds.x, newBounds.y-m_bounds.y, newBounds.w, @@ -493,7 +495,10 @@ void Mask::shrink() m_bounds.w = x2 - x1 + 1; m_bounds.h = y2 - y1 + 1; - Image* image = crop_image(m_bitmap.get(), m_bounds.x-u, m_bounds.y-v, m_bounds.w, m_bounds.h, 0); + Image* image = crop_image( + m_bitmap.get(), + m_bounds.x-u, m_bounds.y-v, + m_bounds.w, m_bounds.h, 0); m_bitmap.reset(image); }