Magick++/lib/Options.cpp
// Origin of coordinate system to use when annotating with text or drawing
Origin of coordinate system to use when annotating with text or drawing
Origin of coordinate system to use when annotating with text or drawing
void Magick::Options::transformOrigin ( double tx_, double ty_ )
{
  AffineMatrix current = _drawInfo->affine;
  AffineMatrix affine;
  affine.sx=1.0;
  affine.rx=0.0;
  affine.ry=0.0;
  affine.sy=1.0;
  affine.tx=0.0;
  affine.ty=0.0;
  affine.tx = tx_;
  affine.ty = ty_;
  _drawInfo->affine.sx=current.sx*affine.sx+current.ry*affine.rx;
  _drawInfo->affine.rx=current.rx*affine.sx+current.sy*affine.rx;
  _drawInfo->affine.ry=current.sx*affine.ry+current.ry*affine.sy;
  _drawInfo->affine.sy=current.rx*affine.ry+current.sy*affine.sy;
  _drawInfo->affine.tx=current.sx*affine.tx+current.ry*affine.ty+current.tx;
  _drawInfo->affine.ty=current.rx*affine.tx+current.sy*affine.ty+current.ty;
}
void Magick :: Options :: transformOrigin ( double tx_ , double ty_ ) { AffineMatrix current = _drawInfo -> affine ; AffineMatrix affine ; affine . sx = 1.0 ; affine . rx = 0.0 ; affine . ry = 0.0 ; affine . sy = 1.0 ; affine . tx = 0.0 ; affine . ty = 0.0 ; affine . tx = tx_ ; affine . ty = ty_ ; _drawInfo -> affine . sx = current . sx * affine . sx + current . ry * affine . rx ; _drawInfo -> affine . rx = current . rx * affine . sx + current . sy * affine . rx ; _drawInfo -> affine . ry = current . sx * affine . ry + current . ry * affine . sy ; _drawInfo -> affine . sy = current . rx * affine . ry + current . sy * affine . sy ; _drawInfo -> affine . tx = current . sx * affine . tx + current . ry * affine . ty + current . tx ; _drawInfo -> affine . ty = current . rx * affine . tx + current . sy * affine . ty + current . ty ; }
Origin of coordinate system to use when annotating with text or drawing
Origin of coordinate system to use when annotating with text or drawing