示例#1
0
        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);
        }
示例#2
0
 public static bool HasTop(ResizableHandleKind handleKind)
 {
     return((handleKind & ResizableHandleKind.Top) != 0);
 }
示例#3
0
 public static bool HasRight(ResizableHandleKind handleKind)
 {
     return((handleKind & ResizableHandleKind.Right) != 0);
 }
示例#4
0
 public static bool HasLeft(ResizableHandleKind handleKind)
 {
     return((handleKind & ResizableHandleKind.Left) != 0);
 }
示例#5
0
 public static bool HasBottom(ResizableHandleKind handleKind)
 {
     return((handleKind & ResizableHandleKind.Bottom) != 0);
 }
示例#6
0
文件: ResizeInfo.cs 项目: Egaros/lib
 public ResizeInfo(Point originLocation, Point currentLocation, ResizableHandleKind handleKind)
 {
     OriginLocation  = originLocation;
     CurrentLocation = currentLocation;
     HandleKind      = handleKind;
 }