internal void method_0(DxfModel model) { if ((this.elementType_0 & DxfLineType.ElementType.IsShape) != DxfLineType.ElementType.None) { if (this.TextStyle == null) { return; } ShxFile shxFile = this.TextStyle.GetShxFile(); if (shxFile == null) { return; } ShxShape shapeByIndex = shxFile.GetShapeByIndex((ushort)this.short_0); if (shapeByIndex == null) { return; } WW.Math.Point2D endPoint; this.fillableShape2D_0 = new FillableShape2D(shapeByIndex.GetGlyphShape(this.TextStyle.IsVertical, out endPoint), false); } else { if ((this.elementType_0 & DxfLineType.ElementType.IsText) == DxfLineType.ElementType.None || this.TextStyle == null) { return; } Class425 class425 = Class594.smethod_10(this.string_0, 1.0, this.TextStyle.ObliqueAngle, this.TextStyle.WidthFactor, this.TextStyle, Colors.White); List <Class908> class908List = new List <Class908>(); class425.imethod_3((ICollection <Class908>)class908List, Matrix4D.Identity, (short)0); GeneralShape2D generalShape2D = new GeneralShape2D(); bool filled = false; foreach (Class908 class908 in class908List) { generalShape2D.Append(class908.FontPath, false); if (class908.Font.Filled) { filled = true; } } if (!generalShape2D.HasSegments) { return; } generalShape2D.ShrinkWrap(); this.fillableShape2D_0 = new FillableShape2D((IShape2D) new CachedBoundsShape2D((IShape2D)generalShape2D), filled); } }
private WoutWareGlyph method_4(Stream stream, byte[] buffer) { char letter = WoutWareFont.smethod_5(stream, buffer); Vector2D advance = WoutWareFont.smethod_7(stream, buffer); GeneralShape2D generalShape2D = new GeneralShape2D(); int num; while (true) { num = stream.ReadByte(); if (num >= 0) { WoutWareFont.Enum12 enum12 = (WoutWareFont.Enum12)num; if ((uint)enum12 <= 100U) { switch (enum12) { case WoutWareFont.Enum12.const_5: goto label_11; case WoutWareFont.Enum12.const_4: double m00_1 = (double)WoutWareFont.smethod_3(stream, buffer); double m01 = (double)WoutWareFont.smethod_3(stream, buffer); double m02_1 = (double)WoutWareFont.smethod_3(stream, buffer); double m10 = (double)WoutWareFont.smethod_3(stream, buffer); double m11_1 = (double)WoutWareFont.smethod_3(stream, buffer); double m12_1 = (double)WoutWareFont.smethod_3(stream, buffer); generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, new Matrix3D(m00_1, m01, m02_1, m10, m11_1, m12_1, 0.0, 0.0, 1.0)); continue; case WoutWareFont.Enum12.const_0: generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false); continue; default: goto label_12; } } else { switch (enum12) { case WoutWareFont.Enum12.const_3: double m00_2 = (double)WoutWareFont.smethod_3(stream, buffer); double m02_2 = (double)WoutWareFont.smethod_3(stream, buffer); double m11_2 = (double)WoutWareFont.smethod_3(stream, buffer); double m12_2 = (double)WoutWareFont.smethod_3(stream, buffer); generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, new Matrix3D(m00_2, 0.0, m02_2, 0.0, m11_2, m12_2, 0.0, 0.0, 1.0)); continue; case WoutWareFont.Enum12.const_2: double x1 = (double)WoutWareFont.smethod_3(stream, buffer); double y1 = (double)WoutWareFont.smethod_3(stream, buffer); generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, Transformation3D.Scaling(x1, y1)); continue; case WoutWareFont.Enum12.const_1: double x2 = (double)WoutWareFont.smethod_3(stream, buffer); double y2 = (double)WoutWareFont.smethod_3(stream, buffer); generalShape2D.Append(this.ilist_0[WoutWareFont.smethod_1(stream, buffer)], false, Transformation3D.Translation(x2, y2)); continue; default: goto label_12; } } } else { break; } } throw new IOException("Unexpected end of input!"); label_11: IShape2D outline = !generalShape2D.HasSegments ? (IShape2D)NullShape2D.Instance : (IShape2D) new CachedBoundsShape2D((IShape2D)generalShape2D); return(new WoutWareGlyph(letter, outline, advance)); label_12: throw new IOException("Invalid reference operator " + (object)num); }