Пример #1
0
        public void Initialize(Run* run, SCRIPT_ANALYSIS* scriptAnalysis, int charIndexInParagraph, int charCount)
        {
            this.run = *run;
            if (this.run.RunKind == RunKind.Text)
                this.run.CharCount = charCount;

            CharIndexInParagraph = charIndexInParagraph;
            ScriptAnalysis = *scriptAnalysis;
        }
Пример #2
0
 private static void ScriptTextOut(IntPtr hdc, ref IntPtr scriptCache, int x, int y,
     ExtTextOutOptions fuOptions, RECT* clipRect, SCRIPT_ANALYSIS* scriptAnalysis,
     ushort* glyphs, int glyphCount, int* glyphAdvanceWidths, int* justifiedGlyphAdvanceWidths,
     GOFFSET* glyphOffets)
 {
     int result = NativeMethods.ScriptTextOut(hdc, ref scriptCache, x, y, fuOptions, clipRect,
         scriptAnalysis, null, 0, glyphs, glyphCount, glyphAdvanceWidths, justifiedGlyphAdvanceWidths,
         glyphOffets);
     if (result != NativeConstants.S_OK)
         Marshal.ThrowExceptionForHR(result);
 }
Пример #3
0
        public void InitializeTruncatedCopy(ScriptRun* scriptRun, int truncatedLeadingCharsCount, int truncatedTrailingCharsCount)
        {
            this.run = scriptRun->run;
            if (this.run.RunKind == RunKind.Text)
                this.run.CharCount = scriptRun->CharCount - truncatedLeadingCharsCount - truncatedTrailingCharsCount;

            ScriptAnalysis = scriptRun->ScriptAnalysis;
            CharIndexInParagraph = scriptRun->CharIndexInParagraph + truncatedLeadingCharsCount;
        }