예제 #1
0
        private void getNamedPoints(RTIO io, out Vector pstart, out Vector pstop,
                                    out Vector textpos, out Vector textdir)
        {
            Vector     pos  = Vector.Zero;
            Vector     dir  = Vector.Zero;
            VectorRect vr   = VectorRect.Empty;
            int        rank = 0;

            io.getPosAndDir(ref pos, ref dir, ref vr, ref rank);
            pstart = owner.toScreen(pos);
            VectorBox vx = GraphicsUtil.sizeText(owner.netNameFont, _name, 2, -1, -1);

            pstop = pstart + dir * owner.scale * (vx.boundingDim().x + 20);
            if (dir.x < 0)
            {
                textpos = pstop - dir * owner.scale * 10;
                textdir = -dir;
            }
            else
            {
                textpos = pstart + dir * owner.scale * 10;
                textdir = dir;
            }
        }