Esempio n. 1
0
        /// <summary>
        ///   This method applies the given culture to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="culture"> This parameter references the culture to apply to the range. </param>
        public void SetCulture(IndexedRange textRange, CultureInfo culture)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Culture = culture;
            }
        }
Esempio n. 2
0
        /// <summary>
        ///   This method applies the given number substition to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="numberSubstitution"> This parameter references the number substitution to apply to the range. </param>
        public void SetNumberSubstitution(IndexedRange textRange, NumberSubstitution numberSubstitution)
        {
            Contract.Assert(textRange.IsWithin(_FullText));

            foreach(int index in textRange)
            {
                _Characters[index].NumberSubstitution = numberSubstitution;
            }
        }
Esempio n. 3
0
        /// <summary>
        ///   This method applies the given font family to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="family"> This parameter references the font family to apply to the range. </param>
        public void SetFamily(IndexedRange textRange, string family)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Family = family;
            }
        }
Esempio n. 4
0
        /// <summary>
        ///   This method applies the given font weight to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="weight"> This parameter indicates the font weight to apply to the range. </param>
        public void SetWeight(IndexedRange textRange, FontWeight weight)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Weight = weight;
            }
        }
Esempio n. 5
0
        /// <summary>
        ///   This method applies the given font style to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="style"> This parameter indicates the font style to apply to the range. </param>
        public void SetStyle(IndexedRange textRange, FontStyle style)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Style = style;
            }
        }
Esempio n. 6
0
        /// <summary>
        ///   This method applies the given font point size to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="pointSize"> This parameter contains the font size to apply to the range. </param>
        public void SetPointSize(IndexedRange textRange, float pointSize)
        {
            Contract.Requires(Check.IsPositive(pointSize));
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].PointSize = pointSize;
            }
        }
Esempio n. 7
0
        /// <summary>
        ///   This method transforms the characters of the given text range to inline objects.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="inline"> This parameter indicates the size of the inline object. </param>
        /// <param name="hAlignment"> This parameter indicates the horizontal alignment of the inline object. </param>
        /// <param name="vAlignment"> This parameter indicates the vertical alignment of the inline object. </param>
        public void SetInline(
			IndexedRange textRange, Size inline, Alignment hAlignment, Alignment vAlignment)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Inline = inline;
                _OutputSink.Characters[index].HAlignment = hAlignment;
                _OutputSink.Characters[index].VAlignment = vAlignment;
            }
        }
Esempio n. 8
0
        /// <summary>
        ///   This method applies the given font features to a range of characters.
        /// </summary>
        /// <param name="textRange"> This parameter indicates the range of characters to modify. </param>
        /// <param name="features"> This parameter references the collection of font features to apply to the range. </param>
        public void SetFeatures(IndexedRange textRange, FontFeatureCollection features)
        {
            Contract.Assert(textRange.IsWithin(_OutputSink.FullText));

            foreach(int index in textRange)
            {
                _OutputSink.Characters[index].Features = features;
            }
        }