Ipelib
|
#include <ipepdfview.h>
Inherited by PdfView, ipe::PdfView, and ipe::PdfView.
Public Member Functions | |
virtual | ~PdfViewBase () |
void | setPdf (const PdfFile *pdf, Fonts *fonts) |
void | setPage (const PdfDict *page, const Rect &paper) |
void | setBackground (const Color &bg) |
void | setBlackout (bool bo) |
Vector | pan () const |
double | zoom () const |
Vector | center () const |
int | viewWidth () const |
int | viewHeight () const |
bool | blackout () const |
Vector | devToUser (const Vector &arg) const |
Vector | userToDev (const Vector &arg) const |
void | setPan (const Vector &v) |
void | setZoom (double zoom) |
Matrix | canvasTfm () const |
void | updatePdf () |
virtual void | invalidate (int x, int y, int w, int h)=0 |
virtual void | invalidate ()=0 |
Protected Member Functions | |
PdfViewBase () | |
void | drawPaper (cairo_t *cc) |
void | refreshSurface () |
Protected Attributes | |
double | iWidth |
double | iHeight |
double | iBWidth |
double | iBHeight |
Vector | iPan |
double | iZoom |
Color | iBackground |
bool | iBlackout |
bool | iRepaint |
cairo_surface_t * | iSurface |
std::unique_ptr< Cascade > | iCascade |
const PdfDict * | iPage |
Rect | iPaperBox |
const PdfDict * | iStream |
const PdfFile * | iPdf |
Fonts * | iFonts |
A widget (control) that displays a PDF document.
|
virtual |
destructor.
References iSurface.
|
protected |
Provide the page to view.
References ipe::PdfObj::dict(), ipe::PdfDict::get(), iPage, iPaperBox, iPdf, and iStream.
void PdfViewBase::setBackground | ( | const Color & | bg | ) |
Set background color.
References iBackground.
void PdfViewBase::setBlackout | ( | bool | bo | ) |
Set blackout.
References iBlackout.
|
inline |
|
inline |
Return center of view.
References iHeight, and iWidth.
Referenced by canvasTfm(), devToUser(), and userToDev().
|
inline |
Return width of view.
References iWidth.
|
inline |
Return height of view.
References iHeight.
|
inline |
Return current blackout state.
References iBlackout.
Convert canvas (device) coordinates to user coordinates.
References center(), iPan, iZoom, ipe::Vector::x, and ipe::Vector::y.
Referenced by ipe::PdfView::mousePressEvent().
Convert user coordinates to canvas (device) coordinates.
References center(), iPan, iZoom, ipe::Vector::x, and ipe::Vector::y.
void PdfViewBase::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.
References iPan.
void PdfViewBase::setZoom | ( | double | zoom | ) |
Matrix PdfViewBase::canvasTfm | ( | ) | const |
void PdfViewBase::updatePdf | ( | ) |
Mark for update with redrawing of PDF document.
References invalidate(), and iRepaint.
|
pure virtual |
Implemented in ipe::PdfView.
|
pure virtual |
Implemented in ipe::PdfView.
Referenced by updatePdf().
|
protected |
References ipe::Rect::bottom(), ipe::Rect::height(), iPaperBox, ipe::Rect::isEmpty(), ipe::Rect::left(), and ipe::Rect::width().
Referenced by refreshSurface().
|
protected |
References drawPaper(), ipe::CairoPainter::executeStream(), iBackground, iBHeight, iBlackout, ipe::Color::iBlue, iBWidth, iCascade, iFonts, ipe::Color::iGreen, iHeight, iPage, iPan, ipe::Color::iRed, iRepaint, iStream, iSurface, iWidth, iZoom, ipe::Fixed::toDouble(), ipe::Vector::x, and ipe::Vector::y.
Referenced by PdfView::drawRect(), and ipe::PdfView::paintEvent().
|
protected |
Referenced by center(), PdfView::drawRect(), ipe::PdfView::invalidate(), ipe::PdfView::paintEvent(), PdfViewBase(), refreshSurface(), and viewWidth().
|
protected |
Referenced by center(), PdfView::drawRect(), ipe::PdfView::invalidate(), ipe::PdfView::paintEvent(), PdfViewBase(), refreshSurface(), and viewHeight().
|
protected |
Referenced by PdfView::drawRect(), ipe::PdfView::paintEvent(), PdfViewBase(), and refreshSurface().
|
protected |
Referenced by PdfView::drawRect(), ipe::PdfView::paintEvent(), PdfViewBase(), and refreshSurface().
|
protected |
Referenced by canvasTfm(), devToUser(), pan(), PdfViewBase(), refreshSurface(), setPan(), and userToDev().
|
protected |
Referenced by canvasTfm(), devToUser(), PdfViewBase(), refreshSurface(), setZoom(), userToDev(), and zoom().
|
protected |
Referenced by PdfViewBase(), refreshSurface(), and setBackground().
|
protected |
Referenced by blackout(), PdfViewBase(), refreshSurface(), and setBlackout().
|
protected |
Referenced by PdfViewBase(), refreshSurface(), and updatePdf().
|
protected |
Referenced by PdfView::drawRect(), ipe::PdfView::paintEvent(), PdfViewBase(), refreshSurface(), and ~PdfViewBase().
|
protected |
Referenced by PdfViewBase(), and refreshSurface().
|
protected |
Referenced by PdfViewBase(), refreshSurface(), setPage(), and setPdf().
|
protected |
Referenced by drawPaper(), and setPage().
|
protected |
Referenced by PdfViewBase(), refreshSurface(), setPage(), and setPdf().
|
protected |
Referenced by PdfViewBase(), setPage(), and setPdf().
|
protected |
Referenced by PdfViewBase(), refreshSurface(), and setPdf().