Pencil2D
Pencil2D is an animation software for both bitmap and vector graphics. It is free, multi-platform, and open source.
Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ScribbleArea Class Reference
+ Inheritance diagram for ScribbleArea:

Public Types

enum  MoveMode {
  MIDDLE, TOPLEFT, TOPRIGHT, BOTTOMLEFT,
  BOTTOMRIGHT, ROTATION, SYMMETRY, NONE
}
 

Public Slots

void clearImage ()
 
void calculateSelectionRect ()
 
QTransform getSelectionTransformation ()
 
void calculateSelectionTransformation ()
 
void paintTransformedSelection ()
 
void applyTransformedSelection ()
 
void cancelTransformedSelection ()
 
void setModified (int layerNumber, int frameNumber)
 
void selectAll ()
 
void deselectAll ()
 
void setCurveSmoothing (int)
 
void toggleThinLines ()
 
void toggleOutlines ()
 
void toggleShowAllLayers ()
 
void escape ()
 
void togglePopupPalette ()
 
void updateToolCursor ()
 
void paletteColorChanged (QColor)
 

Signals

void modification ()
 
void modification (int)
 
void multiLayerOnionSkinChanged (bool)
 
void refreshPreview ()
 

Public Member Functions

 ScribbleArea (QWidget *parent)
 
bool init ()
 
void setCore (Editor *pCore)
 
void deleteSelection ()
 
void setSelection (QRectF rect, bool)
 
void displaySelectionProperties ()
 
QRectF getSelection () const
 
bool areLayersSane () const
 
bool isLayerPaintable () const
 
void setEffect (SETTING e, bool isOn)
 
int showAllLayers () const
 
qreal getCurveSmoothing () const
 
bool usePressure () const
 
bool makeInvisible () const
 
MoveMode getMoveMode () const
 
void setMoveMode (MoveMode moveMode)
 
QTransform getView ()
 
QRectF getViewRect ()
 
QPointF getCentralPoint ()
 
void updateCurrentFrame ()
 
void updateFrame (int frame)
 
void updateAllFrames ()
 
void updateAllVectorLayersAtCurrentFrame ()
 
void updateAllVectorLayersAt (int frame)
 
void updateAllVectorLayers ()
 
bool shouldUpdateAll () const
 
void setAllDirty ()
 
BaseToolcurrentTool ()
 
BaseToolgetTool (ToolType eToolMode)
 
void setCurrentTool (ToolType eToolMode)
 
void setTemporaryTool (ToolType eToolMode)
 
void setPrevTool ()
 
StrokeManagergetStrokeManager () const
 
Editoreditor ()
 
void floodFillError (int errorType)
 
bool isMouseInUse ()
 
void drawPolyline (QList< QPointF > points, QPointF lastPoint)
 
void endPolyline (QList< QPointF > points)
 
void drawLine (QPointF P1, QPointF P2, QPen pen, QPainter::CompositionMode cm)
 
void drawPath (QPainterPath path, QPen pen, QBrush brush, QPainter::CompositionMode cm)
 
void drawPen (QPointF thePoint, qreal brushWidth, QColor fillColour, qreal opacity)
 
void drawPencil (QPointF thePoint, qreal brushWidth, QColor fillColour, qreal opacity)
 
void drawBrush (QPointF thePoint, qreal brushWidth, qreal offset, QColor fillColour, qreal opacity, bool usingFeather=true)
 
void drawEraser (QPointF thePoint, qreal brushWidth, qreal offset, QColor fillColour, qreal opacity)
 
void blurBrush (BitmapImage *bmiSource_, QPointF srcPoint_, QPointF thePoint_, qreal brushWidth_, qreal offset_, qreal opacity_)
 
void liquifyBrush (BitmapImage *bmiSource_, QPointF srcPoint_, QPointF thePoint_, qreal brushWidth_, qreal offset_, qreal opacity_)
 
void paintBitmapBuffer ()
 
void paintBitmapBufferRect (QRect rect)
 
void clearBitmapBuffer ()
 
void refreshBitmap (const QRectF &rect, int rad)
 
void refreshVector (const QRectF &rect, int rad)
 
void setGaussianGradient (QGradient &gradient, QColor colour, qreal opacity, qreal offset)
 

Public Attributes

bool somethingSelected
 
QRectF mySelection
 
QRectF myTransformedSelection
 
QRectF myTempTransformedSelection
 
qreal myRotatedAngle
 
BitmapImagemBufferImg = nullptr
 
BitmapImagemStrokeImg = nullptr
 

Protected Member Functions

void tabletEvent (QTabletEvent *) override
 
void wheelEvent (QWheelEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void mouseMoveEvent (QMouseEvent *) override
 
void mouseReleaseEvent (QMouseEvent *) override
 
void mouseDoubleClickEvent (QMouseEvent *) override
 
void keyPressEvent (QKeyEvent *) override
 
void keyReleaseEvent (QKeyEvent *) override
 
void paintEvent (QPaintEvent *) override
 
void resizeEvent (QResizeEvent *) override
 

Private Member Functions

void drawCanvas (int frame, QRect rect)
 
void settingUpdated (SETTING setting)
 

Private Attributes

MoveMode mMoveMode = MIDDLE
 
ToolType mPrevTemporalToolType
 
ToolType mPrevToolType = PEN
 
BitmapImage mBitmapSelection
 
bool isTransforming = false
 
std::unique_ptr< StrokeManagermStrokeManager
 
EditormEditor = nullptr
 
bool mIsSimplified = false
 
bool mShowThinLines = false
 
bool mQuickSizing = true
 
int mShowAllLayers
 
bool mUsePressure = true
 
bool mMakeInvisible = false
 
bool mToolCursors = true
 
qreal mCurveSmoothingLevel = 0.0
 
bool mMultiLayerOnionSkin
 
QColor mOnionColor
 
bool mNeedUpdateAll = false
 
bool mKeyboardInUse = false
 
bool mMouseInUse = false
 
QPointF mLastPixel
 
QPointF mCurrentPixel
 
QPointF mLastPoint
 
QPointF mCurrentPoint
 
qreal tol
 
QList< int > mClosestCurves
 
QList< VertexRefmClosestVertices
 
QPointF mOffset
 
bool instantTool = false
 
VectorSelection vectorSelection
 
QTransform selectionTransformation
 
PreferenceManagermPrefs = nullptr
 
QPixmap mCanvas
 
CanvasRenderer mCanvasRenderer
 
QRectF mDebugRect
 
QLoggingCategory mLog
 
std::deque< clock_t > mDebugTimeQue
 

Friends

class MoveTool
 
class EditTool
 
class SmudgeTool
 

Detailed Description

Definition at line 53 of file scribblearea.h.


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