Esempio n. 1
0
        /// <summary>
        /// Returns the line spacing adjustment set for a multiline text paragraph</summary>
        /// <param name="lineSpacingMethod">A value that indicates how line height is determined</param>
        /// <param name="lineSpacing">When this method returns, contains the line height,
        /// or distance between one baseline to another</param>
        /// <param name="baseline">When this method returns, contains the distance from top of line to baseline.
        /// A reasonable ratio to lineSpacing is 80 percent.</param>
        /// <returns>If the method succeeds, it returns D2dResult.Ok.
        /// Otherwise, it throws an exception.</returns>
        public D2dResult GetLineSpacing(
            out D2dLineSpacingMethod lineSpacingMethod,
            out float lineSpacing,
            out float baseline)
        {
            LineSpacingMethod tmpLineSpacingMethod;

            m_nativeTextFormat.GetLineSpacing(
                out tmpLineSpacingMethod,
                out lineSpacing,
                out baseline);

            lineSpacingMethod = (D2dLineSpacingMethod)tmpLineSpacingMethod;
            return(D2dResult.Ok);
        }
Esempio n. 2
0
 /// <summary>
 /// Sets the line spacing</summary>
 /// <param name="lineSpacingMethod">Specifies how line height is being determined; see D2dLineSpacingMethod
 /// for more information</param>
 /// <param name="lineSpacing">The line height, or distance between one baseline to another</param>
 /// <param name="baseline">The distance from top of line to baseline. A reasonable ratio to lineSpacing
 /// is 80 percent.</param>
 /// <returns>If the method succeeds, it returns D2dResult.OK. Otherwise, it throws an exception.</returns>
 /// <remarks>
 /// For the default method, spacing depends solely on the content. For uniform
 /// spacing, the specified line height overrides the content.</remarks>
 public D2dResult SetLineSpacing(D2dLineSpacingMethod lineSpacingMethod, float lineSpacing, float baseline)
 {
     m_nativeTextFormat.SetLineSpacing((LineSpacingMethod)lineSpacingMethod, lineSpacing, baseline);
     return D2dResult.Ok;
 }
Esempio n. 3
0
        /// <summary>
        /// Returns the line spacing adjustment set for a multiline text paragraph</summary>
        /// <param name="lineSpacingMethod">A value that indicates how line height is determined</param>
        /// <param name="lineSpacing">When this method returns, contains the line height, 
        /// or distance between one baseline to another</param>
        /// <param name="baseline">When this method returns, contains the distance from top of line to baseline.
        /// A reasonable ratio to lineSpacing is 80 percent.</param>
        /// <returns>If the method succeeds, it returns D2dResult.Ok. 
        /// Otherwise, it throws an exception.</returns>
        public D2dResult GetLineSpacing(
            out D2dLineSpacingMethod lineSpacingMethod,
            out float lineSpacing,
            out float baseline)
        {
            LineSpacingMethod tmpLineSpacingMethod;
            m_nativeTextFormat.GetLineSpacing(
                out tmpLineSpacingMethod,
                out lineSpacing,
                out baseline);

            lineSpacingMethod = (D2dLineSpacingMethod)tmpLineSpacingMethod;
            return D2dResult.Ok;
        }
Esempio n. 4
0
 /// <summary>
 /// Sets the line spacing</summary>
 /// <param name="lineSpacingMethod">Specifies how line height is being determined; see D2dLineSpacingMethod
 /// for more information</param>
 /// <param name="lineSpacing">The line height, or distance between one baseline to another</param>
 /// <param name="baseline">The distance from top of line to baseline. A reasonable ratio to lineSpacing
 /// is 80 percent.</param>
 /// <returns>If the method succeeds, it returns D2dResult.OK. Otherwise, it throws an exception.</returns>
 /// <remarks>
 /// For the default method, spacing depends solely on the content. For uniform
 /// spacing, the specified line height overrides the content.</remarks>
 public D2dResult SetLineSpacing(D2dLineSpacingMethod lineSpacingMethod, float lineSpacing, float baseline)
 {
     m_nativeTextFormat.SetLineSpacing((LineSpacingMethod)lineSpacingMethod, lineSpacing, baseline);
     return(D2dResult.Ok);
 }