Lines Matching refs:rect

25 #include "sp-rect.h"
36 #include "pixmaps/cursor-rect.xpm"
37 #include "ui/tools/rect-tool.h"
57 const std::string RectTool::prefsPath = "/tools/shapes/rect";
61 , rect(NULL)
85 if (this->rect) {
245 // we've been dragging, finish the rect
277 _("<b>Ctrl</b>: make square or integer-ratio rect, lock a rounded corner circular"),
294 desktop->setToolboxFocusTo ("altx-rect");
325 // we've been dragging, finish the rect
372 if (!this->rect) {
379 Inkscape::XML::Node *repr = xml_doc->createElement("svg:rect");
382 sp_desktop_apply_style_tool (desktop, repr, "/tools/shapes/rect", false);
384 this->rect = SP_RECT(desktop->currentLayer()->appendChildRepr(repr));
387 this->rect->transform = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse();
388 this->rect->updateRepr();
393 Geom::Rect const r = Inkscape::snap_rectangular_box(desktop, this->rect, pt, this->center, state);
395 this->rect->setPosition(r.min()[Geom::X], r.min()[Geom::Y], r.dimensions()[Geom::X], r.dimensions()[Geom::Y]);
398 this->rect->setRx(true, this->rx);
403 this->rect->setRy(true, CLAMP(this->ry, 0, MIN(r.dimensions()[Geom::X], r.dimensions()[Geom::Y])/2));
405 this->rect->setRy(true, CLAMP(this->ry, 0, r.dimensions()[Geom::Y]));
457 if (this->rect != NULL) {
458 if (this->rect->width.computed == 0 || this->rect->height.computed == 0) {
463 this->rect->updateRepr();
464 this->rect->doWriteTransform(this->rect->getRepr(), this->rect->transform, NULL, true);
468 this->desktop->getSelection()->set(this->rect);
472 this->rect = NULL;
480 if (this->rect != NULL) {
481 this->rect->deleteObject();
482 this->rect = NULL;