mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 00:40:08 +00:00
Improve status bar text when the user is scaling/rotating the selection.
This commit is contained in:
parent
89da817771
commit
9684672f5f
@ -263,11 +263,16 @@ bool MovingPixelsState::onUpdateStatusBar(Editor* editor)
|
|||||||
ASSERT(m_pixelsMovement != NULL);
|
ASSERT(m_pixelsMovement != NULL);
|
||||||
|
|
||||||
const gfx::Transformation& transform(getTransformation(editor));
|
const gfx::Transformation& transform(getTransformation(editor));
|
||||||
|
Document* document = editor->getDocument();
|
||||||
|
gfx::Size imageSize = m_pixelsMovement->getInitialImageSize();
|
||||||
|
|
||||||
app_get_statusbar()->setStatusText
|
app_get_statusbar()->setStatusText
|
||||||
(100, "Pos %d %d, Size %d %d, Angle %.1f",
|
(100, "Pos %d %d, Size %d %d, Orig: %3d %3d (%.02f%% %.02f%%), Angle %.1f",
|
||||||
transform.bounds().x, transform.bounds().y,
|
transform.bounds().x, transform.bounds().y,
|
||||||
transform.bounds().w, transform.bounds().h,
|
transform.bounds().w, transform.bounds().h,
|
||||||
|
imageSize.w, imageSize.h,
|
||||||
|
(double)transform.bounds().w*100.0/imageSize.w,
|
||||||
|
(double)transform.bounds().h*100.0/imageSize.h,
|
||||||
180.0 * transform.angle() / PI);
|
180.0 * transform.angle() / PI);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -379,6 +379,11 @@ gfx::Rect PixelsMovement::getImageBounds()
|
|||||||
return gfx::Rect(cel->getX(), cel->getY(), image->w, image->h);
|
return gfx::Rect(cel->getX(), cel->getY(), image->w, image->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gfx::Size PixelsMovement::getInitialImageSize() const
|
||||||
|
{
|
||||||
|
return m_initialData.bounds().getSize();
|
||||||
|
}
|
||||||
|
|
||||||
void PixelsMovement::setMaskColor(uint32_t mask_color)
|
void PixelsMovement::setMaskColor(uint32_t mask_color)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "document_wrappers.h"
|
#include "document_wrappers.h"
|
||||||
#include "undo_transaction.h"
|
#include "undo_transaction.h"
|
||||||
#include "widgets/editor/handle_type.h"
|
#include "widgets/editor/handle_type.h"
|
||||||
|
#include "gfx/size.h"
|
||||||
|
|
||||||
class Document;
|
class Document;
|
||||||
class Image;
|
class Image;
|
||||||
@ -60,6 +61,7 @@ public:
|
|||||||
bool isDragging() const;
|
bool isDragging() const;
|
||||||
|
|
||||||
gfx::Rect getImageBounds();
|
gfx::Rect getImageBounds();
|
||||||
|
gfx::Size getInitialImageSize() const;
|
||||||
|
|
||||||
void setMaskColor(uint32_t mask_color);
|
void setMaskColor(uint32_t mask_color);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user