change origin to top left corner

only in xps format the canvas sizes are multiplied
This commit is contained in:
Kulikova Svetlana
2021-10-18 17:46:05 +03:00
parent a81115d2f3
commit 533d04e8f3
6 changed files with 42 additions and 22 deletions

View File

@ -465,14 +465,14 @@ BYTE* CDjVuFileImplementation::GetPageLinks (int nPageIndex)
{
GUTF8String str = map_areas[pos]->url;
oRes.WriteString((BYTE*)str.getbuf(), str.length());
// Верхний левый угол
double x = map_areas[pos]->get_xmin();
double y = dHeight - map_areas[pos]->get_ymin();
double y = dHeight - map_areas[pos]->get_ymax();
oRes.AddDouble(0.0);
oRes.AddDouble(x);
oRes.AddDouble(y);
oRes.AddDouble(map_areas[pos]->get_xmax() - x);
oRes.AddDouble(dHeight - map_areas[pos]->get_ymax() - y);
oRes.AddDouble(map_areas[pos]->get_ymax() - map_areas[pos]->get_ymin());
}
oRes.WriteLen();