Esempio n. 1
0
        public bool CanShapeTogether(ItemProps other)
        {
            // Check whether 2 ItemProps have the same attributes that impact shaping so
            // it is possible to shape them together.
            bool canShapeTogether = (NumberSubstitution == other.NumberSubstitution              // They must have the same number substitution properties.
                                     &&
                                     ScriptAnalysis.Equals(other.ScriptAnalysis));

            return(canShapeTogether);
        }
Esempio n. 2
0
 public void SetScriptAnalysis(int textPosition, int textLength, ScriptAnalysis scriptAnalysis)
 {
     SetCurrentRun(textPosition);
     SplitCurrentRun(textPosition);
     while (textLength > 0)
     {
         int       nextRunIndex = FetchNextRunIndex(ref textLength);
         LinkedRun run          = runs_[nextRunIndex];
         run.script          = scriptAnalysis;
         runs_[nextRunIndex] = run;
     }
 }
Esempio n. 3
0
 public void SetScriptAnalysis(int textPosition, int textLength, ScriptAnalysis scriptAnalysis)
 {
     SetCurrentRun(textPosition);
     SplitCurrentRun(textPosition);
     while (textLength > 0)
     {
         int nextRunIndex = FetchNextRunIndex(ref textLength);
         LinkedRun run = runs_[nextRunIndex];
         run.script = scriptAnalysis;
         runs_[nextRunIndex] = run;
     }
 }
Esempio n. 4
0
 protected override void OnSetScriptAnalysis(uint textPosition, uint textLength, ScriptAnalysis scriptAnalysis)
 {
     base.OnSetScriptAnalysis(textPosition, textLength, scriptAnalysis);
 }
Esempio n. 5
0
        /// <summary>
        ///   This method applies the results of script analysis to a range of characters.
        /// </summary>
        /// <param name="textPosition"> This parameter indicates the starting index of the range. </param>
        /// <param name="textLength"> This parameter indicates the length of the range. </param>
        /// <param name="scriptAnalysis"> This parameter contains the results to apply to the range. </param>
        void TextAnalysisSink.SetScriptAnalysis(
			int textPosition, int textLength, ScriptAnalysis scriptAnalysis)
        {
            IndexedRange range = new IndexedRange(textPosition, textLength);

            foreach(int index in range)
            {
                _OutputSink.Characters[index].ScriptAnalysis = scriptAnalysis;
            }
        }
Esempio n. 6
0
 protected override void OnSetScriptAnalysis(uint textPosition, uint textLength, ScriptAnalysis scriptAnalysis)
 {
     base.OnSetScriptAnalysis(textPosition, textLength, scriptAnalysis);
 }