/// <summary> /// Adds a new text geometry with the given text. /// </summary> internal static GeometryResource AddTextGeometry(this ResourceDictionary resourceDictionary, NamedOrGenericKey resourceKey, string textToAdd, TextGeometryOptions textGeometryOptions) { var newGeometry = new Geometry(); newGeometry.FirstSurface.BuildTextGeometry(textToAdd, textGeometryOptions); return(resourceDictionary.AddGeometry(resourceKey, newGeometry)); }
/// <summary> /// Adds a new text geometry with the given text. /// </summary> internal static GeometryResource AddTextGeometry(this ResourceDictionary resourceDiciontary, NamedOrGenericKey resourceKey, string textToAdd, TextGeometryOptions textGeometryOptions) { VertexStructure newStructure = new VertexStructure(); newStructure.FirstSurface.BuildTextGeometry(textToAdd, textGeometryOptions); newStructure.FirstSurface.Material = textGeometryOptions.SurfaceMaterial; return(resourceDiciontary.AddGeometry(resourceKey, newStructure)); }