#include <ipecanvas.h>
Inherited by Canvas, ipe::Canvas, ipe::Canvas, ipe::Canvas, and ipe::Canvas.
◆ TModifiers
Keyboard modifiers.
| Enumerator |
|---|
| EShift | |
| EControl | |
| EAlt | |
| EMeta | |
| ECommand | |
◆ TCursor
| Enumerator |
|---|
| EStandardCursor | |
| EHandCursor | |
| ECrossCursor | |
| EDotCursor | |
◆ ~CanvasBase()
| CanvasBase::~CanvasBase |
( |
| ) |
|
|
virtual |
◆ CanvasBase()
| CanvasBase::CanvasBase |
( |
| ) |
|
|
protected |
Construct a new canvas.
References ipe::CanvasBase::Style::classicGrid, ipe::Snap::ESnapNone, ipe::CanvasBase::Style::gridLineColor, iAdditionalModifiers, ipe::Snap::iAngleSize, iAutoSnap, iBHeight, iBWidth, iCascade, iDimmed, ipe::Snap::iDir, iFifiMode, iFifiVisible, ipe::Snap::iGridSize, ipe::Snap::iGridVisible, iHeight, iObserver, ipe::Snap::iOrigin, iPage, iPan, ipe::IPE_PI, iPixelRatio, iRepaintObjects, iResources, iSelectionVisible, isInkMode, ipe::Snap::iSnap, iSnap, ipe::Snap::iSnapDistance, iStyle, iSurface, iTool, iType3Font, iVisibleVariant, iWidth, ipe::Snap::iWithAxes, iZoom, ipe::CanvasBase::Style::numberPages, ipe::CanvasBase::Style::paperClip, ipe::CanvasBase::Style::paperColor, ipe::CanvasBase::Style::pretty, ipe::CanvasBase::Style::primarySelectionColor, ipe::CanvasBase::Style::primarySelectionWidth, ipe::CanvasBase::Style::secondarySelectionColor, ipe::CanvasBase::Style::secondarySelectionWidth, ipe::CanvasBase::Style::selectionSurroundColor, ipe::CanvasBase::Style::selectionSurroundWidth, ipe::CanvasBase::Style::thickLine, ipe::CanvasBase::Style::thickStep, ipe::CanvasBase::Style::thinLine, ipe::CanvasBase::Style::thinStep, ipe::Attribute::UNDEFINED(), and ipe::Vector::ZERO.
◆ setPage()
| void CanvasBase::setPage |
( |
const Page * |
page, |
|
|
int |
pno, |
|
|
int |
view, |
|
|
const Cascade * |
sheet |
|
) |
| |
Set the page to be displayed.
Doesn't take ownership of any argument. The page number pno is only needed if page numbering is turned on.
References iCascade, iPage, iPageNumber, and iView.
◆ setResources()
| void CanvasBase::setResources |
( |
const PdfResources * |
resources | ) |
|
◆ setImageFolder()
| void CanvasBase::setImageFolder |
( |
String |
imageFolder | ) |
|
◆ pan()
| Vector ipe::CanvasBase::pan |
( |
| ) |
const |
|
inline |
◆ zoom()
| double ipe::CanvasBase::zoom |
( |
| ) |
const |
|
inline |
◆ cascade()
| const Cascade * ipe::CanvasBase::cascade |
( |
| ) |
const |
|
inline |
◆ center()
| Vector ipe::CanvasBase::center |
( |
| ) |
const |
|
inline |
◆ pos()
| Vector ipe::CanvasBase::pos |
( |
| ) |
const |
|
inline |
◆ unsnappedPos()
| Vector ipe::CanvasBase::unsnappedPos |
( |
| ) |
const |
|
inline |
◆ globalPos()
| Vector ipe::CanvasBase::globalPos |
( |
| ) |
const |
|
inline |
◆ simpleSnapPos()
| Vector CanvasBase::simpleSnapPos |
( |
| ) |
const |
◆ snap()
| const Snap & ipe::CanvasBase::snap |
( |
| ) |
const |
|
inline |
◆ setInkMode()
| void ipe::CanvasBase::setInkMode |
( |
bool |
ink | ) |
|
|
inline |
◆ additionalModifiers()
| int ipe::CanvasBase::additionalModifiers |
( |
| ) |
const |
|
inline |
◆ setAdditionalModifiers()
| void CanvasBase::setAdditionalModifiers |
( |
int |
mod | ) |
|
Set additional modifiers.
These modifier bits are passed to the Tool when a key is pressed or a drawing action is performed in addition to the actual keyboard modifiers.
References iAdditionalModifiers.
◆ type3Font()
| bool CanvasBase::type3Font |
( |
| ) |
|
Has an attempt been made to use a Type3 font?
References iType3Font.
◆ devToUser()
◆ userToDev()
◆ setCanvasStyle()
| void CanvasBase::setCanvasStyle |
( |
const Style & |
style | ) |
|
Set style of canvas drawing.
Includes paper color, pretty text, and grid.
References iStyle.
◆ canvasStyle()
| Style ipe::CanvasBase::canvasStyle |
( |
| ) |
const |
|
inline |
Return canvas style.
References iStyle.
◆ setPan()
| void CanvasBase::setPan |
( |
const Vector & |
v | ) |
|
◆ setZoom()
| void CanvasBase::setZoom |
( |
double |
zoom | ) |
|
Set current zoom factor.
The zoom factor maps user coordinates to screen pixel coordinates.
References iZoom, and zoom().
Referenced by Canvas::magnify().
◆ setSnap()
| void CanvasBase::setSnap |
( |
const Snap & |
s | ) |
|
Set the snapping information.
References iSnap.
◆ setDimmed()
| void CanvasBase::setDimmed |
( |
bool |
dimmed | ) |
|
Dim whole canvas, except for the Tool.
This mode will be reset when the Tool finishes.
References iDimmed.
◆ setAutoOrigin()
| void CanvasBase::setAutoOrigin |
( |
const Vector & |
v | ) |
|
◆ setVisibleVariant()
| void CanvasBase::setVisibleVariant |
( |
Attribute |
variant | ) |
|
Set variant to be displayed.
When set to undefined, only objects without variant are shown
References iVisibleVariant.
◆ visibleVariant()
| Attribute ipe::CanvasBase::visibleVariant |
( |
| ) |
const |
|
inlinenoexcept |
◆ canvasTfm()
| Matrix CanvasBase::canvasTfm |
( |
| ) |
const |
◆ setObserver()
Set an observer.
Use 0 to delete current observer.
References iObserver.
◆ setFifiVisible()
| void CanvasBase::setFifiVisible |
( |
bool |
visible | ) |
|
Set whether Fifi should be shown.
Fifi will only be shown if a snapping mode is active.
References iFifiVisible, and updateTool().
◆ setSelectionVisible()
| void CanvasBase::setSelectionVisible |
( |
bool |
visible | ) |
|
◆ setTool()
| void CanvasBase::setTool |
( |
Tool * |
tool | ) |
|
◆ finishTool()
| void CanvasBase::finishTool |
( |
| ) |
|
References ipe::CanvasObserver::canvasObserverToolChanged(), EStandardCursor, iAutoSnap, iDimmed, iObserver, iSelectionVisible, iTool, setCursor(), and update().
Referenced by ipe::SelectTool::key(), ipe::PanTool::mouseButton(), ipe::SelectTool::mouseButton(), and ipe::TransformTool::mouseButton().
◆ tool()
| Tool * ipe::CanvasBase::tool |
( |
| ) |
|
|
inline |
◆ update()
| void CanvasBase::update |
( |
| ) |
|
◆ updateTool()
| void CanvasBase::updateTool |
( |
| ) |
|
◆ canvasWidth()
| int ipe::CanvasBase::canvasWidth |
( |
| ) |
const |
|
inline |
◆ canvasHeight()
| int ipe::CanvasBase::canvasHeight |
( |
| ) |
const |
|
inline |
◆ setCursor()
| virtual void ipe::CanvasBase::setCursor |
( |
TCursor |
cursor, |
|
|
double |
w = 1.0, |
|
|
Color * |
color = nullptr |
|
) |
| |
|
pure virtual |
◆ invalidate() [1/2]
| virtual void ipe::CanvasBase::invalidate |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
w, |
|
|
int |
h |
|
) |
| |
|
pure virtual |
◆ drawPaper()
| void CanvasBase::drawPaper |
( |
cairo_t * |
cc | ) |
|
|
protected |
References ipe::Cascade::findLayout(), ipe::Color::iBlue, iCascade, ipe::Color::iGreen, ipe::Layout::iOrigin, ipe::Layout::iPaperSize, ipe::Color::iRed, iStyle, ipe::CanvasBase::Style::paperColor, ipe::Fixed::toDouble(), ipe::Vector::x, and ipe::Vector::y.
Referenced by refreshSurface().
◆ drawFrame()
| void CanvasBase::drawFrame |
( |
cairo_t * |
cc | ) |
|
|
protected |
◆ drawAxes()
| void CanvasBase::drawAxes |
( |
cairo_t * |
cc | ) |
|
|
protected |
◆ drawGrid()
| void CanvasBase::drawGrid |
( |
cairo_t * |
cc | ) |
|
|
protected |
References ipe::CanvasBase::Style::classicGrid, devToUser(), ipe::Cascade::findLayout(), ipe::CanvasBase::Style::gridLineColor, ipe::Color::iBlue, iCascade, ipe::Layout::iFrameSize, ipe::Color::iGreen, ipe::Snap::iGridSize, iHeight, ipe::Color::iRed, iSnap, iStyle, iWidth, iZoom, ipe::CanvasBase::Style::thickLine, ipe::CanvasBase::Style::thickStep, ipe::CanvasBase::Style::thinLine, ipe::CanvasBase::Style::thinStep, ipe::Fixed::toDouble(), ipe::Vector::x, ipe::Vector::y, and ipe::Vector::ZERO.
Referenced by refreshSurface().
◆ drawObjects()
| void CanvasBase::drawObjects |
( |
cairo_t * |
cc | ) |
|
|
protected |
References ipe::Page::backgroundSymbol(), ipe::Page::count(), ipe::Text::draw(), ipe::Object::draw(), ipe::Page::findLayer(), ipe::Cascade::findLayout(), ipe::Cascade::findSymbol(), iBitmapCache, iCascade, iDimmed, iFonts, ipe::Symbol::iObject, ipe::Layout::iOrigin, iPage, iPageNumber, ipe::Layout::iPaperSize, iResources, iStyle, iType3Font, iView, iVisibleVariant, iZoom, ipe::CanvasBase::Style::numberPages, ipe::Page::object(), ipe::Page::objectVisible(), ipe::PdfResources::pageNumber(), ipe::CanvasBase::Style::paperClip, ipe::Painter::popMatrix(), ipe::CanvasBase::Style::pretty, ipe::Painter::pushMatrix(), ipe::Painter::setAttributeMap(), ipe::Painter::setBitmapCache(), ipe::CairoPainter::setDimmed(), ipe::Page::skipped(), ipe::Page::titleText(), ipe::CairoPainter::type3Font(), ipe::Page::viewMap(), ipe::Vector::x, and ipe::Vector::y.
Referenced by refreshSurface().
◆ drawTool()
| void CanvasBase::drawTool |
( |
Painter & |
painter | ) |
|
|
protected |
Draw the current canvas tool.
If no tool is set, it draws the selected objects.
References ipe::Page::count(), ipe::Tool::draw(), ipe::Object::drawSimple(), ipe::EPrimarySelected, ipe::ESecondarySelected, iPage, iSelectionVisible, iStyle, iTool, iView, ipe::Page::object(), ipe::Page::objectVisible(), ipe::CanvasBase::Style::primarySelectionColor, ipe::CanvasBase::Style::primarySelectionWidth, ipe::CanvasBase::Style::secondarySelectionColor, ipe::CanvasBase::Style::secondarySelectionWidth, ipe::Page::select(), ipe::CanvasBase::Style::selectionSurroundColor, ipe::CanvasBase::Style::selectionSurroundWidth, ipe::Painter::setPen(), and ipe::Painter::setStroke().
Referenced by Canvas::drawRect(), ipe::Canvas::paint(), and ipe::Canvas::paintEvent().
◆ snapToPaperAndFrame()
| void CanvasBase::snapToPaperAndFrame |
( |
| ) |
|
|
protected |
References ipe::Rect::bottomLeft(), ipe::Rect::bottomRight(), ipe::Snap::ESnapBd, ipe::Snap::ESnapVtx, ipe::Cascade::findLayout(), iCascade, iFifiMode, ipe::Layout::iFrameSize, iMousePos, ipe::Snap::iSnap, iSnap, ipe::Snap::iSnapDistance, iZoom, ipe::Layout::paper(), ipe::Vector::snap(), ipe::Segment::snap(), ipe::Rect::topLeft(), ipe::Rect::topRight(), and ipe::Vector::ZERO.
Referenced by computeFifi().
◆ refreshSurface()
| bool CanvasBase::refreshSurface |
( |
| ) |
|
|
protected |
References ipe::Rect::bottomLeft(), ipe::Rect::bottomRight(), ipe::CanvasObserver::canvasObserverSizeChanged(), drawAxes(), drawFrame(), drawGrid(), drawObjects(), drawPaper(), ipe::Cascade::findLayout(), iBHeight, iBWidth, iCascade, ipe::Snap::iGridVisible, iHeight, iObserver, iPage, iPan, iPixelRatio, iRepaintObjects, iSnap, iStyle, iSurface, iVisibleVariant, iWidth, ipe::Snap::iWithAxes, iZoom, ipe::Layout::paper(), ipe::CanvasBase::Style::pretty, ipe::Page::skipped(), ipe::Rect::topLeft(), ipe::Rect::topRight(), ipe::Vector::x, and ipe::Vector::y.
Referenced by Canvas::drawRect(), ipe::Canvas::paint(), and ipe::Canvas::paintEvent().
◆ computeFifi()
| void CanvasBase::computeFifi |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
protected |
Stores the mouse position in iUnsnappedMousePos, computes Fifi if snapping is enabled, and stores snapped position in iMousePos.
References devToUser(), ipe::Snap::ESnapAuto, ipe::Snap::ESnapNone, iAutoOrigin, iAutoSnap, iFifiMode, iFifiVisible, iMousePos, invalidate(), iOldFifi, iPage, ipe::Snap::iSnap, iSnap, ipe::Snap::iSnapDistance, iTool, iUnsnappedMousePos, iView, iZoom, ipe::Snap::snap(), snapToPaperAndFrame(), userToDev(), ipe::Vector::x, and ipe::Vector::y.
Referenced by Canvas::button(), ipe::Canvas::mouseButton(), ipe::Canvas::mouseButtonEvent(), Canvas::mouseMove(), ipe::Canvas::mouseMoveEvent(), and ipe::Canvas::tabletEvent().
◆ drawFifi()
| void CanvasBase::drawFifi |
( |
cairo_t * |
cr | ) |
|
|
protected |
References ipe::Snap::ESnapAngle, ipe::Snap::ESnapAuto, ipe::Snap::ESnapBd, ipe::Snap::ESnapCtl, ipe::Snap::ESnapGrid, ipe::Snap::ESnapInt, ipe::Snap::ESnapNone, ipe::Snap::ESnapVtx, iFifiMode, iMousePos, iOldFifi, and userToDev().
Referenced by Canvas::drawRect(), and ipe::Canvas::paint().
◆ invalidate() [2/2]
| virtual void ipe::CanvasBase::invalidate |
( |
| ) |
|
|
protectedpure virtual |
◆ iObserver
Referenced by Canvas::button(), CanvasBase(), ipe::Canvas::dropEvent(), Canvas::fileDropped(), finishTool(), Canvas::magnify(), ipe::Canvas::mouseButton(), ipe::Canvas::mouseButtonEvent(), Canvas::mouseMove(), ipe::Canvas::mouseMoveEvent(), refreshSurface(), Canvas::scrollWheel(), setObserver(), setTool(), ipe::Canvas::tabletEvent(), and ipe::Canvas::wheelEvent().
◆ iTool
| Tool* ipe::CanvasBase::iTool |
|
protected |
Referenced by Canvas::button(), CanvasBase(), computeFifi(), drawTool(), finishTool(), Canvas::key(), ipe::Canvas::keyPressEvent(), ipe::Canvas::mouseButton(), ipe::Canvas::mouseButtonEvent(), Canvas::mouseMove(), ipe::Canvas::mouseMoveEvent(), setTool(), ipe::Canvas::tabletEvent(), tool(), and ~CanvasBase().
◆ iPage
| const Page* ipe::CanvasBase::iPage |
|
protected |
◆ iPageNumber
| int ipe::CanvasBase::iPageNumber |
|
protected |
◆ iView
| int ipe::CanvasBase::iView |
|
protected |
◆ iCascade
| const Cascade* ipe::CanvasBase::iCascade |
|
protected |
Referenced by CanvasBase(), cascade(), drawFrame(), drawGrid(), drawObjects(), drawPaper(), Canvas::drawRect(), ipe::Canvas::paint(), ipe::Canvas::paintEvent(), refreshSurface(), setPage(), and snapToPaperAndFrame().
◆ iVisibleVariant
◆ iImageFolder
| String ipe::CanvasBase::iImageFolder |
|
protected |
◆ iBitmapCache
◆ iStyle
| Style ipe::CanvasBase::iStyle |
|
protected |
◆ iPan
◆ iZoom
| double ipe::CanvasBase::iZoom |
|
protected |
Referenced by CanvasBase(), canvasTfm(), computeFifi(), devToUser(), drawAxes(), drawFrame(), drawGrid(), drawObjects(), Canvas::drawRect(), Canvas::magnify(), refreshSurface(), setZoom(), simpleSnapPos(), snapToPaperAndFrame(), userToDev(), and zoom().
◆ iSnap
| Snap ipe::CanvasBase::iSnap |
|
protected |
◆ iDimmed
| bool ipe::CanvasBase::iDimmed |
|
protected |
◆ iAutoSnap
| bool ipe::CanvasBase::iAutoSnap |
|
protected |
◆ iAutoOrigin
| Vector ipe::CanvasBase::iAutoOrigin |
|
protected |
◆ iAdditionalModifiers
| int ipe::CanvasBase::iAdditionalModifiers |
|
protected |
◆ isInkMode
| bool ipe::CanvasBase::isInkMode |
|
protected |
◆ iRepaintObjects
| bool ipe::CanvasBase::iRepaintObjects |
|
protected |
◆ iWidth
| double ipe::CanvasBase::iWidth |
|
protected |
◆ iHeight
| double ipe::CanvasBase::iHeight |
|
protected |
Referenced by Canvas::button(), CanvasBase(), canvasHeight(), center(), drawAxes(), drawGrid(), Canvas::drawRect(), Canvas::magnify(), Canvas::mouseMove(), ipe::Canvas::paintEvent(), and refreshSurface().
◆ iPixelRatio
| double ipe::CanvasBase::iPixelRatio |
|
protected |
◆ iBWidth
| int ipe::CanvasBase::iBWidth |
|
protected |
◆ iBHeight
| int ipe::CanvasBase::iBHeight |
|
protected |
◆ iSurface
| cairo_surface_t* ipe::CanvasBase::iSurface |
|
protected |
◆ iUnsnappedMousePos
| Vector ipe::CanvasBase::iUnsnappedMousePos |
|
protected |
◆ iMousePos
| Vector ipe::CanvasBase::iMousePos |
|
protected |
◆ iGlobalPos
| Vector ipe::CanvasBase::iGlobalPos |
|
protected |
◆ iOldFifi
| Vector ipe::CanvasBase::iOldFifi |
|
protected |
◆ iFifiVisible
| bool ipe::CanvasBase::iFifiVisible |
|
protected |
◆ iFifiMode
◆ iSelectionVisible
| bool ipe::CanvasBase::iSelectionVisible |
|
protected |
◆ iResources
◆ iFonts
| std::unique_ptr<Fonts> ipe::CanvasBase::iFonts |
|
protected |
◆ iType3Font
| bool ipe::CanvasBase::iType3Font |
|
protected |
The documentation for this class was generated from the following files:
- ipecanvas.h
- ipecanvas.cpp