GetLength() public method

public GetLength ( ) : float
return float
Beispiel #1
0
        /**
         *
         * @param height the height, in text space
         * @return the height in user space
         * @since 5.3.3
         */
        private float ConvertHeightFromTextSpaceToUserSpace(float height)
        {
            LineSegment textSpace = new LineSegment(new Vector(0, 0, 1), new Vector(0, height, 1));
            LineSegment userSpace = textSpace.TransformBy(textToUserSpaceTransformMatrix);

            return(userSpace.GetLength());
        }
        /**
         * @return The width, in user space units, of a single space character in the current font
         */
        public float GetSingleSpaceWidth()
        {
            LineSegment textSpace = new LineSegment(new Vector(0, 0, 1), new Vector(GetUnscaledFontSpaceWidth(), 0, 1));
            LineSegment userSpace = textSpace.TransformBy(textToUserSpaceTransformMatrix);

            return(userSpace.GetLength());
        }