mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00

This commit adds a Tool::MouseEvent struct, which contains events that may be needed by tools: layer-relative, image-relative and raw (editor- relative) event. The raw event is used by ZoomTool to properly pan the view. This fixes a bug which caused image to snap out of sight.
22 lines
436 B
C++
22 lines
436 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "Tool.h"
|
|
|
|
namespace PixelPaint {
|
|
|
|
class PickerTool final : public Tool {
|
|
public:
|
|
PickerTool();
|
|
virtual ~PickerTool() override;
|
|
|
|
virtual void on_mousedown(Layer&, MouseEvent&) override;
|
|
virtual Gfx::StandardCursor cursor() override { return Gfx::StandardCursor::Crosshair; }
|
|
};
|
|
|
|
}
|