![]() |
Kage Studio 0.7.240121
A Simple Free and Open Source 2D Animation Software
|
#include <vectordatamanager.h>
Public Member Functions | |
VectorDataManager () | |
VectorDataManager (std::vector< VectorData > p_vectorData) | |
virtual | ~VectorDataManager () |
void | setVectorData (std::vector< VectorData > p_vectorData) |
std::vector< VectorData > | getVectorData () |
VectorDataManager | clone () |
void | clear () |
void | addInit () |
void | addInit (PointData p_point) |
void | addFill (ColorData p_color) |
void | addFill (std::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_size, PointData p_scale, PointData p_rotateAlpha) |
void | push (VectorDataManager p_vectorsData) |
bool | isEmpty () |
std::vector< unsigned int > | raiseSelectedShape (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | lowerSelectedShape (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | raiseToTopSelectedShape (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | lowerToBottomSelectedShape (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | groupSelectedShapes (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | ungroupSelectedShapes (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | duplicateShapes (std::vector< unsigned int > p_selectedShapes) |
bool | flipHorizontalSelectedShape (std::vector< unsigned int > p_selectedShapes) |
bool | flipVerticalSelectedShape (std::vector< unsigned int > p_selectedShapes) |
bool | recenterRotationPoint (std::vector< unsigned int > p_selectedShapes) |
unsigned int | getShape (unsigned int p_index) |
bool | isSelectedShape (unsigned int p_index) |
void | addSelectedShape (unsigned int p_index) |
std::vector< unsigned int > | tryMultiSelectShapes_populateShapes () |
std::vector< unsigned int > | selectAllShapes () |
bool | cutSelectedShapes () |
std::vector< VectorData > | copySelectedShapes (std::vector< unsigned int > p_selectedShapes) |
std::vector< unsigned int > | pasteSelectedShapes (std::vector< VectorData > p_vectorDataCopyBuffer) |
bool | deleteSelectedShapes (std::vector< unsigned int > p_selectedShapes) |
void | add (VectorData::type p_type, ColorData p_fill, StrokeColorData p_stroke) |
void | add (VectorData::type p_type, std::string p_fillGradientID, StrokeColorData p_stroke) |
void | addCurve (PointData p_point1, PointData p_point2, PointData p_point3, VectorData::type p_curveType) |
Data Fields | |
const unsigned int | _NO_SELECTION = -1 |
std::vector< unsigned int > | _selectedNodes |
std::vector< unsigned int > | _selectedShapes |
std::vector< VectorData > | vectorData |
Static Public Attributes | |
static unsigned int | idmaker |
VectorDataManager::VectorDataManager | ( | ) |
VectorDataManager::VectorDataManager | ( | std::vector< VectorData > | p_vectorData | ) |
|
virtual |
void VectorDataManager::add | ( | VectorData::type | p_type, |
ColorData | p_fill, | ||
StrokeColorData | p_stroke ) |
void VectorDataManager::add | ( | VectorData::type | p_type, |
std::string | p_fillGradientID, | ||
StrokeColorData | p_stroke ) |
void VectorDataManager::addClosePath | ( | ) |
void VectorDataManager::addCurve | ( | PointData | p_point1, |
PointData | p_point2, | ||
PointData | p_point3, | ||
VectorData::type | p_curveType ) |
void VectorDataManager::addEndFill | ( | ) |
void VectorDataManager::addFill | ( | ColorData | p_color | ) |
void VectorDataManager::addFill | ( | std::string | p_gradientID | ) |
void VectorDataManager::addImage | ( | PointData | p_IDandBuff, |
PointData | p_xy, | ||
PointData | p_size, | ||
PointData | p_scale, | ||
PointData | p_rotateAlpha ) |
void VectorDataManager::addInit | ( | ) |
void VectorDataManager::addInit | ( | PointData | p_point | ) |
void VectorDataManager::addLine | ( | PointData | p_point | ) |
void VectorDataManager::addLinePoly | ( | PointData | p_point, |
double | p_x, | ||
double | p_y ) |
void VectorDataManager::addLineStyle | ( | StrokeColorData | p_stroke | ) |
void VectorDataManager::addMove | ( | PointData | p_point | ) |
void VectorDataManager::addSelectedShape | ( | unsigned int | p_index | ) |
void VectorDataManager::clear | ( | ) |
VectorDataManager VectorDataManager::clone | ( | ) |
std::vector< VectorData > VectorDataManager::copySelectedShapes | ( | std::vector< unsigned int > | p_selectedShapes | ) |
bool VectorDataManager::cutSelectedShapes | ( | ) |
bool VectorDataManager::deleteSelectedShapes | ( | std::vector< unsigned int > | p_selectedShapes | ) |
std::vector< unsigned int > VectorDataManager::duplicateShapes | ( | std::vector< unsigned int > | p_selectedShapes | ) |
bool VectorDataManager::flipHorizontalSelectedShape | ( | std::vector< unsigned int > | p_selectedShapes | ) |
bool VectorDataManager::flipVerticalSelectedShape | ( | std::vector< unsigned int > | p_selectedShapes | ) |
unsigned int VectorDataManager::getShape | ( | unsigned int | p_index | ) |
std::vector< VectorData > VectorDataManager::getVectorData | ( | ) |
std::vector< unsigned int > VectorDataManager::groupSelectedShapes | ( | std::vector< unsigned int > | p_selectedShapes | ) |
erase index if vectorType is TYPE INIT
bool VectorDataManager::isEmpty | ( | ) |
bool VectorDataManager::isSelectedShape | ( | unsigned int | p_index | ) |
std::vector< unsigned int > VectorDataManager::lowerSelectedShape | ( | std::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
std::vector< unsigned int > VectorDataManager::lowerToBottomSelectedShape | ( | std::vector< unsigned int > | p_selectedShapes | ) |
To move selected item to the bottom of z-ordering,
std::vector< unsigned int > VectorDataManager::pasteSelectedShapes | ( | std::vector< VectorData > | p_vectorDataCopyBuffer | ) |
void VectorDataManager::push | ( | VectorDataManager | p_vectorsData | ) |
std::vector< unsigned int > VectorDataManager::raiseSelectedShape | ( | std::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
std::vector< unsigned int > VectorDataManager::raiseToTopSelectedShape | ( | std::vector< unsigned int > | p_selectedShapes | ) |
To move selected item to the top of z-ordering,
bool VectorDataManager::recenterRotationPoint | ( | std::vector< unsigned int > | p_selectedShapes | ) |
std::vector< unsigned int > VectorDataManager::selectAllShapes | ( | ) |
void VectorDataManager::setVectorData | ( | std::vector< VectorData > | p_vectorData | ) |
std::vector< unsigned int > VectorDataManager::tryMultiSelectShapes_populateShapes | ( | ) |
std::vector< unsigned int > VectorDataManager::ungroupSelectedShapes | ( | std::vector< unsigned int > | p_selectedShapes | ) |
insert TYPE INIT between ENDFILL and FILL
const unsigned int VectorDataManager::_NO_SELECTION = -1 |
std::vector<unsigned int> VectorDataManager::_selectedNodes |
std::vector<unsigned int> VectorDataManager::_selectedShapes |
|
static |
std::vector<VectorData> VectorDataManager::vectorData |