void SVGTransformable::dscale(double dsx, double dsy) { SVGScaleTransform * scale = getScale(true); scale->sx *= dsx; scale->sy *= dsy; scale->updateMatrix(); SVGElement* meAsSVGElement = dynamic_cast<SVGElement*>(this); if(meAsSVGElement) meAsSVGElement->setDamaged(true); }
void SVGTransformable::dtranslate(double dtx, double dty) { SVGTranslateTransform * translate = getTranslate(true); translate->tx += dtx; translate->ty += dty; translate->updateMatrix(); SVGElement* meAsSVGElement = dynamic_cast<SVGElement*>(this); if(meAsSVGElement) meAsSVGElement->setDamaged(true); }
void SVGTransformable::drotate(double dangle=0) { SVGRotateTransform * rotate = getRotate(true); rotate->angle += dangle; rotate->cx = 0; rotate->cy = 0; rotate->updateMatrix(); SVGElement* meAsSVGElement = dynamic_cast<SVGElement*>(this); if(meAsSVGElement) meAsSVGElement->setDamaged(true); }