Lines Matching refs:root
41 #include "sp-root.h"
161 // If root viewBox set, interpret guides in terms of viewBox (90/96)
162 SPRoot *root = document->getRoot();
163 if( root->viewBox_set ) {
164 if(Geom::are_near((root->width.computed * root->viewBox.height()) / (root->viewBox.width() * root->height.computed), 1.0, Geom::EPSILON)) {
166 double vbunit2px = (root->width.computed / root->viewBox.width() + root->height.computed / root->viewBox.height())/2.0;
170 newx = newx * root->width.computed / root->viewBox.width();
171 newy = newy * root->height.computed / root->viewBox.height();
207 // If root viewBox set, interpret guides in terms of viewBox (90/96)
211 SPRoot *root = doc->getRoot();
212 if( root->viewBox_set ) {
214 if(Geom::are_near((root->viewBox.width() * root->height.computed) / (root->width.computed * root->viewBox.height()), 1.0, Geom::EPSILON)) {
215 double px2vbunit = (root->viewBox.width()/root->width.computed + root->viewBox.height()/root->height.computed)/2.0;
219 newx = newx * root->viewBox.width() / root->width.computed;
220 newy = newy * root->viewBox.height() / root->height.computed;
367 // If root viewBox set, interpret guides in terms of viewBox (90/96)
371 SPRoot *root = document->getRoot();
372 if( root->viewBox_set ) {
374 if(Geom::are_near((root->viewBox.width() * root->height.computed) / (root->width.computed * root->viewBox.height()), 1.0, Geom::EPSILON)) {
375 double px2vbunit = (root->viewBox.width()/root->width.computed + root->viewBox.height()/root->height.computed)/2.0;
379 newx = newx * root->viewBox.width() / root->width.computed;
380 newy = newy * root->viewBox.height() / root->height.computed;