On-screen control used to modify border info for 9-slicing sprites. More...
#include <SlicerManipulator.h>
Inherits QGraphicsRectItem.
Public Member Functions | |
SlicerManipulator (SpriteBorder border, QSize &unscaledPixmapSize, QSize &scaledPixmapSize, ISprite *sprite, QGraphicsScene *scene, SlicerEdit *edit) | |
void | SetEdit (SlicerEdit *edit) |
Associates a text input/QLineEdit control with this manipulator. | |
void | SetPixmapSizes (const QSize &unscaledSize, const QSize &scaledSize) |
void | SetCellIndex (AZ::u32 cellIndex) |
void | setPixelPosition (float p) |
Changes the on-screen position of this manipulator based on the new border pixel value. | |
On-screen control used to modify border info for 9-slicing sprites.
|
inline |
A cell index can be provided when working with sprite-sheets.
The cell index is used to set the border info on the sprite-sheet cell as the border values are manipulated by the user with this manipulator.
void SlicerManipulator::SetPixmapSizes | ( | const QSize & | unscaledSize, |
const QSize & | scaledSize | ||
) |
Provides the scale and unscale sprite sizes as displayed in the properties pane.
This method is intended to be called when the displayed pixmap/image changes, such as when the user selects a different cell of a sprite-sheet.
The scale values themselves are primarily used to convert between viewport and spritesheet cell texture spaces.