Añadir Efecto Brillo

Cómo añadir un efecto de brillo al texto

Applying a glow effect to text in IronWord is accomplished by configuring the TextEffect property of a TextStyle object. El efecto de brillo crea un borde luminoso alrededor del texto, con propiedades de color y radio personalizables para controlar la apariencia visual.

To create a glow effect, instantiate a TextStyle and assign a TextEffect object with a configured Glow instance. The Glow object accepts properties like GlowColor to specify the color of the glow and GlowRadius to control the spread of the effect. Los valores de radio más altos producen brillos más difusos, mientras que los valores más bajos crean halos más ajustados alrededor del texto.

After configuring the text style, create a Run object containing the desired TextContent and assign the configured style to the Run. Use AddChild to add the styled run to a paragraph, then add the paragraph to the document. Esto sigue la jerarquía del documento: Documento → Párrafo → Ejecutar → Contenido de texto.

Explicación del código

El fragmento de código anterior demuestra cómo crear un nuevo documento de Word y aplicar un estilo de texto con un efecto de brillo. First, a new Word document is instantiated and stored in the variable doc. Then, a new TextStyle object named textStyle is created. This text style is configured to include a glow effect by initializing a TextEffect object with specific settings.

To add the styled text with the glow effect, a Paragraph is created, then a Run object is created containing TextContent with "Hello World". The textStyle is assigned to the Run, which applies the glow effect. The Run is added to the Paragraph using AddChild, and finally the Paragraph is added to the document. Este enfoque de varios pasos sigue la jerarquía del documento: Documento → Párrafo → Ejecutar → Contenido de texto. Finalmente, el documento de Word se exporta como un nuevo archivo.

Para más ejemplos y demostraciones, por favor dirígete al siguiente artículo: Cómo Añadir Efecto de Brillo al Texto.

Más información sobre los elementos del documento en IronWord

¿Listo para empezar?
Nuget Descargas 36,204 | Versión: 2026.3 recién lanzado
Still Scrolling Icon

¿Aún desplazándote?

¿Quieres una prueba rápida? PM > Install-Package IronWord
ejecuta una muestra observa cómo tus datos se convierten en un documento de Word.