public static ArtboardSnapRectSide GetResizeSide(ResizableHandleKind handleKind) { var snapSide = ArtboardSnapRectSide.None; if (ResizableBehaviorUtils.HasLeft(handleKind)) { snapSide |= ArtboardSnapRectSide.Left; } if (ResizableBehaviorUtils.HasTop(handleKind)) { snapSide |= ArtboardSnapRectSide.Top; } if (ResizableBehaviorUtils.HasRight(handleKind)) { snapSide |= ArtboardSnapRectSide.Right; } if (ResizableBehaviorUtils.HasBottom(handleKind)) { snapSide |= ArtboardSnapRectSide.Bottom; } return(snapSide); }
public static bool HasTop(ResizableHandleKind handleKind) { return((handleKind & ResizableHandleKind.Top) != 0); }
public static bool HasRight(ResizableHandleKind handleKind) { return((handleKind & ResizableHandleKind.Right) != 0); }
public static bool HasLeft(ResizableHandleKind handleKind) { return((handleKind & ResizableHandleKind.Left) != 0); }
public static bool HasBottom(ResizableHandleKind handleKind) { return((handleKind & ResizableHandleKind.Bottom) != 0); }
public ResizeInfo(Point originLocation, Point currentLocation, ResizableHandleKind handleKind) { OriginLocation = originLocation; CurrentLocation = currentLocation; HandleKind = handleKind; }