API Reference
Class
OfficeRasterText
Text layout and raster effects shared by managed image-editing consumers.
Inheritance
- Object
- OfficeRasterText
Methods
public static Void Draw(OfficeRasterImage target, String text, Double x, Double y, Double width, Double height, OfficeColor color, Double fontSize = 16, String fontFamily = null, OfficeTextAlignment horizontalAlignment = Left, OfficeTextVerticalAlignment verticalAlignment = Top, Boolean wrap = false, Boolean clip = false, Nullable<OfficeColor> shadowColor = null, Double shadowOffsetX = 0, Double shadowOffsetY = 0, Nullable<OfficeColor> outlineColor = null, Double outlineWidth = 0, CancellationToken cancellationToken = default) #Returns:
VoidDraws measured text, optional shadow, and a rounded raster outline over existing pixels.
Parameters
- target OfficeIMO.Drawing.OfficeRasterImage
- text System.String
- x System.Double
- y System.Double
- width System.Double
- height System.Double
- color OfficeIMO.Drawing.OfficeColor
- fontSize System.Double = 16
- fontFamily System.String = null
- horizontalAlignment OfficeIMO.Drawing.OfficeTextAlignment = Left
- verticalAlignment OfficeIMO.Drawing.OfficeTextVerticalAlignment = Top
- wrap System.Boolean = false
- clip System.Boolean = false
- shadowColor System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- shadowOffsetX System.Double = 0
- shadowOffsetY System.Double = 0
- outlineColor System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- outlineWidth System.Double = 0
- cancellationToken System.Threading.CancellationToken = default
public static OfficeTextBlockLayout Measure(String text, Double fontSize = 16, String fontFamily = null, Nullable<Double> wrapWidth = null) #Returns:
OfficeTextBlockLayoutMeasures authored lines or wraps them to a requested width using managed font metrics.
Parameters
- text System.String
- fontSize System.Double = 16
- fontFamily System.String = null
- wrapWidth System.Nullable{System.Double} = null