protected float _unitsPerEm(TFont font) => FontMeasurer.GetUnitsPerEm(font);
public override DrawBox MakeBogen(CharakterMan Charakter) { Charakter.Update(); float seite = 400; CString Haupt = new CString(); CString Oben = new CString(); CString Unten = new CString(); Haupt.add(new Word("Alsland-Personenakte", Schrift, Germanica, 0, Line)); Haupt.addAbsatz(); Haupt.add(Oben); Haupt.addAbsatz(); Haupt.add(Unten); Haupt.alignment = Oben.alignment = Unten.alignment = 0.5f; Tabular Splitter = new Tabular(2); CString Left = new CString(); CString Right = new CString(); Assistment.Texts.Text Name = base.GetName(Charakter); Oben.add(Splitter); Splitter.addRow(); Splitter[0, 0] = Left; Splitter[0, 1] = Right; Tabular Talente = GetTalente(Charakter, seite); //if (Talente.Rows > 0) // Talente.setRowPen(Talente.Rows - 1, Pens.Black); //Talente.addRow(); //Talente[Talente.Rows - 1, 0] = this.GetHarte(Charakter); Right.add(Talente.Geometry(5)); Right.alignment = 0.5f; Left.alignment = 0.5f; Left.addWhitespace(seite); Left.addAbsatz(); Left.add(Name.Geometry(30)); Left.addAbsatz(); #region Porträt try { Image img = Image.FromFile(Charakter.Charakter.Super.RP.Portrait); Left.add(new DynamicImageBox(img, 100, 100, 400, 400)); } catch (Exception) { } #endregion ab = 18; Title = new FontMeasurer("Calibri", 16); Normal = new FontMeasurer("Calibri", 14); Tabular t = new Tabular(3); t.addRow(2); t[0, 0] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Stärke")).Geometry(ab); t[0, 1] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Geschick")).Geometry(ab); t[0, 2] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Charisma")).Geometry(ab); t[1, 0] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Intelligenz")).Geometry(ab); t[1, 1] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Intuition")).Geometry(ab); t[1, 2] = GetAttributFertigkeitenTabelle(Charakter, Universe.Attribute.GetElement("Wahrnehmung")).Geometry(ab); Unten.add(t); Title = new FontMeasurer("Calibri", 12); Normal = new FontMeasurer("Calibri", 11); ab = 5; return Haupt.Geometry(rand); }
protected float FontUnitsToPt(TFont font, int fontUnits) => fontUnits * font.PointSize / FontMeasurer.GetUnitsPerEm(font);