TextMask

Ecng.Drawing

A line of text rendered for a canvas: how opaque the text is at every pixel of the box it takes.

构造函数

TextMask
public TextMask(int left, int top, int width, byte[] opacity)
textMask = TextMask(left, top, width, opacity)
left
The column of the canvas the box starts at.
top
The row of the canvas the box starts at.
width
Width of the box in pixels.
opacity
Opacity of the text, 0..255, for every pixel of the box row by row.

方法

Draw
public void Draw(RasterImage image)
textMask.Draw(image)

Draws the line in white onto a picture of the size it was rendered for.