Example #1
0
        internal override PointF getAnchorPos(int anchorIdx)
        {
            if (row == -1)
            {
                RectangleF nodeRect = getNodeRect(false);
                if (getNode().AnchorPattern != null)
                {
                    AnchorPoint ap = getNode().AnchorPattern.Points[anchorIdx];
                    return(ap.getPos(nodeRect));
                }
                else
                {
                    return(getInitialPt());
                }
            }

            AnchorPattern rowap   = table.getRowAnchorPattern(row);
            RectangleF    rowRect = table.getRowRect(row);

            if (rowap != null)
            {
                AnchorPoint ap = rowap.Points[anchorIdx];
                return(ap.getPos(rowRect));
            }
            else
            {
                return(getInitialPt());
            }
        }
Example #2
0
        internal virtual bool getAnchorPos(int anchorIdx, ref PointF point)
        {
            RectangleF nodeRect = getNodeRect(false);
            Node       node     = getNode();

            if (node.AnchorPattern != null && anchorIdx >= 0 &&
                anchorIdx < node.anchorPattern.Points.Count)
            {
                AnchorPoint ap = node.AnchorPattern.Points[anchorIdx];
                point = ap.getPos(nodeRect);
                if (node.rotation() != 0)
                {
                    point = Utilities.rotatePointAt(point, node.getCenter(), node.rotation());
                }
                return(true);
            }

            return(false);
        }
Example #3
0
        internal virtual PointF getAnchorPos(int anchorIdx)
        {
            RectangleF nodeRect = getNodeRect(false);
            Node       node     = getNode();

            if (node.AnchorPattern != null)
            {
                AnchorPoint ap    = node.AnchorPattern.Points[anchorIdx];
                PointF      point = ap.getPos(nodeRect);
                if (node.rotation() != 0)
                {
                    point = Utilities.rotatePointAt(point, node.getCenter(), node.rotation());
                }
                return(point);
            }
            else
            {
                return(getInitialPt());
            }
        }
Example #4
0
        internal override bool getAnchorPos(int anchorIdx, ref PointF point)
        {
            if (row == -1)
            {
                return(base.getAnchorPos(anchorIdx, ref point));
            }

            AnchorPattern rowap = table.getRowAnchorPattern(row);

            if (rowap != null && anchorIdx >= 0 &&
                anchorIdx < rowap.Points.Count)
            {
                AnchorPoint ap = rowap.Points[anchorIdx];

                RectangleF targetRect = (ap.Column == -1) ?
                                        table.getRowRect(row) : table.getSpannedCellRect(row, ap.Column);
                point = ap.getPos(targetRect);

                return(true);
            }

            return(false);
        }