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

#include <stage.h>

Inheritance diagram for KageStage:
Collaboration diagram for KageStage:

Public Types

enum  ToolMode {
  MODE_NONE , MODE_SELECT , MODE_NODE , MODE_STROKE ,
  MODE_FILL , MODE_EYEDROP , MODE_ZOOM , MODE_MOVE_STAGE ,
  MODE_DRAW_RECT , MODE_DRAW_TEXT , MODE_DRAW_POLY , MODE_DRAW_OVAL ,
  MODE_DRAW_LINE , MODE_DRAW_PENCIL
}
 

Public Member Functions

 KageStage (Kage *p_kage)
 
virtual ~KageStage ()
 
void printVectors (std::vector< VectorData > p_vectorData)
 
void cleanSlate ()
 
void invalidateToRender ()
 
void setFill (Gdk::Color p_Color)
 
Gdk::Color getFill ()
 
void setStroke (Gdk::Color p_Color)
 
Gdk::Color getStroke ()
 
void clearScreen (Cairo::RefPtr< Cairo::Context > p_context)
 for use with zoom; default value is _kage->_document._width; can be changed as preferred
 
void renderFrame (Cairo::RefPtr< Cairo::Context > p_context, bool p_force=false)
 
void renderOnionFrame (Cairo::RefPtr< Cairo::Context > p_context, std::vector< VectorData > p_vectorData, double p_alpha)
 
void renderFrame (Cairo::RefPtr< Cairo::Context > p_context, std::vector< VectorData > p_vectorData, double p_alpha=1.0)
 
void renderFrameOffset (Cairo::RefPtr< Cairo::Context > p_context, bool p_force=false, double p_offsetX=0.0, double p_offsetY=0.0)
 
void renderFrameOffset (Cairo::RefPtr< Cairo::Context > p_context, std::vector< VectorData > p_vectorData, double p_alpha=1.0, double p_offsetX=0.0, double p_offsetY=0.0)
 
unsigned int addImage (unsigned int p_ID, double p_x, double p_y)
 
unsigned int addImage (unsigned int p_ID)
 This will return a Cairo::ImageSurface array-index to be used as ID for rendering on Stage or Library.
 
void initNodeTool ()
 
void handleShapes ()
 
void handleShapes_modifyingShapeRotate ()
 
void handleShapes_modifyingShape ()
 
void handleShapes_scaleNorth ()
 
void handleShapes_scaleEast ()
 
void handleShapes_scaleWest ()
 
void handleShapes_scaleSouth ()
 
void handleShapes_moveShape (double p_diffX, double p_diffY)
 
void handleShapes_updateAnchors (double p_x, double p_y)
 
void handleShapesMouseDown ()
 
void handleShapesMouseUp ()
 
void handleNodes ()
 
void handleNodes_selection ()
 
void handleNodes_relocation ()
 
void handleNodes_rendering ()
 
void handleNodesMouseDown ()
 
void handleNodesMouseUp ()
 
bool handleNodes_getNearestShape (double p_x, double p_y, unsigned int p_index, std::vector< VectorData > p_v)
 
void handleDrawOvalMouseUp ()
 
void handleDrawRectMouseUp ()
 
void handleDrawPolyMouseUp ()
 
void handleDrawPencilMouseDown (PointData p_point)
 
void handleDrawPencilMouseMove (PointData p_point)
 
void handleDrawPencilMouseUp ()
 
void handleOval ()
 
void handleRect ()
 
void handlePoly ()
 
void handlePencil ()
 
void handleStroke ()
 
void handleStrokeMouseMove ()
 
void handleStrokeMouseUp ()
 
void handleFill ()
 
void handleFillMouseUp ()
 
void handleEyedrop ()
 
void handleEyedropMouseMove ()
 
void handleEyedropMouseUp ()
 
void updateShapeRotation (float l_rotation)
 updates selected Shapes's Rotation
 
void updateImageAlpha (float l_alpha)
 updates selected Image's Alpha
 
bool selectAllShapes ()
 
bool deselectSelectedShapes ()
 
bool deselectSelectedNodes ()
 
bool cancelDrawingPoly ()
 
bool cutSelectedShapes ()
 
bool copySelectedShapes ()
 
bool pasteSelectedShapes ()
 
bool deleteSelectedShapes ()
 
bool deleteSelectedNodes ()
 
bool toggleLineSelectedNodes ()
 
void updateNodeXY ()
 
bool isSelectedNode (unsigned int p_index)
 
void addSelectedNode (unsigned int p_index)
 
bool isSelectedShape (unsigned int p_index)
 
void addSelectedShape (unsigned int p_index)
 
void trySingleSelectShape ()
 
void tryMultiSelectShapes ()
 
void tryMultiSelectShapes_populateShapes ()
 
unsigned int getShape (unsigned int p_index, std::vector< VectorData > p_v)
 
void updateShapeColor (bool p_doFill=true, bool p_doStroke=true)
 
void updateShapeX (double p_value, bool p_stackDo=true)
 
void updateShapeY (double p_value, bool p_stackDo=true)
 
void updateShapeWidth (double p_value)
 
void updateShapeHeight (double p_value)
 
void updateNodeX (double p_value, bool p_stackDo=true)
 
void updateNodeY (double p_value, bool p_stackDo=true)
 
bool renderToPNG (std::string p_path, bool p_transparent)
 
bool renderToPNGOffset (std::string p_path, bool p_transparent, double p_offsetX=0.0, double p_offsetY=0.0)
 
void renderFrameToPNG (Cairo::RefPtr< Cairo::Context > p_context)
 
void renderFrameToPNGOffset (Cairo::RefPtr< Cairo::Context > p_context, double p_offsetX=0.0, double p_offsetY=0.0)
 
PointData applyZoomRatio (PointData p_value)
 
void setSelectedShapes (std::vector< unsigned int > p_selectedShapes)
 
std::vector< unsigned int > getSelectedShapes ()
 
void unpressKeys ()
 

Data Fields

const unsigned int _NO_SELECTION = -1
 
double fpsElapse
 
double propX = 0
 
int propXindex1
 
int propXindex2
 
double propY = 0
 
int propYindex1
 
int propYindex2
 
double propWidth = 0
 
double propHeight = 0
 
double propRotation = 0
 
double nodeX = 0
 
double nodeY = 0
 
unsigned int nodeIndexX = 0
 
unsigned int nodeIndexY = 0
 
bool _invalidated
 
Glib::RefPtr< Gdk::Pixbuf > _bg
 
Cairo::RefPtr< Cairo::Surface > _bgcr
 
bool _stackDo = false
 
std::vector< VectorData_vectorDataCopyBuffer
 
std::vector< VectorData_vectorDataZOrderBufferA
 
std::vector< VectorData_vectorDataZOrderBufferB
 
std::vector< VectorData_vectorDataZOrderBufferC
 
Cairo::RefPtr< Cairo::Context > cr
 
bool _isModifyingShape
 
double _zoomRatio
 
PointData _zoomReference
 
PointData __origin
 
PointData __stageArea
 
PointData _rotateReference
 
bool _rotateMode
 
bool _rotateApply
 
std::vector< unsigned int > selectedNodes
 
std::vector< unsigned int > selectedShapes
 

Static Public Attributes

static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_000
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_045
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_090
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_135
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_MOVE
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_NE
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_NW
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_SW
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_SE
 
static Glib::RefPtr< Gdk::Pixbuf > imageSHAPE_ROTATE
 
static ColorData fillColor
 
static StrokeColorData stroke
 direct use for get only
 
static ColorData pencilFillColor
 direct use for get only
 
static StrokeColorData pencilStroke
 direct use for get only
 
static ToolMode toolMode = MODE_NONE
 direct use for get only
 
static GdkPoint moveStageXY
 
static float propAlpha = 1.0f
 
static double currentScale
 
static PointData origin
 
static double _zoomValue
 
static std::vector< Cairo::RefPtr< Cairo::ImageSurface > > cairoPNG
 
static Cairo::RefPtr< Cairo::ImageSurface > cairoImageSurface
 

Protected Member Functions

virtual bool on_expose_event (GdkEventExpose *e)
 
virtual bool on_key_press_event (GdkEventKey *e) override
 
virtual bool on_key_release_event (GdkEventKey *e) override
 
virtual bool on_event (GdkEvent *e) override
 
bool on_draw (const Cairo::RefPtr< Cairo::Context > &cr) override
 Called by Gtkmm when DrawingArea's display is invalidated.
 
bool on_timeout ()
 
void renderNode (double p_x, double p_y, unsigned int p_state=5)
 
void renderNodeControl (double p_x, double p_y, bool p_selected)
 
bool isMouseOnNode (double p_x, double p_y, unsigned int p_buffer=5)
 
bool isSelectionBoxNormalized ()
 
void normalizeSelectionBox ()
 
bool isNodeOnSelectionBox (double p_nodeX, double p_nodeY)
 
void drawSelectionArea ()
 
bool deleteSelectedNode (unsigned int p_index)
 
unsigned int getSelectedShapeViaNode (unsigned int p_index, std::vector< VectorData > p_v)
 
void updateShapeXY ()
 

Protected Attributes

ToolMode prevTool
 
Kage_kage
 
PointData draw1
 
PointData draw2
 
PointData drawFree1
 
PointData drawFree2
 
PointData drawFree3
 
PointData drawFree4
 
short int drawFreeCtr
 
GdkPoint drawConstraint
 
double polyXhead
 
double polyYhead
 
double polyXtail
 
double polyYtail
 
VectorDataManager _polyVectors
 
Glib::RefPtr< Gdk::Window > window
 
bool mouseDown
 
GdkPoint _mouseLocation
 
unsigned int _mouseLocationShapeIndex
 
GdkPoint _copyBufferMouse
 
bool draw
 
unsigned int drawCtr
 
unsigned int mouseOnNode
 
PointData mouseOnNodeOffset
 
unsigned int mouseOnNodeHover
 
unsigned int mouseOnNodeIndex
 
unsigned int selectedNode
 
unsigned int mouseOnShape
 
unsigned int selectedShape
 
AnchorData::type mouseOnAnchor
 
PointData selectionBox1
 
PointData selectionBox2
 
double _nodeToMouseDistance
 
AnchorData anchor_upperLeft
 
AnchorData anchor_center
 
AnchorData anchor_lowerRight
 
AnchorData anchor_rotate
 
bool keyShiftDown
 
bool keyControlDown
 
bool keyUpDown
 
bool keyDownDown
 
bool keyLeftDown
 
bool keyRightDown
 
int _registerWidth
 
int _registerHeight
 

Member Enumeration Documentation

◆ ToolMode

Enumerator
MODE_NONE 
MODE_SELECT 
MODE_NODE 
MODE_STROKE 
MODE_FILL 
MODE_EYEDROP 
MODE_ZOOM 
MODE_MOVE_STAGE 
MODE_DRAW_RECT 
MODE_DRAW_TEXT 
MODE_DRAW_POLY 
MODE_DRAW_OVAL 
MODE_DRAW_LINE 
MODE_DRAW_PENCIL 

Constructor & Destructor Documentation

◆ KageStage()

KageStage::KageStage ( Kage * p_kage)
Here is the call graph for this function:

◆ ~KageStage()

KageStage::~KageStage ( )
virtual

Member Function Documentation

◆ addImage() [1/2]

unsigned int KageStage::addImage ( unsigned int p_ID)

This will return a Cairo::ImageSurface array-index to be used as ID for rendering on Stage or Library.

Parameters
p_IDreference ID from Assets
Returns
unsigned int
Here is the call graph for this function:

◆ addImage() [2/2]

unsigned int KageStage::addImage ( unsigned int p_ID,
double p_x,
double p_y )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSelectedNode()

void KageStage::addSelectedNode ( unsigned int p_index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addSelectedShape()

void KageStage::addSelectedShape ( unsigned int p_index)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ applyZoomRatio()

PointData KageStage::applyZoomRatio ( PointData p_value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cancelDrawingPoly()

bool KageStage::cancelDrawingPoly ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanSlate()

void KageStage::cleanSlate ( )
Here is the call graph for this function:

◆ clearScreen()

void KageStage::clearScreen ( Cairo::RefPtr< Cairo::Context > p_context)

for use with zoom; default value is _kage->_document._width; can be changed as preferred

Here is the caller graph for this function:

◆ copySelectedShapes()

bool KageStage::copySelectedShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cutSelectedShapes()

bool KageStage::cutSelectedShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteSelectedNode()

bool KageStage::deleteSelectedNode ( unsigned int p_index)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteSelectedNodes()

bool KageStage::deleteSelectedNodes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteSelectedShapes()

bool KageStage::deleteSelectedShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deselectSelectedNodes()

bool KageStage::deselectSelectedNodes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deselectSelectedShapes()

bool KageStage::deselectSelectedShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawSelectionArea()

void KageStage::drawSelectionArea ( )
protected
Here is the caller graph for this function:

◆ getFill()

Gdk::Color KageStage::getFill ( )

◆ getSelectedShapes()

std::vector< unsigned int > KageStage::getSelectedShapes ( )

◆ getSelectedShapeViaNode()

unsigned int KageStage::getSelectedShapeViaNode ( unsigned int p_index,
std::vector< VectorData > p_v )
protected
Here is the caller graph for this function:

◆ getShape()

unsigned int KageStage::getShape ( unsigned int p_index,
std::vector< VectorData > p_v )
Here is the caller graph for this function:

◆ getStroke()

Gdk::Color KageStage::getStroke ( )

◆ handleDrawOvalMouseUp()

void KageStage::handleDrawOvalMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleDrawPencilMouseDown()

void KageStage::handleDrawPencilMouseDown ( PointData p_point)
Here is the caller graph for this function:

◆ handleDrawPencilMouseMove()

void KageStage::handleDrawPencilMouseMove ( PointData p_point)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleDrawPencilMouseUp()

void KageStage::handleDrawPencilMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleDrawPolyMouseUp()

void KageStage::handleDrawPolyMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleDrawRectMouseUp()

void KageStage::handleDrawRectMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleEyedrop()

void KageStage::handleEyedrop ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleEyedropMouseMove()

void KageStage::handleEyedropMouseMove ( )
Here is the caller graph for this function:

◆ handleEyedropMouseUp()

void KageStage::handleEyedropMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleFill()

void KageStage::handleFill ( )
Here is the caller graph for this function:

◆ handleFillMouseUp()

void KageStage::handleFillMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleNodes()

void KageStage::handleNodes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleNodes_getNearestShape()

bool KageStage::handleNodes_getNearestShape ( double p_x,
double p_y,
unsigned int p_index,
std::vector< VectorData > p_v )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleNodes_relocation()

void KageStage::handleNodes_relocation ( )

make sure last point before end fill is in-sync with MOVE(shape's start point)

get index of MOVE of selectedNode

register i for later use in ENDFILL

register i for later use in ENDFILL <– note from newer handling of Poly

get index of MOVE of selectedNode

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

◆ handleNodes_rendering()

void KageStage::handleNodes_rendering ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleNodes_selection()

void KageStage::handleNodes_selection ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleNodesMouseDown()

void KageStage::handleNodesMouseDown ( )

◆ handleNodesMouseUp()

void KageStage::handleNodesMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleOval()

void KageStage::handleOval ( )
Here is the caller graph for this function:

◆ handlePencil()

void KageStage::handlePencil ( )
Here is the caller graph for this function:

◆ handlePoly()

void KageStage::handlePoly ( )
Here is the caller graph for this function:

◆ handleRect()

void KageStage::handleRect ( )
Here is the caller graph for this function:

◆ handleShapes()

void KageStage::handleShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleShapes_modifyingShape()

void KageStage::handleShapes_modifyingShape ( )

NOTE: don't use ELSE-IF to apply changes ASAP

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

◆ handleShapes_modifyingShapeRotate()

void KageStage::handleShapes_modifyingShapeRotate ( )
Here is the caller graph for this function:

◆ handleShapes_moveShape()

void KageStage::handleShapes_moveShape ( double p_diffX,
double p_diffY )

register i for later use in ENDFILL

Here is the caller graph for this function:

◆ handleShapes_scaleEast()

void KageStage::handleShapes_scaleEast ( )

register i for later use in ENDFILL

NOTE: current implementation thinks image origin is top-left (or X/Y) or image

Here is the caller graph for this function:

◆ handleShapes_scaleNorth()

void KageStage::handleShapes_scaleNorth ( )

register i for later use in ENDFILL

NOTE: current implementation thinks image origin is top-left (or X/Y) or image

Here is the caller graph for this function:

◆ handleShapes_scaleSouth()

void KageStage::handleShapes_scaleSouth ( )

register i for later use in ENDFILL

NOTE: current implementation thinks image origin is top-left (or X/Y) or image

Here is the caller graph for this function:

◆ handleShapes_scaleWest()

void KageStage::handleShapes_scaleWest ( )

register i for later use in ENDFILL

NOTE: current implementation thinks image origin is top-left (or X/Y) or image

Here is the caller graph for this function:

◆ handleShapes_updateAnchors()

void KageStage::handleShapes_updateAnchors ( double p_x,
double p_y )
Here is the caller graph for this function:

◆ handleShapesMouseDown()

void KageStage::handleShapesMouseDown ( )

◆ handleShapesMouseUp()

void KageStage::handleShapesMouseUp ( )

check if still be used; as of 2019 Nov 24, nothing is calling it

Here is the call graph for this function:

◆ handleStroke()

void KageStage::handleStroke ( )

◆ handleStrokeMouseMove()

void KageStage::handleStrokeMouseMove ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleStrokeMouseUp()

void KageStage::handleStrokeMouseUp ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initNodeTool()

void KageStage::initNodeTool ( )
Here is the caller graph for this function:

◆ invalidateToRender()

void KageStage::invalidateToRender ( )
Here is the caller graph for this function:

◆ isMouseOnNode()

bool KageStage::isMouseOnNode ( double p_x,
double p_y,
unsigned int p_buffer = 5 )
protected
Here is the caller graph for this function:

◆ isNodeOnSelectionBox()

bool KageStage::isNodeOnSelectionBox ( double p_nodeX,
double p_nodeY )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSelectedNode()

bool KageStage::isSelectedNode ( unsigned int p_index)
Here is the caller graph for this function:

◆ isSelectedShape()

bool KageStage::isSelectedShape ( unsigned int p_index)
Here is the caller graph for this function:

◆ isSelectionBoxNormalized()

bool KageStage::isSelectionBoxNormalized ( )
protected
Here is the caller graph for this function:

◆ normalizeSelectionBox()

void KageStage::normalizeSelectionBox ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_draw()

bool KageStage::on_draw ( const Cairo::RefPtr< Cairo::Context > & p_cr)
overrideprotected

Called by Gtkmm when DrawingArea's display is invalidated.

Parameters
p_crCairo context object on which lines/shapes/image is applied to.
Returns
true
false
Here is the call graph for this function:

◆ on_event()

bool KageStage::on_event ( GdkEvent * e)
overrideprotectedvirtual

struct _GdkEventConfigure { GdkEventType type; GdkWindow *window; gint8 send_event; gint16 x, y; gint16 width; gint16 height; };

Here is the call graph for this function:

◆ on_expose_event()

bool KageStage::on_expose_event ( GdkEventExpose * e)
protectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_key_press_event()

bool KageStage::on_key_press_event ( GdkEventKey * e)
overrideprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_key_release_event()

bool KageStage::on_key_release_event ( GdkEventKey * e)
overrideprotectedvirtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ on_timeout()

bool KageStage::on_timeout ( )
protected

◆ pasteSelectedShapes()

bool KageStage::pasteSelectedShapes ( )
Here is the call graph for this function:

◆ printVectors()

void KageStage::printVectors ( std::vector< VectorData > p_vectorData)
Here is the call graph for this function:

◆ renderFrame() [1/2]

void KageStage::renderFrame ( Cairo::RefPtr< Cairo::Context > p_context,
bool p_force = false )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderFrame() [2/2]

void KageStage::renderFrame ( Cairo::RefPtr< Cairo::Context > p_context,
std::vector< VectorData > p_vectorData,
double p_alpha = 1.0 )
Here is the call graph for this function:

◆ renderFrameOffset() [1/2]

void KageStage::renderFrameOffset ( Cairo::RefPtr< Cairo::Context > p_context,
bool p_force = false,
double p_offsetX = 0.0,
double p_offsetY = 0.0 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderFrameOffset() [2/2]

void KageStage::renderFrameOffset ( Cairo::RefPtr< Cairo::Context > p_context,
std::vector< VectorData > p_vectorData,
double p_alpha = 1.0,
double p_offsetX = 0.0,
double p_offsetY = 0.0 )
Here is the call graph for this function:

◆ renderFrameToPNG()

void KageStage::renderFrameToPNG ( Cairo::RefPtr< Cairo::Context > p_context)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderFrameToPNGOffset()

void KageStage::renderFrameToPNGOffset ( Cairo::RefPtr< Cairo::Context > p_context,
double p_offsetX = 0.0,
double p_offsetY = 0.0 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderNode()

void KageStage::renderNode ( double p_x,
double p_y,
unsigned int p_state = 5 )
protected
Here is the caller graph for this function:

◆ renderNodeControl()

void KageStage::renderNodeControl ( double p_x,
double p_y,
bool p_selected )
protected
Here is the caller graph for this function:

◆ renderOnionFrame()

void KageStage::renderOnionFrame ( Cairo::RefPtr< Cairo::Context > p_context,
std::vector< VectorData > p_vectorData,
double p_alpha )

For use by Kage, when Onion Skin is toggled

Here is the call graph for this function:

◆ renderToPNG()

bool KageStage::renderToPNG ( std::string p_path,
bool p_transparent )
Here is the call graph for this function:

◆ renderToPNGOffset()

bool KageStage::renderToPNGOffset ( std::string p_path,
bool p_transparent,
double p_offsetX = 0.0,
double p_offsetY = 0.0 )
Here is the call graph for this function:

◆ selectAllShapes()

bool KageStage::selectAllShapes ( )
Here is the call graph for this function:

◆ setFill()

void KageStage::setFill ( Gdk::Color p_Color)
Here is the call graph for this function:

◆ setSelectedShapes()

void KageStage::setSelectedShapes ( std::vector< unsigned int > p_selectedShapes)
Here is the call graph for this function:

◆ setStroke()

void KageStage::setStroke ( Gdk::Color p_Color)
Here is the call graph for this function:

◆ toggleLineSelectedNodes()

bool KageStage::toggleLineSelectedNodes ( )
Here is the call graph for this function:

◆ tryMultiSelectShapes()

void KageStage::tryMultiSelectShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryMultiSelectShapes_populateShapes()

void KageStage::tryMultiSelectShapes_populateShapes ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ trySingleSelectShape()

void KageStage::trySingleSelectShape ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ unpressKeys()

void KageStage::unpressKeys ( )
Here is the caller graph for this function:

◆ updateImageAlpha()

void KageStage::updateImageAlpha ( float l_alpha)

updates selected Image's Alpha

Parameters
l_alpha
Here is the call graph for this function:

◆ updateNodeX()

void KageStage::updateNodeX ( double p_value,
bool p_stackDo = true )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNodeXY()

void KageStage::updateNodeXY ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateNodeY()

void KageStage::updateNodeY ( double p_value,
bool p_stackDo = true )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShapeColor()

void KageStage::updateShapeColor ( bool p_doFill = true,
bool p_doStroke = true )
Here is the call graph for this function:

◆ updateShapeHeight()

void KageStage::updateShapeHeight ( double p_value)
Here is the call graph for this function:

◆ updateShapeRotation()

void KageStage::updateShapeRotation ( float l_rotation)

updates selected Shapes's Rotation

Parameters
l_rotation

◆ updateShapeWidth()

void KageStage::updateShapeWidth ( double p_value)
Here is the call graph for this function:

◆ updateShapeX()

void KageStage::updateShapeX ( double p_value,
bool p_stackDo = true )
Here is the call graph for this function:

◆ updateShapeXY()

void KageStage::updateShapeXY ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShapeY()

void KageStage::updateShapeY ( double p_value,
bool p_stackDo = true )
Here is the call graph for this function:

Field Documentation

◆ __origin

PointData KageStage::__origin

◆ __stageArea

PointData KageStage::__stageArea

◆ _bg

Glib::RefPtr<Gdk::Pixbuf> KageStage::_bg

◆ _bgcr

Cairo::RefPtr<Cairo::Surface> KageStage::_bgcr

◆ _copyBufferMouse

GdkPoint KageStage::_copyBufferMouse
protected

◆ _invalidated

bool KageStage::_invalidated

◆ _isModifyingShape

bool KageStage::_isModifyingShape

◆ _kage

Kage* KageStage::_kage
protected

◆ _mouseLocation

GdkPoint KageStage::_mouseLocation
protected

◆ _mouseLocationShapeIndex

unsigned int KageStage::_mouseLocationShapeIndex
protected

◆ _NO_SELECTION

const unsigned int KageStage::_NO_SELECTION = -1

◆ _nodeToMouseDistance

double KageStage::_nodeToMouseDistance
protected

◆ _polyVectors

VectorDataManager KageStage::_polyVectors
protected

◆ _registerHeight

int KageStage::_registerHeight
protected

◆ _registerWidth

int KageStage::_registerWidth
protected

◆ _rotateApply

bool KageStage::_rotateApply

◆ _rotateMode

bool KageStage::_rotateMode

◆ _rotateReference

PointData KageStage::_rotateReference

◆ _stackDo

bool KageStage::_stackDo = false

◆ _vectorDataCopyBuffer

std::vector<VectorData> KageStage::_vectorDataCopyBuffer

◆ _vectorDataZOrderBufferA

std::vector<VectorData> KageStage::_vectorDataZOrderBufferA

◆ _vectorDataZOrderBufferB

std::vector<VectorData> KageStage::_vectorDataZOrderBufferB

◆ _vectorDataZOrderBufferC

std::vector<VectorData> KageStage::_vectorDataZOrderBufferC

◆ _zoomRatio

double KageStage::_zoomRatio

◆ _zoomReference

PointData KageStage::_zoomReference

◆ _zoomValue

double KageStage::_zoomValue
static

◆ anchor_center

AnchorData KageStage::anchor_center
protected

◆ anchor_lowerRight

AnchorData KageStage::anchor_lowerRight
protected

◆ anchor_rotate

AnchorData KageStage::anchor_rotate
protected

◆ anchor_upperLeft

AnchorData KageStage::anchor_upperLeft
protected

◆ cairoImageSurface

Cairo::RefPtr< Cairo::ImageSurface > KageStage::cairoImageSurface
static

◆ cairoPNG

std::vector< Cairo::RefPtr< Cairo::ImageSurface > > KageStage::cairoPNG
static

◆ cr

Cairo::RefPtr<Cairo::Context> KageStage::cr

◆ currentScale

double KageStage::currentScale
static

◆ draw

bool KageStage::draw
protected

◆ draw1

PointData KageStage::draw1
protected

◆ draw2

PointData KageStage::draw2
protected

◆ drawConstraint

GdkPoint KageStage::drawConstraint
protected

◆ drawCtr

unsigned int KageStage::drawCtr
protected

◆ drawFree1

PointData KageStage::drawFree1
protected

◆ drawFree2

PointData KageStage::drawFree2
protected

◆ drawFree3

PointData KageStage::drawFree3
protected

◆ drawFree4

PointData KageStage::drawFree4
protected

◆ drawFreeCtr

short int KageStage::drawFreeCtr
protected

◆ fillColor

ColorData KageStage::fillColor
static

◆ fpsElapse

double KageStage::fpsElapse

◆ imageSHAPE_000

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_000
static

◆ imageSHAPE_045

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_045
static

◆ imageSHAPE_090

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_090
static

◆ imageSHAPE_135

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_135
static

◆ imageSHAPE_MOVE

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_MOVE
static

◆ imageSHAPE_NE

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_NE
static

◆ imageSHAPE_NW

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_NW
static

◆ imageSHAPE_ROTATE

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_ROTATE
static

◆ imageSHAPE_SE

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_SE
static

◆ imageSHAPE_SW

Glib::RefPtr< Gdk::Pixbuf > KageStage::imageSHAPE_SW
static

◆ keyControlDown

bool KageStage::keyControlDown
protected

◆ keyDownDown

bool KageStage::keyDownDown
protected

◆ keyLeftDown

bool KageStage::keyLeftDown
protected

◆ keyRightDown

bool KageStage::keyRightDown
protected

◆ keyShiftDown

bool KageStage::keyShiftDown
protected

◆ keyUpDown

bool KageStage::keyUpDown
protected

◆ mouseDown

bool KageStage::mouseDown
protected

◆ mouseOnAnchor

AnchorData::type KageStage::mouseOnAnchor
protected

◆ mouseOnNode

unsigned int KageStage::mouseOnNode
protected

◆ mouseOnNodeHover

unsigned int KageStage::mouseOnNodeHover
protected

◆ mouseOnNodeIndex

unsigned int KageStage::mouseOnNodeIndex
protected

◆ mouseOnNodeOffset

PointData KageStage::mouseOnNodeOffset
protected

◆ mouseOnShape

unsigned int KageStage::mouseOnShape
protected

◆ moveStageXY

GdkPoint KageStage::moveStageXY
static

◆ nodeIndexX

unsigned int KageStage::nodeIndexX = 0

◆ nodeIndexY

unsigned int KageStage::nodeIndexY = 0

◆ nodeX

double KageStage::nodeX = 0

◆ nodeY

double KageStage::nodeY = 0

◆ origin

PointData KageStage::origin
static

◆ pencilFillColor

ColorData KageStage::pencilFillColor
static

direct use for get only

◆ pencilStroke

StrokeColorData KageStage::pencilStroke
static

direct use for get only

◆ polyXhead

double KageStage::polyXhead
protected

◆ polyXtail

double KageStage::polyXtail
protected

◆ polyYhead

double KageStage::polyYhead
protected

◆ polyYtail

double KageStage::polyYtail
protected

◆ prevTool

ToolMode KageStage::prevTool
protected

◆ propAlpha

float KageStage::propAlpha = 1.0f
static

◆ propHeight

double KageStage::propHeight = 0

◆ propRotation

double KageStage::propRotation = 0

◆ propWidth

double KageStage::propWidth = 0

◆ propX

double KageStage::propX = 0

◆ propXindex1

int KageStage::propXindex1

◆ propXindex2

int KageStage::propXindex2

◆ propY

double KageStage::propY = 0

◆ propYindex1

int KageStage::propYindex1

◆ propYindex2

int KageStage::propYindex2

◆ selectedNode

unsigned int KageStage::selectedNode
protected

◆ selectedNodes

std::vector<unsigned int> KageStage::selectedNodes

◆ selectedShape

unsigned int KageStage::selectedShape
protected

◆ selectedShapes

std::vector<unsigned int> KageStage::selectedShapes

◆ selectionBox1

PointData KageStage::selectionBox1
protected

◆ selectionBox2

PointData KageStage::selectionBox2
protected

◆ stroke

StrokeColorData KageStage::stroke
static

direct use for get only

◆ toolMode

KageStage::ToolMode KageStage::toolMode = MODE_NONE
static

direct use for get only

◆ window

Glib::RefPtr<Gdk::Window> KageStage::window
protected

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