diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp index 31e2a59a73..1996cadbed 100644 --- a/Userland/Applications/ImageViewer/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -162,12 +162,12 @@ int main(int argc, char** argv) auto rotate_left_action = GUI::Action::create("Rotate &Left", { Mod_None, Key_L }, [&](auto&) { - widget.rotate(Gfx::RotationDirection::Left); + widget.rotate(Gfx::RotationDirection::CounterClockwise); }); auto rotate_right_action = GUI::Action::create("Rotate &Right", { Mod_None, Key_R }, [&](auto&) { - widget.rotate(Gfx::RotationDirection::Right); + widget.rotate(Gfx::RotationDirection::Clockwise); }); auto vertical_flip_action = GUI::Action::create("Flip &Vertically", { Mod_None, Key_V }, diff --git a/Userland/Libraries/LibGfx/Bitmap.cpp b/Userland/Libraries/LibGfx/Bitmap.cpp index bc4d586513..00dad64630 100644 --- a/Userland/Libraries/LibGfx/Bitmap.cpp +++ b/Userland/Libraries/LibGfx/Bitmap.cpp @@ -357,7 +357,7 @@ RefPtr Bitmap::rotated(Gfx::RotationDirection rotation_direction) c for (int i = 0; i < w; i++) { for (int j = 0; j < h; j++) { Color color; - if (rotation_direction == Gfx::RotationDirection::Left) + if (rotation_direction == Gfx::RotationDirection::CounterClockwise) color = this->get_pixel(w - i - 1, j); else color = this->get_pixel(i, h - j - 1); diff --git a/Userland/Libraries/LibGfx/Bitmap.h b/Userland/Libraries/LibGfx/Bitmap.h index 461645a97b..3f606a561d 100644 --- a/Userland/Libraries/LibGfx/Bitmap.h +++ b/Userland/Libraries/LibGfx/Bitmap.h @@ -83,8 +83,8 @@ static StorageFormat determine_storage_format(BitmapFormat format) struct BackingStore; enum RotationDirection { - Left, - Right + CounterClockwise, + Clockwise }; class Bitmap : public RefCounted {