|
FuncDoodle
|
Wraps an ImageArray with higher-level frame editing operations. More...
#include <Frame.h>
Public Member Functions | |
| Frame () | |
| Frame (const Frame &other)=default | |
| Copies an existing frame. | |
| Frame (int width, int height, Col bgCol) | |
| Creates a frame with explicit dimensions and background color. | |
| Frame (ImageArray arr) | |
| Creates a frame from an image array copy. | |
| Frame (const ImageArray *arr) | |
| Creates a frame from an optional image array pointer. | |
| ~Frame ()=default | |
| void | ReInit (int width, int height, Col bgCol) |
| Reinitializes the frame with new dimensions and background color. | |
| Frame & | operator= (const Frame &other) |
| Copies another frame into this one. | |
| bool | operator== (const Frame &other) const |
| Returns whether two frames contain identical pixel data. | |
| void | SetWidth (int width, bool clear=false) |
| Sets the frame width. | |
| void | SetHeight (int height, bool clear=false) |
| Sets the frame height. | |
| void | Rotate (int deg) |
| Rotates the frame contents around the frame center. | |
| void | RotateSelection (WeakPtr< Selection > sel, int deg) |
| Rotates only the selected region. | |
| void | DeleteSelection (WeakPtr< Selection > sel, Col bg) |
| Replaces the selected region with background color. | |
| void | MoveSelection (WeakPtr< Selection > sel, Direction moveDir, Col bg) |
| Moves the selected region by one step. | |
| void | CopyToClipboard () |
| Copies the frame image to the system clipboard. | |
| void | Export (const char *filePath) const |
| Writes the frame to an image file. | |
| const ImageArray * | Pixels () const |
| Returns immutable access to the backing pixel array. | |
| ImageArray * | PixelsMut () |
| Returns mutable access to the backing pixel array. | |
| void | SetPixel (int x, int y, Col px) |
| Sets a single frame pixel. | |
| int | Width () const |
| Returns the frame width in pixels. | |
| int | Height () const |
| Returns the frame height in pixels. | |
| std::vector< Col > | Data () const |
| Returns a copy of the frame pixel buffer. | |
Static Public Member Functions | |
| static Frame * | PastedFrame () |
| Returns a frame created from clipboard image data. | |
Private Attributes | |
| ImageArray | m_Pixels |
Wraps an ImageArray with higher-level frame editing operations.
|
inline |
|
default |
Copies an existing frame.
| other | Frame to copy. |
|
inline |
|
inline |
Creates a frame from an image array copy.
| arr | Image array to copy. |
|
inline |
Creates a frame from an optional image array pointer.
| arr | Image array pointer to copy when non-null. |
|
default |
| void FuncDoodle::Frame::CopyToClipboard | ( | ) |
Copies the frame image to the system clipboard.
|
inlinenodiscard |
Returns a copy of the frame pixel buffer.
Replaces the selected region with background color.
| sel | Selection to clear. |
| bg | Background color to write. |
| void FuncDoodle::Frame::Export | ( | const char * | filePath | ) | const |
Writes the frame to an image file.
| filePath | Output image path. |
|
inlinenodiscard |
Returns the frame height in pixels.
| bool FuncDoodle::Frame::operator== | ( | const Frame & | other | ) | const |
Returns whether two frames contain identical pixel data.
| other | Frame to compare against. |
|
static |
Returns a frame created from clipboard image data.
|
inlinenodiscard |
Returns immutable access to the backing pixel array.
|
inline |
Returns mutable access to the backing pixel array.
|
inline |
Reinitializes the frame with new dimensions and background color.
| width | New frame width. |
| height | New frame height. |
| bgCol | New background color. |
|
inline |
Rotates the frame contents around the frame center.
| deg | Rotation angle in degrees. |
Rotates only the selected region.
| sel | Selection to rotate. |
| deg | Rotation angle in degrees. |
| void FuncDoodle::Frame::SetHeight | ( | int | height, |
| bool | clear = false ) |
Sets the frame height.
| height | New frame height. |
| clear | Whether to clear contents while resizing. |
|
inline |
Sets a single frame pixel.
| x | Pixel X coordinate. |
| y | Pixel Y coordinate. |
| px | New pixel color. |
| void FuncDoodle::Frame::SetWidth | ( | int | width, |
| bool | clear = false ) |
Sets the frame width.
| width | New frame width. |
| clear | Whether to clear contents while resizing. |
|
inlinenodiscard |
Returns the frame width in pixels.
|
private |