public void MakeSquare(Dictionary <int, SlideObject> slideObjects, int shapeId) { UpdateSnapCache(slideObjects); FindExprsForSlideObjs(slideObjects); SlideObject shape = slideObjects[shapeId]; EqualizeExpressions(shape.HeightExpr, shape.WidthExpr, shape.ShorterDimExpr(), slideObjects); }
public void EqualizeWidths(Dictionary <int, SlideObject> slideObjects, int shapeId1, int shapeId2) { UpdateSnapCache(slideObjects); FindExprsForSlideObjs(slideObjects); SlideObject shape1 = slideObjects[shapeId1]; SlideObject shape2 = slideObjects[shapeId2]; EqualizeExpressions(shape1.WidthExpr, shape2.WidthExpr, shape1.WidthExpr, slideObjects); }
public void SetShapeHeight(Dictionary <int, SlideObject> slideObjects, int shapeId, float height) { UpdateSnapCache(slideObjects); SlideObject shape = slideObjects[shapeId]; var heightExpr = MakeExprForFloat(height, CachedLengths); AddOrMergeCacheEntry(heightExpr, CachedLengths, FloatToKey(height)); heightExpr = CachedLengths[FloatToKey(height)].Expr; FindExprsForSlideObjs(slideObjects); EqualizeExpressions(heightExpr, shape.HeightExpr, heightExpr, slideObjects); }
public void SetShapeWidth(Dictionary <int, SlideObject> slideObjects, int shapeId, float width) { UpdateSnapCache(slideObjects); SlideObject shape = slideObjects[shapeId]; var widthExpr = MakeExprForFloat(width, CachedLengths); AddOrMergeCacheEntry(widthExpr, CachedLengths, FloatToKey(width)); widthExpr = CachedLengths[FloatToKey(width)].Expr; FindExprsForSlideObjs(slideObjects); EqualizeExpressions(widthExpr, shape.WidthExpr, widthExpr, slideObjects); }