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

void wxPdfDocument::GetTemplateBBox ( int  templateId,
double &  x,
double &  y,
double &  width,
double &  height 
)

Gets the bounding box of a template.

Especially for pages imported from an external PDF document the size of the bounding box might be of interest. The values returned correspond to the coordinates of the lower left corner and the width and height of the template.

Parameters:
templateIdA valid template ID
xThe x coordinate of the lower left corner
yThe y coordinate of the lower left corner
widthThe width of the template
heightThe height of the template
See also:
SetTemplateBBox(), BeginTemplate(), ImportPage()

Definition at line 198 of file pdftemplate.cpp.

References wxPdfTemplate::GetHeight(), wxPdfTemplate::GetWidth(), wxPdfTemplate::GetX(), and wxPdfTemplate::GetY().

{
  wxPdfTemplate* tpl;
  wxPdfTemplatesMap::iterator templateIter = (*m_templates).find(templateId);
  if (templateIter != (*m_templates).end())
  {
    tpl = templateIter->second;
    x = tpl->GetX();
    y = tpl->GetY();
    w = tpl->GetWidth();
    h = tpl->GetHeight();
  }
  else
  {
    x = 0;
    y = 0;
    w = 0;
    h = 0;
    wxLogWarning(_("wxPdfDocument::GetTemplateBBox: Template %d does not exist!"), templateId);
  }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index