public override void imethod_0( ref Vector2D baselinePos, double height, Enum24 whiteSpaceHandlingFlags) { base.imethod_0(ref baselinePos, height, whiteSpaceHandlingFlags); Vector2D vector2D = Vector2D.Zero; double val1_1; double val1_2; if (this.Blocks.Count > 0) { val1_1 = 0.0; val1_2 = 0.0; foreach (Interface24 block in this.Blocks) { Class596 settings = block.Settings; val1_1 = System.Math.Max(val1_1, settings.Font.Metrics.Ascent); val1_2 = System.Math.Max(val1_2, settings.Font.Metrics.Descent); Vector2D lineFeedAdvance = settings.Font.Metrics.LineFeedAdvance; if (System.Math.Abs(lineFeedAdvance.X) > System.Math.Abs(vector2D.X)) { vector2D.X = lineFeedAdvance.X; } if (System.Math.Abs(lineFeedAdvance.Y) > System.Math.Abs(vector2D.Y)) { vector2D.Y = lineFeedAdvance.Y; } } } else { val1_1 = this.Settings.Font.Metrics.Ascent; val1_2 = this.Settings.Font.Metrics.Descent; vector2D = this.Settings.Font.Metrics.LineFeedAdvance; } if (this.lineSpacingStyle_0 == LineSpacingStyle.AtLeast) { Bounds2D bounds = this.GetBounds(whiteSpaceHandlingFlags, (Class985)null); double y = val1_1 - bounds.Corner2.Y + this.Offset.Y; double num = val1_2 - this.Offset.Y + bounds.Corner1.Y; if (y < 0.0) { Class427 class427 = this; class427.Offset = class427.Offset + new Vector2D(0.0, y); } baselinePos = this.Offset + vector2D * this.double_0; if (num >= 0.0) { return; } baselinePos.Y += num; } else { baselinePos = this.Offset + vector2D * this.double_0; } }
public void method_0(Class596 lineSettings) { this.linkedList_0.AddLast(new Class427(this.double_0, this.lineSpacingStyle_0, lineSettings)); this.class427_0 = this.linkedList_0.Last.Value; this.class426_0 = (Class426)null; }
public void imethod_0(ref Vector2D baselinePos, double height, Enum24 whiteSpaceHandlingFlags) { LinkedList <Class427> linkedList = new LinkedList <Class427>(); this.vector2D_0 = baselinePos; baselinePos += new Vector2D(0.0, -this.class1024_0.BeforeSpace); double paragraphWidth = this.class1024_0.ParagraphWidth; bool flag1; double width = (flag1 = paragraphWidth > 0.0) ? paragraphWidth - this.class1024_0.RightIndent + this.vector2D_0.X : 0.0; bool flag2 = true; using (LinkedList <Class427> .Enumerator enumerator = this.linkedList_0.GetEnumerator()) { label_13: if (enumerator.MoveNext()) { Class427 class427_1 = enumerator.Current; do { double x = this.vector2D_0.X + this.class1024_0.LeftIndent; if (flag2) { goto label_11; } label_3: Vector2D baselinePos1 = new Vector2D(x, baselinePos.Y); Vector2D vector2D = baselinePos1; class427_1.imethod_0(ref baselinePos1, height, whiteSpaceHandlingFlags); Bounds2D bounds = class427_1.GetBounds(whiteSpaceHandlingFlags, (Class985)null); if (flag1 && bounds.Delta.X > width - x) { Interface24[] nterface24Array = class427_1.imethod_1(width, this.TextBreaker); switch (nterface24Array.Length) { case 0: linkedList.AddLast(class427_1); class427_1 = (Class427)null; break; case 1: linkedList.AddLast(class427_1); class427_1 = (Class427)null; break; case 2: baselinePos1 = vector2D; Class427 class427_2 = (Class427)nterface24Array[0]; class427_2.imethod_0(ref baselinePos1, height, whiteSpaceHandlingFlags); linkedList.AddLast(class427_2); class427_1 = (Class427)nterface24Array[1]; break; default: linkedList.AddLast(class427_1); class427_1 = (Class427)null; break; } } else { linkedList.AddLast(class427_1); class427_1 = (Class427)null; } baselinePos += baselinePos1 - vector2D; continue; label_11: flag2 = false; x += this.class1024_0.LeftIndentFirst; goto label_3; }while (class427_1 != null); goto label_13; } } if (linkedList.Count > this.linkedList_0.Count) { this.linkedList_0 = linkedList; } bool flag3 = true; foreach (Class427 class427 in this.linkedList_0) { double num = this.vector2D_0.X + this.class1024_0.LeftIndent; if (flag3) { flag3 = false; num += this.class1024_0.LeftIndentFirst; } Bounds2D bounds = class427.GetBounds(Enum24.flag_1, (Class985)null); switch (this.class1024_0.Alignment) { case Class1023.Enum45.const_0: class427.method_1(0.5 * (width + num) - bounds.Center.X); continue; case Class1023.Enum45.const_1: class427.method_1(num - bounds.Corner1.X); continue; case Class1023.Enum45.const_2: class427.method_1(width - bounds.Corner2.X); continue; default: continue; } } baselinePos += new Vector2D(0.0, -this.class1024_0.AfterSpace); }
public void method_1(double value) { Class427 class427 = this; class427.Offset = class427.Offset + new Vector2D(value, 0.0); }