Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

void wxPdfDocument::Link ( double  x,
double  y,
double  w,
double  h,
const wxPdfLink link 
) [virtual]

Puts a link on a rectangular area of the page.

Text or image links are generally put via Cell(), Write() or Image(), but this method can be useful for instance to define a clickable area inside an image.

xAbscissa of the upper-left corner of the rectangle
yOrdinate of the upper-left corner of the rectangle
wWidth of the rectangle
hHeight of the rectangle
linkURL or identifier returned by AddLink()
See also:
AddLink(), Cell(), Write(), Image()

Definition at line 156 of file pdfannotation.cpp.

References m_hPt, m_inTemplate, m_k, m_page, and m_templateId.

Referenced by Cell(), and OutImage().

  if (m_inTemplate)
    wxLogError(_("wxPdfDocument::Link: Using links in templates is impossible. Current template ID is %d."), m_templateId);

  // Put a link on the page
  wxArrayPtrVoid* pageLinkArray = NULL;
  wxPdfPageLink* pageLink = new wxPdfPageLink(x*m_k, m_hPt-y*m_k, w*m_k, h*m_k, link);
  wxPdfPageLinksMap::iterator pageLinks = (*m_pageLinks).find(m_page);
  if (pageLinks != (*m_pageLinks).end())
    pageLinkArray = pageLinks->second;
    pageLinkArray = new wxArrayPtrVoid;
    (*m_pageLinks)[m_page] = pageLinkArray;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index