Kage Studio 0.7.230612
A Simple Free and Open Source 2D Animation Software
Loading...
Searching...
No Matches
KageLayer Class Reference

#include <layer.h>

Collaboration diagram for KageLayer:

Public Member Functions

 KageLayer (KageScene *p_scene, unsigned int p_layerID, unsigned int p_frameCount)
 
virtual ~KageLayer ()
 
unsigned int getID ()
 
bool selectAll (bool p_selectAll)
 
unsigned int getFrameCount ()
 
bool addFrame ()
 
void duplicateFrame ()
 
void extendFrame ()
 
bool removeFrame ()
 
unsigned int getCurrentFrame ()
 
void setCurrentFrame (unsigned int p_frame)
 
void setCurrentFrameByID (unsigned int p_frameID)
 
void removeAllFrames ()
 
KageScenegetScene ()
 
KageFramegetFrame ()
 
KageFramegetFrameAt (unsigned int p_frame)
 
unsigned int getFrameNumberByID (unsigned int p_frameID)
 
void setSelected (KageFrame *p_frame)
 
vector< unsigned int > raiseSelectedShape (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > lowerSelectedShape (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > raiseToTopSelectedShape (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > lowerToBottomSelectedShape (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > groupSelectedShapes (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > ungroupSelectedShapes (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > duplicateShapes (vector< unsigned int > p_selectedShapes)
 
bool flipHorizontalSelectedShape (vector< unsigned int > p_selectedShapes)
 
bool flipVerticalSelectedShape (vector< unsigned int > p_selectedShapes)
 
bool doFlipVerticalSelectedShapeOn (unsigned int p_frameIndex, vector< unsigned int > p_selectedShapes)
 
bool doFlipVerticalSelectedShapeOnExtendedFrame (unsigned int p_frameIndex, vector< unsigned int > p_selectedShapes)
 
bool recenterRotationPoint (vector< unsigned int > p_selectedShapes)
 
bool addDataToFrame (VectorDataManager p_vectorsData)
 
bool setFrameData (VectorDataManager p_vectorsData)
 
VectorDataManager getFrameTweenData (unsigned int p_frameIndex)
 
VectorDataManager getFrameData ()
 
VectorDataManager getFrameDataAt (unsigned int p_frame)
 
VectorDataManager getPreviousFrameData (unsigned int p_frameID)
 NOTE: "Frame" – NOT "frame ID".
 
bool setFrameDataToPreviousFrame (VectorDataManager p_vectorsData, unsigned int p_frameID)
 Called by KageFrame if KageFrame is Extended.
 
bool addDataToPreviousFrame (VectorDataManager v, unsigned int p_frameID)
 Called by KageFrame if KageFrame is Extended.
 
bool setPreviousFrameTween (unsigned int p_frameID, unsigned int p_tween)
 Called by KageFrame if KageFrame is Extended.
 
bool setExtendedFrameTween (unsigned int p_frameID, unsigned int p_tween)
 
bool forceSetTween (unsigned int p_tween)
 
bool setTween (unsigned int p_tween)
 
unsigned int getTween ()
 
bool switchToPreviousFrame ()
 
bool switchToPreviousFrame (unsigned int p_frameID)
 Called by FrameSet for navigating to Previous Frame.
 
bool switchToNextFrame ()
 Called by KageFrame for navigating to Previous Frame.
 
bool switchToNextFrame (unsigned int p_frameID)
 Called by FrameSet for navigating to Next Frame.
 
bool isCurrentFrame (unsigned int p_frameID)
 Called by KageFrame for navigating to Next Frame.
 
bool canReUseNextFrame ()
 Called by KageFrame when rendering.
 
void setFrameExtension (KageFrame::extension p_extension)
 Called by KageScene when duplicating Frame.
 
unsigned int getActiveFrameID ()
 Will return which Frame is currently active for editing or viewing.
 

Data Fields

unsigned int ID
 
bool _visible
 
bool _locked
 
bool _selected
 
vector< KageFrame * > Frames
 

Protected Member Functions

bool moveToLeft ()
 
bool moveToLeftAt (unsigned int p_frame)
 Moves Current Frame to Left.
 
bool moveToLeftMost ()
 Moves Current Frame to Left on indicated Frame.
 

Protected Attributes

unsigned int layerID
 
unsigned int frameCtr
 
KageScene_scene
 
unsigned int _currentFrameID
 
unsigned int _currentFrameIndex
 
unsigned int _activeFrame
 Moves Current Frame to Left.
 

Constructor & Destructor Documentation

◆ KageLayer()

KageLayer::KageLayer ( KageScene p_scene,
unsigned int  p_layerID,
unsigned int  p_frameCount 
)
Here is the call graph for this function:

◆ ~KageLayer()

KageLayer::~KageLayer ( )
virtual

Member Function Documentation

◆ addDataToFrame()

bool KageLayer::addDataToFrame ( VectorDataManager  p_vectorsData)
Here is the call graph for this function:

◆ addDataToPreviousFrame()

bool KageLayer::addDataToPreviousFrame ( VectorDataManager  v,
unsigned int  p_frameID 
)

Called by KageFrame if KageFrame is Extended.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFrame()

bool KageLayer::addFrame ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ canReUseNextFrame()

bool KageLayer::canReUseNextFrame ( )

Called by KageFrame when rendering.

◆ doFlipVerticalSelectedShapeOn()

bool KageLayer::doFlipVerticalSelectedShapeOn ( unsigned int  p_frameIndex,
vector< unsigned int >  p_selectedShapes 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doFlipVerticalSelectedShapeOnExtendedFrame()

bool KageLayer::doFlipVerticalSelectedShapeOnExtendedFrame ( unsigned int  p_frameIndex,
vector< unsigned int >  p_selectedShapes 
)
Here is the caller graph for this function:

◆ duplicateFrame()

void KageLayer::duplicateFrame ( )
Here is the call graph for this function:

◆ duplicateShapes()

vector< unsigned int > KageLayer::duplicateShapes ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ extendFrame()

void KageLayer::extendFrame ( )
Here is the call graph for this function:

◆ flipHorizontalSelectedShape()

bool KageLayer::flipHorizontalSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ flipVerticalSelectedShape()

bool KageLayer::flipVerticalSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ forceSetTween()

bool KageLayer::forceSetTween ( unsigned int  p_tween)
Here is the call graph for this function:

◆ getActiveFrameID()

unsigned int KageLayer::getActiveFrameID ( )

Will return which Frame is currently active for editing or viewing.

Returns
unsigned int 0 is frame 1 (?) //TODO: revisit if index 0 is frame 1

◆ getCurrentFrame()

unsigned int KageLayer::getCurrentFrame ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFrame()

KageFrame * KageLayer::getFrame ( )
Here is the call graph for this function:

◆ getFrameAt()

KageFrame * KageLayer::getFrameAt ( unsigned int  p_frame)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFrameCount()

unsigned int KageLayer::getFrameCount ( )
Here is the caller graph for this function:

◆ getFrameData()

VectorDataManager KageLayer::getFrameData ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFrameDataAt()

VectorDataManager KageLayer::getFrameDataAt ( unsigned int  p_frame)
Here is the call graph for this function:

◆ getFrameNumberByID()

unsigned int KageLayer::getFrameNumberByID ( unsigned int  p_frameID)
Here is the call graph for this function:

◆ getFrameTweenData()

VectorDataManager KageLayer::getFrameTweenData ( unsigned int  p_frameIndex)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getID()

unsigned int KageLayer::getID ( )

◆ getPreviousFrameData()

VectorDataManager KageLayer::getPreviousFrameData ( unsigned int  p_frameID)

NOTE: "Frame" – NOT "frame ID".

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getScene()

KageScene * KageLayer::getScene ( )

◆ getTween()

unsigned int KageLayer::getTween ( )
Here is the call graph for this function:

◆ groupSelectedShapes()

vector< unsigned int > KageLayer::groupSelectedShapes ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ isCurrentFrame()

bool KageLayer::isCurrentFrame ( unsigned int  p_frameID)

Called by KageFrame for navigating to Next Frame.

Here is the caller graph for this function:

◆ lowerSelectedShape()

vector< unsigned int > KageLayer::lowerSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ lowerToBottomSelectedShape()

vector< unsigned int > KageLayer::lowerToBottomSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ moveToLeft()

bool KageLayer::moveToLeft ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveToLeftAt()

bool KageLayer::moveToLeftAt ( unsigned int  p_frame)
protected

Moves Current Frame to Left.

Here is the call graph for this function:

◆ moveToLeftMost()

bool KageLayer::moveToLeftMost ( )
protected

Moves Current Frame to Left on indicated Frame.

Here is the call graph for this function:

◆ raiseSelectedShape()

vector< unsigned int > KageLayer::raiseSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ raiseToTopSelectedShape()

vector< unsigned int > KageLayer::raiseToTopSelectedShape ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ recenterRotationPoint()

bool KageLayer::recenterRotationPoint ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

◆ removeAllFrames()

void KageLayer::removeAllFrames ( )

◆ removeFrame()

bool KageLayer::removeFrame ( )

If KageFrame is NULL or Last Frame (but not Frame-index0), remove Frame Widget, else, do below steps.

  1. Copy content of Frame+1 to Frame+0; then make Frame+1 as Frame+0
  2. If Frame+0 is not Last Frame, repeat 1
  3. Set last Frame = NULL
Returns
True if Last Frame widget was removed
Here is the call graph for this function:

◆ selectAll()

bool KageLayer::selectAll ( bool  p_selectAll)
Here is the call graph for this function:

◆ setCurrentFrame()

void KageLayer::setCurrentFrame ( unsigned int  p_frame)

For use of Kage. When a KageLayer is clicked, KageLayerManager will call this function via Kage then sets currently active Frame along Layer

Parameters
p_frameis Frame Number known to KageFrame(/Layer?)
See also
getCurrentFrame()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCurrentFrameByID()

void KageLayer::setCurrentFrameByID ( unsigned int  p_frameID)

◆ setExtendedFrameTween()

bool KageLayer::setExtendedFrameTween ( unsigned int  p_frameID,
unsigned int  p_tween 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFrameData()

bool KageLayer::setFrameData ( VectorDataManager  p_vectorsData)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFrameDataToPreviousFrame()

bool KageLayer::setFrameDataToPreviousFrame ( VectorDataManager  p_vectorsData,
unsigned int  p_frameID 
)

Called by KageFrame if KageFrame is Extended.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFrameExtension()

void KageLayer::setFrameExtension ( KageFrame::extension  p_extension)

Called by KageScene when duplicating Frame.

For use of Kage when loading KSF file

Parameters
p_extensionif start/mid/end of frame extension
Here is the call graph for this function:

◆ setPreviousFrameTween()

bool KageLayer::setPreviousFrameTween ( unsigned int  p_frameID,
unsigned int  p_tween 
)

Called by KageFrame if KageFrame is Extended.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSelected()

void KageLayer::setSelected ( KageFrame p_frame)

For use of KageFrame. When a KageFrame is clicked, previously clicked KageFrame should be un-selected.

Parameters
p_frameis pointer to KageFrame who called this function
Here is the call graph for this function:

◆ setTween()

bool KageLayer::setTween ( unsigned int  p_tween)
Here is the call graph for this function:

◆ switchToNextFrame() [1/2]

bool KageLayer::switchToNextFrame ( )

Called by KageFrame for navigating to Previous Frame.

index + 1 = becomes frameNumber for current. then +1 becomes frameNumber of Next Frame

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchToNextFrame() [2/2]

bool KageLayer::switchToNextFrame ( unsigned int  p_frameID)

Called by FrameSet for navigating to Next Frame.

index + 1 = becomes frameNumber for current. then +1 becomes frameNumber of Next Frame

Here is the call graph for this function:

◆ switchToPreviousFrame() [1/2]

bool KageLayer::switchToPreviousFrame ( )

index + 1 = becomes frameNumber for current. then -1 becomes frameNumber of Previous Frame; thus ‘setCurrentFrame(i)’

Here is the call graph for this function:
Here is the caller graph for this function:

◆ switchToPreviousFrame() [2/2]

bool KageLayer::switchToPreviousFrame ( unsigned int  p_frameID)

Called by FrameSet for navigating to Previous Frame.

index + 1 = becomes frameNumber for current. then -1 becomes frameNumber of Previous Frame; thus ‘setCurrentFrame(i)’

Here is the call graph for this function:

◆ ungroupSelectedShapes()

vector< unsigned int > KageLayer::ungroupSelectedShapes ( vector< unsigned int >  p_selectedShapes)
Here is the call graph for this function:

Field Documentation

◆ _activeFrame

unsigned int KageLayer::_activeFrame
protected

Moves Current Frame to Left.

◆ _currentFrameID

unsigned int KageLayer::_currentFrameID
protected

◆ _currentFrameIndex

unsigned int KageLayer::_currentFrameIndex
protected

◆ _locked

bool KageLayer::_locked

◆ _scene

KageScene* KageLayer::_scene
protected

◆ _selected

bool KageLayer::_selected

◆ _visible

bool KageLayer::_visible

◆ frameCtr

unsigned int KageLayer::frameCtr
protected

◆ Frames

vector<KageFrame*> KageLayer::Frames

◆ ID

unsigned int KageLayer::ID

◆ layerID

unsigned int KageLayer::layerID
protected

The documentation for this class was generated from the following files: