其他语言

本类阅读TOP10

·基于Solaris 开发环境的整体构思
·使用AutoMake轻松生成Makefile
·BCB数据库图像保存技术
·GNU中的Makefile
·射频芯片nRF401天线设计的分析
·iframe 的自适应高度
·BCB之Socket通信
·软件企业如何实施CMM
·入门系列--OpenGL最简单的入门
·WIN95中日志钩子(JournalRecord Hook)的使用

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
在linux+kylix环境下画布上画旋转的字体

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

 

unit Unit1;

interface

uses
  SysUtils, Types, Classes, Variants, QTypes, QGraphics, QControls, QForms,
  QDialogs, QStdCtrls, QExtCtrls,qt;

type
  TForm1 = class(TForm)
    ComboBox1: TComboBox;
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    Bevel1: TBevel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.xfm}

procedure TForm1.Button1Click(Sender: TObject);

var
 pxy,PrPoint:TPoint;
begin
pxy.x:=100;
pxy.y:=100;
canvas.Start(); //prevent other process using canvas
canvas.Font.Size:=40;
QPainter_rotate(Canvas.Handle,strtoint(ComboBox1.text));
QPainter_xFormDev(Canvas.Handle,PPoint(@prpoint),ppoint(@Pxy));
Canvas.TextOut(prpoint.x,prpoint.Y,Edit1.Text);
canvas.Stop;
//return to old position
QPainter_rotate(Canvas.Handle,strtoint(ComboBox1.text)*-1);
Canvas.TextOut(pxy.x,pxy.Y,Edit1.Text);
end;

end.

 

在RedHat9 kylix3.0下测试通过

........................................................................

欢迎和我交流 

费弘斌
qq:58055730
msn:[email protected]

http://www.codeidea.com




相关文章

相关软件