|
Krita Source Code Documentation
|
The KisRasterKeyframe class is a concrete subclass of KisKeyframe that wraps a physical raster image frame on a KisPaintDevice. More...
#include <kis_raster_keyframe_channel.h>
Inheritance diagram for KisRasterKeyframe:Public Member Functions | |
| QRect | contentBounds () |
| KisKeyframeSP | duplicate (KisKeyframeChannel *newChannel=0) override |
| int | frameID () const |
| Get the frameID of the "physical" raster frame on the associated KisPaintDevice. | |
| bool | hasContent () |
| KisRasterKeyframe (KisPaintDeviceWSP paintDevice) | |
| KisRasterKeyframe (KisPaintDeviceWSP paintDevice, const int &premadeFrameID, const int &colorLabelId=0) | |
| void | writeFrameToDevice (KisPaintDeviceSP writeTarget) |
| Write this frame's raster content to another paint device. Useful for things like onion skinning where the contents of the frame are drawn to a second, external device. | |
| ~KisRasterKeyframe () override | |
Public Member Functions inherited from KisKeyframe | |
| int | colorLabel () const |
| KisKeyframe () | |
| void | setColorLabel (int colorIndex) |
| virtual | ~KisKeyframe () |
Private Member Functions | |
| KisRasterKeyframe (const KisRasterKeyframe &rhs) | |
Private Attributes | |
| int | m_frameID |
| m_frameID is a handle that references the "physical" frame stored in this keyframe's KisPaintDevice, m_paintDevice. This handle is created by the KisPaintDevice upon construction of the KisRasterKeyframe, and it is passed back to the KisPaintDevice for cleanup upon destruction of the KisRasterKeyframe. | |
| KisPaintDeviceWSP | m_paintDevice |
The KisRasterKeyframe class is a concrete subclass of KisKeyframe that wraps a physical raster image frame on a KisPaintDevice.
Whenever a "virtual" KisRasterKeyframe is created, a "physical" raster frame is created on the associated KisPaintDevice and its frameID is stored. Likewise, whenever a "virtual" KisRasterKeyframe is destroyed, the "physical" frame associated with its frameID on the KisPaintDevice is automatically freed.
Definition at line 23 of file kis_raster_keyframe_channel.h.
| KisRasterKeyframe::KisRasterKeyframe | ( | KisPaintDeviceWSP | paintDevice | ) |
Definition at line 20 of file kis_raster_keyframe_channel.cpp.
References KisPaintDeviceFramesInterface::createFrame(), KisPaintDevice::framesInterface(), KIS_ASSERT, m_frameID, and m_paintDevice.
| KisRasterKeyframe::KisRasterKeyframe | ( | KisPaintDeviceWSP | paintDevice, |
| const int & | premadeFrameID, | ||
| const int & | colorLabelId = 0 ) |
Definition at line 29 of file kis_raster_keyframe_channel.cpp.
References KIS_ASSERT, m_frameID, m_paintDevice, and KisKeyframe::setColorLabel().
|
override |
Definition at line 39 of file kis_raster_keyframe_channel.cpp.
References KisPaintDeviceFramesInterface::deleteFrame(), KisPaintDevice::framesInterface(), m_frameID, and m_paintDevice.
|
private |
| QRect KisRasterKeyframe::contentBounds | ( | ) |
Definition at line 53 of file kis_raster_keyframe_channel.cpp.
References KisPaintDeviceFramesInterface::frameBounds(), KisPaintDevice::framesInterface(), m_frameID, and m_paintDevice.
|
overridevirtual |
Creates a copy of this keyframe.
| newChannel | (Optional) The channel that will hold this duplicate. This is used when some action must be taken to insert a frame into a new channel, for example, the registration of a KisRasterKeyframe with the new channel's paint device. |
Implements KisKeyframe.
Definition at line 74 of file kis_raster_keyframe_channel.cpp.
References KisKeyframe::colorLabel(), KisPaintDeviceFramesInterface::createFrame(), KisPaintDevice::framesInterface(), KIS_ASSERT, KisRasterKeyframe(), m_frameID, m_paintDevice, KisRasterKeyframeChannel::paintDevice(), toQShared(), and KisPaintDeviceFramesInterface::uploadFrame().
| int KisRasterKeyframe::frameID | ( | ) | const |
Get the frameID of the "physical" raster frame on the associated KisPaintDevice.
Definition at line 48 of file kis_raster_keyframe_channel.cpp.
References m_frameID.
| bool KisRasterKeyframe::hasContent | ( | ) |
Definition at line 62 of file kis_raster_keyframe_channel.cpp.
References KisPaintDeviceFramesInterface::frameBounds(), KisPaintDevice::framesInterface(), m_frameID, and m_paintDevice.
| void KisRasterKeyframe::writeFrameToDevice | ( | KisPaintDeviceSP | writeTarget | ) |
Write this frame's raster content to another paint device. Useful for things like onion skinning where the contents of the frame are drawn to a second, external device.
Definition at line 67 of file kis_raster_keyframe_channel.cpp.
References KisPaintDevice::framesInterface(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_frameID, m_paintDevice, and KisPaintDeviceFramesInterface::writeFrameToDevice().
|
private |
m_frameID is a handle that references the "physical" frame stored in this keyframe's KisPaintDevice, m_paintDevice. This handle is created by the KisPaintDevice upon construction of the KisRasterKeyframe, and it is passed back to the KisPaintDevice for cleanup upon destruction of the KisRasterKeyframe.
Definition at line 51 of file kis_raster_keyframe_channel.h.
|
private |
Definition at line 52 of file kis_raster_keyframe_channel.h.