コード例 #1
0
 public ScaleAction(ComposerActionFactory factory, SVGObject selected, MouseEvent me) {
   super(factory);
   m_scaled = selected;
   m_x = me.getX();
   m_y = me.getY();
   pt = m_scaled.getOutline().getScalePivotPoint(m_x, m_y);
   m_scalePtIdx = getScalePivotPoint(m_scaled, m_x, m_y);
 }
コード例 #2
0
 private SVGObject.ScalePivotPoint getScalePivotPoint(SVGObject selObj, float x, float y) {
   SVGObjectOutline outline = selObj.getOutline();
   if (outline.isAtScaleSEHandlePoint(x, y)
       || outline.isAtScaleEHandlePoint(x, y)
       || outline.isAtScaleSHandlePoint(x, y)) {
     return SVGObject.ScalePivotPoint.NW_CORNER;
   } else {
     return SVGObject.ScalePivotPoint.SE_CORNER;
   }
 }
コード例 #3
0
 private boolean isSEScalePoint(SVGObject selObj, MouseEvent me) {
   return selObj.getOutline().isAtScaleSEHandlePoint((float) me.getX(), (float) me.getY());
 }