#include <ipecanvas.h>
Inherited by ipe::Canvas, ipe::Canvas, and ipe::Canvas.
CanvasBase::~CanvasBase | ( | ) | [virtual] |
destructor.
CanvasBase::CanvasBase | ( | ) | [protected] |
Construct a new canvas.
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.
void CanvasBase::setFontPool | ( | const FontPool * | fontPool | ) |
set information about Latex fonts (from ipe::Document)
Vector ipe::CanvasBase::pan | ( | ) | const [inline] |
Return current pan.
double ipe::CanvasBase::zoom | ( | ) | const [inline] |
Return current zoom.
const Cascade* ipe::CanvasBase::cascade | ( | ) | const [inline] |
Return current style sheet cascade.
Vector ipe::CanvasBase::center | ( | ) | const [inline] |
Return center of canvas.
Vector ipe::CanvasBase::pos | ( | ) | const [inline] |
Return last mouse position (snapped!) in user coordinates.
Vector ipe::CanvasBase::unsnappedPos | ( | ) | const [inline] |
Return last unsnapped mouse position in user coordinates.
Vector ipe::CanvasBase::globalPos | ( | ) | const [inline] |
Return global mouse position of last mouse press/release.
Vector CanvasBase::simpleSnapPos | ( | ) | const |
Return snapped mouse position without angular snapping.
const Snap& ipe::CanvasBase::snap | ( | ) | const [inline] |
Return current snapping information.
int ipe::CanvasBase::additionalModifiers | ( | ) | const [inline] |
Return current additional modifiers.
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.
Convert canvas (device) coordinates to user coordinates.
Convert user coordinates to canvas (device) coordinates.
void CanvasBase::setCanvasStyle | ( | const Style & | style | ) |
Set style of canvas drawing.
Includes paper color, pretty text, and grid.
Style ipe::CanvasBase::canvasStyle | ( | ) | const [inline] |
Return canvas style.
void CanvasBase::setPan | ( | const Vector & | v | ) |
Set current pan position.
The pan position is the user coordinate that is displayed at the very center of the canvas.
void CanvasBase::setZoom | ( | double | zoom | ) |
Set current zoom factor.
The zoom factor maps user coordinates to screen pixel coordinates.
void CanvasBase::setSnap | ( | const Snap & | s | ) |
Set the snapping information.
void CanvasBase::setDimmed | ( | bool | dimmed | ) |
void CanvasBase::setAutoOrigin | ( | const Vector & | v | ) |
Enable automatic angular snapping with this origin.
void CanvasBase::setObserver | ( | CanvasObserver * | observer | ) |
Set an observer.
Use 0 to delete current observer.
void CanvasBase::setFifiVisible | ( | bool | visible | ) |
Set whether Fifi should be shown.
Fifi will only be shown if a snapping mode is active.
void CanvasBase::setSelectionVisible | ( | bool | visible | ) |
Set whether selection should be shown when there is no tool.
void CanvasBase::setTool | ( | Tool * | tool | ) |
Set a new tool.
Calls canvasObserverToolChanged().
void CanvasBase::finishTool | ( | ) |
void CanvasBase::update | ( | ) |
Mark for update with redrawing of objects.
void CanvasBase::updateTool | ( | ) |
Mark for update with redrawing of tool only.
int ipe::CanvasBase::canvasWidth | ( | ) | const [inline] |
int ipe::CanvasBase::canvasHeight | ( | ) | const [inline] |
virtual void ipe::CanvasBase::setCursor | ( | TCursor | cursor, | |
double | w = 1.0 , |
|||
Color * | color = 0 | |||
) | [pure virtual] |
Implemented in ipe::Canvas.
void CanvasBase::drawPaper | ( | cairo_t * | cc | ) | [protected] |
void CanvasBase::drawFrame | ( | cairo_t * | cc | ) | [protected] |
void CanvasBase::drawAxes | ( | cairo_t * | cc | ) | [protected] |
void CanvasBase::drawGrid | ( | cairo_t * | cc | ) | [protected] |
void CanvasBase::drawObjects | ( | cairo_t * | cc | ) | [protected] |
void CanvasBase::drawTool | ( | Painter & | painter | ) | [protected] |
Draw the current canvas tool.
If no tool is set, it draws the selected objects.
bool CanvasBase::snapToPaperAndFrame | ( | ) | [protected] |
void CanvasBase::refreshSurface | ( | ) | [protected] |
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.
virtual void ipe::CanvasBase::invalidate | ( | ) | [protected, pure virtual] |
Implemented in ipe::Canvas.
virtual void ipe::CanvasBase::invalidate | ( | int | x, | |
int | y, | |||
int | w, | |||
int | h | |||
) | [protected, pure virtual] |
Implemented in ipe::Canvas.
CanvasObserver* ipe::CanvasBase::iObserver [protected] |
Tool* ipe::CanvasBase::iTool [protected] |
const Page* ipe::CanvasBase::iPage [protected] |
int ipe::CanvasBase::iPageNumber [protected] |
int ipe::CanvasBase::iView [protected] |
const Cascade* ipe::CanvasBase::iCascade [protected] |
Style ipe::CanvasBase::iStyle [protected] |
Vector ipe::CanvasBase::iPan [protected] |
double ipe::CanvasBase::iZoom [protected] |
Snap ipe::CanvasBase::iSnap [protected] |
bool ipe::CanvasBase::iDimmed [protected] |
bool ipe::CanvasBase::iAutoSnap [protected] |
Vector ipe::CanvasBase::iAutoOrigin [protected] |
int ipe::CanvasBase::iAdditionalModifiers [protected] |
bool ipe::CanvasBase::iRepaintObjects [protected] |
int ipe::CanvasBase::iWidth [protected] |
int ipe::CanvasBase::iHeight [protected] |
cairo_surface_t* ipe::CanvasBase::iSurface [protected] |
Vector ipe::CanvasBase::iUnsnappedMousePos [protected] |
Vector ipe::CanvasBase::iMousePos [protected] |
Vector ipe::CanvasBase::iGlobalPos [protected] |
Vector ipe::CanvasBase::iOldFifi [protected] |
bool ipe::CanvasBase::iFifiVisible [protected] |
bool ipe::CanvasBase::iSelectionVisible [protected] |
Fonts* ipe::CanvasBase::iFonts [protected] |