【问题标题】:How can I change the direction text flows in a drawstring?如何更改拉绳中文本的流动方向?
【发布时间】:2019-01-13 17:02:22
【问题描述】:

我正在用 C# 为糖果店制作标签打印。标签打印机纸又窄又高,像纵向格式,所以我正在使用

System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat(StringFormatFlags.DirectionVertical); 

这样做,输出的标签将是横向的。一切都进行得很顺利,直到我到了可以去配料的地步。我定义了一个矩形来包围它所在的空间并打印,但文本的流动方向错误。标签的设计使“顶部”是右侧长边,文本向左流动。问题是,我的拉绳文字从左开始向右流动。此处示例:

我该怎么做才能让它以另一种方式流动?谢谢!

【问题讨论】:

    标签: c# printing drawstring


    【解决方案1】:

    没关系,我想通了。我将其更改为System.Drawing.StringFormat drawFormat = new System.Drawing.StringFormat(StringFormatFlags.DirectionVertical | StringFormatFlags.DirectionRightToLeft);,现在它可以完美运行了:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-15
      • 2015-11-10
      • 2020-06-30
      相关资源
      最近更新 更多