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

#include <vectordatamanager.h>

Public Member Functions

 VectorDataManager ()
 
 VectorDataManager (vector< VectorData > p_vectorData)
 
virtual ~VectorDataManager ()
 
void setVectorData (vector< VectorData > p_vectorData)
 
vector< VectorDatagetVectorData ()
 
VectorDataManager clone ()
 
void clear ()
 
void addInit ()
 
void addInit (PointData p_point)
 
void addFill (ColorData p_color)
 
void addFill (string p_gradientID)
 
void addEndFill ()
 
void addClosePath ()
 
void addCubic (PointData p_point1, PointData p_point2, PointData p_point3)
 
void addQuadratic (PointData p_point1, PointData p_point2, PointData p_point3)
 
void addLine (PointData p_point)
 
void addLinePoly (PointData p_point, double p_x, double p_y)
 
void addMove (PointData p_point)
 
void addLineStyle (StrokeColorData p_stroke)
 
void addImage (PointData p_IDandBuff, PointData p_xy, PointData p_scaleRotate)
 
void push (VectorDataManager p_vectorsData)
 
bool isEmpty ()
 
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 recenterRotationPoint (vector< unsigned int > p_selectedShapes)
 

Static Public Attributes

static unsigned int idmaker
 

Protected Member Functions

void add (VectorData::type p_type, ColorData p_fill, StrokeColorData p_stroke)
 
void add (VectorData::type p_type, string p_fillGradientID, StrokeColorData p_stroke)
 
void addCurve (PointData p_point1, PointData p_point2, PointData p_point3, VectorData::type p_curveType)
 
vector< VectorDatacopySelectedShapes (vector< unsigned int > p_selectedShapes)
 
vector< unsigned int > pasteSelectedShapes (vector< VectorData > p_vectorDataCopyBuffer)
 
bool deleteSelectedShapes (vector< unsigned int > p_selectedShapes)
 

Protected Attributes

vector< VectorDatavectorData
 

Constructor & Destructor Documentation

◆ VectorDataManager() [1/2]

VectorDataManager::VectorDataManager ( )

◆ VectorDataManager() [2/2]

VectorDataManager::VectorDataManager ( vector< VectorData p_vectorData)
Here is the call graph for this function:

◆ ~VectorDataManager()

VectorDataManager::~VectorDataManager ( )
virtual

Member Function Documentation

◆ add() [1/2]

void VectorDataManager::add ( VectorData::type  p_type,
ColorData  p_fill,
StrokeColorData  p_stroke 
)
protected
Here is the caller graph for this function:

◆ add() [2/2]

void VectorDataManager::add ( VectorData::type  p_type,
string  p_fillGradientID,
StrokeColorData  p_stroke 
)
protected

◆ addClosePath()

void VectorDataManager::addClosePath ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCubic()

void VectorDataManager::addCubic ( PointData  p_point1,
PointData  p_point2,
PointData  p_point3 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCurve()

void VectorDataManager::addCurve ( PointData  p_point1,
PointData  p_point2,
PointData  p_point3,
VectorData::type  p_curveType 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addEndFill()

void VectorDataManager::addEndFill ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFill() [1/2]

void VectorDataManager::addFill ( ColorData  p_color)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFill() [2/2]

void VectorDataManager::addFill ( string  p_gradientID)
Here is the call graph for this function:

◆ addImage()

void VectorDataManager::addImage ( PointData  p_IDandBuff,
PointData  p_xy,
PointData  p_scaleRotate 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addInit() [1/2]

void VectorDataManager::addInit ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addInit() [2/2]

void VectorDataManager::addInit ( PointData  p_point)
Here is the call graph for this function:

◆ addLine()

void VectorDataManager::addLine ( PointData  p_point)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addLinePoly()

void VectorDataManager::addLinePoly ( PointData  p_point,
double  p_x,
double  p_y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addLineStyle()

void VectorDataManager::addLineStyle ( StrokeColorData  p_stroke)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addMove()

void VectorDataManager::addMove ( PointData  p_point)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addQuadratic()

void VectorDataManager::addQuadratic ( PointData  p_point1,
PointData  p_point2,
PointData  p_point3 
)
Here is the call graph for this function:

◆ clear()

void VectorDataManager::clear ( )
Here is the caller graph for this function:

◆ clone()

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

◆ copySelectedShapes()

vector< VectorData > VectorDataManager::copySelectedShapes ( vector< unsigned int >  p_selectedShapes)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteSelectedShapes()

bool VectorDataManager::deleteSelectedShapes ( vector< unsigned int >  p_selectedShapes)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ duplicateShapes()

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

◆ flipHorizontalSelectedShape()

bool VectorDataManager::flipHorizontalSelectedShape ( vector< unsigned int >  p_selectedShapes)
  1. get left-most, right-most, mid-point
  2. loop among selected shapes' points and invert point against location in left-mid-right
Here is the call graph for this function:
Here is the caller graph for this function:

◆ flipVerticalSelectedShape()

bool VectorDataManager::flipVerticalSelectedShape ( vector< unsigned int >  p_selectedShapes)
  1. get upper-most, lower-most, mid-point
  2. loop among selected shapes' points and invert point against location in upper-mid-lower
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVectorData()

vector< VectorData > VectorDataManager::getVectorData ( )

◆ groupSelectedShapes()

vector< unsigned int > VectorDataManager::groupSelectedShapes ( vector< unsigned int >  p_selectedShapes)

erase index if vectorType is TYPE INIT

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

◆ isEmpty()

bool VectorDataManager::isEmpty ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowerSelectedShape()

vector< unsigned int > VectorDataManager::lowerSelectedShape ( vector< unsigned int >  p_selectedShapes)

Multiple selected Shapes can be lowered one step below its z-ordering by splicing the VectorData array into group of four. 1.) Whatever shape is behind the selected Shape less the one behind selected Shape 2.) The one behind the selected Shape 3.) The selected Shape itself 4.) All others infront of selected Shape These four groups will be merged back to one in this exact order: 1 + 3 + 2 + 4

Returns
True if it successfully lowered back selected Shape
See also
raiseSelectedShape(), raiseToTopSelectedShape() and lowerToBottomSelectedShape()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowerToBottomSelectedShape()

vector< unsigned int > VectorDataManager::lowerToBottomSelectedShape ( vector< unsigned int >  p_selectedShapes)

To move selected item to the bottom of z-ordering,

  1. Copy selected shapes to Buffer
  2. Delete selected shapes
  3. Append remaining shapes to Buffer
  4. Delete all remaining shapes
  5. Paste Buffer
    Returns
    True if it successfully lowered selected Shape to bottom of z-ordering
    See also
    raiseSelectedShape(), lowerSelectedShape() and raiseToTopSelectedShape()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pasteSelectedShapes()

vector< unsigned int > VectorDataManager::pasteSelectedShapes ( vector< VectorData p_vectorDataCopyBuffer)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ push()

void VectorDataManager::push ( VectorDataManager  p_vectorsData)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ raiseSelectedShape()

vector< unsigned int > VectorDataManager::raiseSelectedShape ( vector< unsigned int >  p_selectedShapes)

Multiple selected Shapes can be raised one step above its z-ordering by splicing the VectorData array into group of four. 1.) Whatever shape is behind the selected Shape 2.) The selected Shape itself 3.) The one directly infront of the selected Shape 4.) All others infront of selected Shape less the one infront of it These four groups will be merged back to one in this exact order: 1 + 3 + 2 + 4

Returns
True if it successfully lowered back selected Shape
See also
lowerSelectedShape(), raiseToTopSelectedShape() and lowerToBottomSelectedShape()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ raiseToTopSelectedShape()

vector< unsigned int > VectorDataManager::raiseToTopSelectedShape ( vector< unsigned int >  p_selectedShapes)

To move selected item to the top of z-ordering,

  1. Copy selected shapes to Buffer
  2. Delete selected shapes
  3. Paste Buffer
    Returns
    True if it successfully raised selected Shape on top of z-ordering
    See also
    raiseSelectedShape(), lowerSelectedShape() and lowerToBottomSelectedShape()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ recenterRotationPoint()

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

◆ setVectorData()

void VectorDataManager::setVectorData ( vector< VectorData p_vectorData)
Here is the caller graph for this function:

◆ ungroupSelectedShapes()

vector< unsigned int > VectorDataManager::ungroupSelectedShapes ( vector< unsigned int >  p_selectedShapes)

insert TYPE INIT between ENDFILL and FILL

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

Field Documentation

◆ idmaker

unsigned int VectorDataManager::idmaker
static

◆ vectorData

vector<VectorData> VectorDataManager::vectorData
protected

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