在图片中绘制字符串。

该VI可自动计算文本的矩形边界并按照指定的点显示文本。


icon

输入/输出

  • ccclst.png [user-specified font]

    [user-specified font] specifies the specific font characteristics for the text to draw.

    所需字体不是用户定义字体,VI可忽略该输入。

  • cstr.png Font Name:

    Font Name specifies the font to use for the text.

    如未能正确拼写字体名称或指定的字体没有安装在计算机上,操作系统可选择字体。

  • ci16.png Size

    Size specifies the size of the font in points.

  • cbool.png Strikeout?

    Strikeout? specifies if the text appears in strikeout. If Strikeout? is TRUE, the text appears in strikeout.

  • cbool.png Italic?

    Italic? specifies if the text appears in italics. If Italic? is TRUE, the text appears in italics.

  • cbool.png Underline?

    Underline? specifies if the text is underlined. If Underline? is TRUE, the text appears underlined.

  • cbool.png Outline?

    Outline? specifies if the text is outlined. If Outline? is TRUE, the text appears outlined.

  • cbool.png Shadow?

    Shadow? specifies if the text has a shadow. If Shadow? is TRUE, the text appears in shadow.

  • cbool.png Bold?

    Bold? specifies if the text is bold. If Bold? is TRUE, the text appears bold.

  • cenum.png desired font(Application)

    desired font specifies the text font.

    0
    User-specified Font
    1
    Application Font
    (默认)
    2
    System Font
    3
    Dialog Font
  • cpict.png picture

    picture is the picture to which you want to add the text string. The default is an empty picture.

  • cnclst.png origin

    origin is the coordinate of the starting point of the text.

  • ci16.png x

    x is the horizontal coordinate that increases to the right.

  • ci16.png y

    y is the vertical coordinate that increases to the bottom.

  • cnclst.png alignment(left, top)

    alignment specifies the location of the text relative to the origin you specify.

  • cenum.png horizontal

    horizontal sets the horizontal position of the text with respect to the origin.

    0left-原点的水平分量可指定文本的左边界。
    1center-原点的水平分量可指定文本的中心。
    2right-原点的水平分量可指定文本的右边界。
  • cenum.png vertical

    vertical sets the vertical position of the text with respect to the origin.

    0top-原点的垂直分量可指定文本的上边界。
    1center-原点的垂直分量可指定文本的中心。
    2bottom-原点的垂直分量可指定文本的下边界。
  • cstr.png text

    text is the string to draw in the picture.

  • cu32.png text color(black)

    文本颜色表示文本的颜色。默认值为黑色。

    可连线颜色盒常量至该输入端。

  • cu32.png BG color(transparent)

    BG color is the color of the background of the text.

    默认值为透明。

    可连线颜色盒常量至该输入端。

  • cenum.png text orientation

    text orientation sets the orientation of the text to draw.

    0None (默认)-文本显示正常。
    1Stacked-层叠显示文本。
    2Clockwise-文本顺时针旋转90°,得到垂直的从上向下读的文本。
    3Counterclockwise-文本逆时针旋转90°,得到垂直的从下向上读的文本。
  • ipict.png new picture

    new picture is the picture that contains the new image. You can wire this output to any other picture input to add more drawing instructions to the picture.

    也可连线该输出端至图片至像素图转换VI,获取图像数据簇。然后通过图形格式VI使图像数据保存为文件。通过连线该输出至连接字符串函数,连线图片函数VI的输出,在图片控件中绘图。

  • inclst.png text rect

    text rect is a cluster that contains coordinates that describe the left, top, right, and bottom coordinates of the outer edges of the rectangle.

  • ii16.png left

    left is the horizontal coordinate of the left edge of the rectangle.

  • ii16.png top

    top is the vertical coordinate of the top edge of the rectangle.

  • ii16.png right

    right is the horizontal coordinate of the right edge of the rectangle.

  • ii16.png bottom

    bottom is the vertical coordinate of the bottom edge of the rectangle.