Searched refs:viewBox (Results 1 - 20 of 20) sorted by relevance

/inkscape/src/
H A Dviewbox.h5 * viewBox helper class, common code used by root, symbol, marker, pattern, image, view
28 /* viewBox; */
30 Geom::Rect viewBox; // Could use optrect member in class:SPViewBox
H A Dviewbox.cpp2 * viewBox helper class, common code used by root, symbol, marker, pattern, image, view
24 , viewBox()
63 this->viewBox = Geom::Rect::from_xywh(x, y, width, height);
171 double scale_x = in.width() / this->viewBox.width();
172 double scale_y = in.height() / this->viewBox.height();
187 double width = this->viewBox.width() * scale_uniform;
188 double height = this->viewBox.height() * scale_uniform;
233 q[4] = x - scale_x * this->viewBox.left();
234 q[5] = y - scale_y * this->viewBox.top();
258 /* If viewBox i
[all...]
H A Dsp-root.cpp69 this->readAttr("viewBox");
220 * If width and height are in percent, they are percent of viewBox width/height.
221 * If width, height, and viewBox are not set... pick "random" width/height.
230 this->width.computed = this->width.value * this->viewBox.width();
233 this->width.set( SVGLength::PX, this->viewBox.width(), this->viewBox.width() );
238 this->height.computed = this->height.value * this->viewBox.height();
241 this->height.set(SVGLength::PX, this->viewBox.height(), this->viewBox.height() );
342 os << this->viewBox
[all...]
H A Dsp-guide.cpp161 // If root viewBox set, interpret guides in terms of viewBox (90/96)
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 (9
[all...]
H A Ddocument.cpp601 /// Sets document scale (by changing viewBox)
604 root->viewBox = Geom::Rect::from_xywh(
605 root->viewBox.left(),
606 root->viewBox.top(),
613 /// Sets document scale (by changing viewBox, x and y scaling equal)
618 /// Returns document scale as defined by width/height (in pixels) and viewBox (real world to
626 if( root->viewBox.width() > 0.0 ) {
627 scale_x = root->width.computed / root->viewBox.width();
629 if( root->viewBox.height() > 0.0 ) {
630 scale_y = root->height.computed / root->viewBox
756 Geom::Rect viewBox; local
765 setViewBox(const Geom::Rect &viewBox) argument
[all...]
H A Dpersp3d.cpp100 scale_x = root->width.computed / root->viewBox.width();
101 scale_y = root->height.computed / root->viewBox.height();
177 Geom::Rect vb = document->getRoot()->viewBox;
244 scale_x = root->viewBox.width() / root->width.computed;
245 scale_y = root->viewBox.height() / root->height.computed;
H A Dsp-pattern.cpp75 this->readAttr("viewBox");
502 viewbox = pat_i->viewBox;
574 // * "viewBox" (if defined) or "patternContentUnits" determines placement of content inside
597 // viewBox to pattern server (using SPViewBox)
598 viewBox = *effective_view_box;
H A Ddocument.h258 void setViewBox(const Geom::Rect &viewBox);
H A Ddesktop-events.cpp230 // If root viewBox set, interpret guides in terms of viewBox (90/96)
236 newx = newx * root->viewBox.width() / root->width.computed;
237 newy = newy * root->viewBox.height() / root->height.computed;
H A Dsp-image.cpp410 this->viewBox = Geom::Rect::from_xywh(0, 0, this->pixbuf->width(), this->pixbuf->height());
H A Dsp-item.cpp238 Geom::Rect vb = this->document->getRoot()->viewBox;
275 Geom::Rect vb = this->document->getRoot()->viewBox;
H A Dsp-namedview.cpp268 Geom::Rect viewbox = document->getRoot()->viewBox;
/inkscape/src/ui/widget/
H A Dregistered-widget.cpp249 if(Geom::are_near((root->viewBox.width() * root->height.computed) / (root->width.computed * root->viewBox.height()), 1.0, Geom::EPSILON)) {
250 scale = (root->viewBox.width() / root->width.computed + root->viewBox.height() / root->height.computed)/2.0;
252 scale = root->viewBox.width() / root->width.computed;
254 scale = root->viewBox.height() / root->height.computed;
H A Dpage-sizer.cpp479 _scaleWarning.set_label(_("While SVG allows non-uniform scaling it is recommended to use only uniform scaling in Inkscape. To set a non-uniform scaling, set the 'viewBox' directly."));
865 Geom::Rect viewBox = doc->getViewBox(); local
866 _viewboxX.setValue( viewBox.min()[Geom::X] );
867 _viewboxY.setValue( viewBox.min()[Geom::Y] );
868 _viewboxW.setValue( viewBox.width() );
869 _viewboxH.setValue( viewBox.height() );
958 DocumentUndo::done(doc, SP_VERB_NONE, _("Set 'viewBox'"));
/inkscape/share/extensions/
H A Dhpgl_encoder.py90 # process viewBox attribute to correct page scaling
96 viewBox = self.doc.get('viewBox')
97 if viewBox:
98 viewBox2 = string.split(viewBox, ',')
100 viewBox2 = string.split(viewBox, ' ')
H A DjessyInk.js122 var VIEWBOX = ROOT_NODE.getAttribute("viewBox");
126 WIDTH = ROOT_NODE.viewBox.animVal.width;
127 HEIGHT = ROOT_NODE.viewBox.animVal.height;
133 ROOT_NODE.setAttribute("viewBox", "0 0 " + WIDTH + " " + HEIGHT);
/inkscape/src/extension/internal/
H A Dcairo-renderer.cpp418 view_width = symbol->viewBox.width();
419 view_height = symbol->viewBox.height();
428 vb2user[4] = x - symbol->viewBox.left() * vb2user[0];
429 vb2user[5] = y - symbol->viewBox.top() * vb2user[3];
/inkscape/src/ui/dialog/
H A Ddocument-properties.cpp1475 doc_w = dt->getDocument()->getRoot()->viewBox.width();
1483 doc_h = dt->getDocument()->getRoot()->viewBox.height();
1697 // Set viewBox
1700 doc->setViewBox(doc->getRoot()->viewBox*Geom::Scale(scale));
1730 Geom::Rect vb = doc->getRoot()->viewBox;
1737 doc->getRoot()->scaleChildItemsRec(Geom::Scale(scale), Geom::Point(-viewscale*doc->getRoot()->viewBox.min()[Geom::X] +
1738 (doc->getWidth().value("px") - viewscale*doc->getRoot()->viewBox.width())/2,
1739 viewscale*doc->getRoot()->viewBox.min()[Geom::Y] +
1740 (doc->getHeight().value("px") + viewscale*doc->getRoot()->viewBox.height())/2),
/inkscape/src/display/
H A Dcanvas-grid.cpp374 scale_x = root->viewBox.width() / root->width.computed;
375 scale_y = root->viewBox.height() / root->height.computed;
541 scale_x = root->width.computed / root->viewBox.width();
542 scale_y = root->height.computed / root->viewBox.height();
H A Dcanvas-axonomgrid.cpp217 scale_x = root->width.computed / root->viewBox.width();
218 scale_y = root->height.computed / root->viewBox.height();

Completed in 717 milliseconds