找回密码
 立即注册

QQ登录

只需一步,快速开始

jerachen

高级会员

4

主题

8

帖子

1386

积分

高级会员

积分
1386

活字格认证元老葡萄

jerachen
高级会员   /  发表于:2015-7-22 00:06  /   查看:5911  /  回复:7
如何在RasterImage添加竖排的文字(要求文字的方向为逆时针90度),仅限LEADTOOLS Imaging Pro包含的功能内,请看附件效果图

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

7 个回复

倒序浏览
jerachen
高级会员   /  发表于:2015-7-22 00:15:00
沙发
RasterImageGdiPlusGraphicsContainer.Graphics.DrawString 有个参数是StringFormat可以实现竖排功能 但是,文字的方向无法改变,我需要的是旋转文字。
我尝试使用旋转RasterImage来实现。但是RasterImage.RotateViewPerspective未包含在LEADTOOLS Imaging Pro之内。 请帮忙解决一下。万分感谢!
回复 使用道具 举报
guanzhuyu
新手上路   /  发表于:2015-7-22 10:59:00
板凳
你可以试下 用“@黑体”这样的字体名称
回复 使用道具 举报
jerachen
高级会员   /  发表于:2015-7-22 12:32:00
地板
好的,谢谢 我晚上试试看
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-7-22 15:23:00
5#
回复 4楼jerachen的帖子

你好,
可以尝试创建一个背景色为透明的图片,写入文字后旋转图片,最后合成到目标图片中。
回复 使用道具 举报
jerachen
高级会员   /  发表于:2015-7-22 19:56:00
6#
回复 5楼iceman的帖子

问题在于如何旋转图片。(LEADTOOLS Imaging Pro范围内)
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-7-23 10:12:00
7#
回复 6楼jerachen的帖子

LEADTOOLS Imaging Pro 图片旋转请使用:
  1. RasterCodecs codecs = new RasterCodecs();
  2.    string srcFileName = Path.Combine(ImagesPath.Path, "Image1.cmp");
  3.    string destFileName = Path.Combine(ImagesPath.Path, "RotateCommand.bmp");

  4.    // Load the source image from disk
  5.    RasterImage image = codecs.Load(srcFileName);

  6.    // Rotate the image by 45 degrees
  7.    RotateCommand command = new RotateCommand();
  8.    command.Angle = 45 * 100;
  9.    command.FillColor = new RasterColor(255, 255, 255);
  10.    command.Flags = RotateCommandFlags.Bicubic;
  11.    command.Run(image);

  12.    // Save it to disk
  13.    codecs.Save(image, destFileName, RasterImageFormat.Bmp, 24);

  14.    // Clean Up
  15.    image.Dispose();
  16.    codecs.Dispose();
复制代码
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2015-8-14 09:37:00
8#
回复 6楼jerachen的帖子

为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部