コード例 #1
0
ファイル: ScaleRuler.cs プロジェクト: Shevonar/BlueBrick
 public override void redo()
 {
     // scale to the new position
     mRulerItem.scaleToPoint(mNewPosition);
     // update the selection rectangle
     mRulerLayer.updateBoundingSelectionRectangle();
 }
コード例 #2
0
 public override void redo()
 {
     // if the anchor is not null, update it with the new offset
     if (mAnchor != null)
     {
         mAnchor.updateAttachOffsetFromCenter(mNewLocalAttachOffset, mAttachedBrickOrientation);
     }
     // set the new position
     mRulerItem.setControlPointPosition(mControlPointIndex, mNewPosition);
     // update the selection rectangle
     mRulerLayer.updateBoundingSelectionRectangle();
 }
コード例 #3
0
 private void copyRulerProperties(LayerRuler.RulerItem rulerTemplate)
 {
     // line appearance
     mRulerItem.LineThickness = rulerTemplate.LineThickness;
     mRulerItem.Color         = rulerTemplate.Color;
     if (mRulerItem is LayerRuler.LinearRuler)
     {
         (mRulerItem as LayerRuler.LinearRuler).AllowOffset = (rulerTemplate as LayerRuler.LinearRuler).AllowOffset;
     }
     // guideline appearance
     mRulerItem.GuidelineDashPattern = rulerTemplate.GuidelineDashPattern;
     mRulerItem.GuidelineThickness   = rulerTemplate.GuidelineThickness;
     mRulerItem.GuidelineColor       = rulerTemplate.GuidelineColor;
     // measure and unit
     mRulerItem.DisplayUnit     = rulerTemplate.DisplayUnit;
     mRulerItem.DisplayDistance = rulerTemplate.DisplayDistance;
     mRulerItem.CurrentUnit     = rulerTemplate.CurrentUnit;
     mRulerItem.MeasureColor    = rulerTemplate.MeasureColor;
     mRulerItem.MeasureFont     = rulerTemplate.MeasureFont;
     // update the display data
     mRulerItem.updateDisplayDataAndMesurementImage();
     mRulerLayer.updateBoundingSelectionRectangle();
 }