起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 264|回复: 6

【搞定】关于canvas的问题**

[复制链接]
发表于 2007-4-13 11:57:42 | 显示全部楼层 |阅读模式
在x3下的画布控件在哪里啊?canvas的功能在x3怎么实现?
回复

使用道具 举报

发表于 2007-4-13 13:54:14 | 显示全部楼层
http://bbs.justep.com/forum.php? ... mp;highlight=canvas
要查TCanvas的具体属性,请在类库参考中搜索TCanvas

另外不知道楼主具体想实现什么,最好提具体需求
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-13 14:32:04 | 显示全部楼层
是这样我们要做一个环网的CAD还要结合查询,不知道能不能提供什么好的方法给我,谢谢了

snap00008.jpg

88.5 KB, 下载次数: 136

回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-13 14:35:30 | 显示全部楼层
上面的图就是它的一个简单实现的界面,可以画线和方块,我想知道x3没有画布吗?只能在窗体上直接画吗?
回复 支持 反对

使用道具 举报

发表于 2007-4-13 16:56:01 | 显示全部楼层
其实windows程序都是通过画布来画的,form可以画
Panel可以画,当然他们都有画布,只是因为Delphi做了封装而已
回复 支持 反对

使用道具 举报

发表于 2007-4-13 16:57:02 | 显示全部楼层
以下摘自studioHelp
=======================
NameSpace: Business.System
--------------------------------------------------------------------------------
TCanvas = class(TPersistent)
protected
  procedure Changed; virtual;
  procedure Changing; virtual;
  procedure CreateHandle; virtual;
  procedure RequiredState(ReqState: TCanvasState);
public
  constructor create;
  procedure Arc(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint; X3: Longint; Y3: Longint; X4: Longint; Y4: Longint);
  procedure BrushCopy(Dest: TRect; Bitmap: TBitmap; Source: TRect; Color: Longint);
  procedure Chord(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint; X3: Longint; Y3: Longint; X4: Longint; Y4: Longint);
  procedure CopyRect(Dest: TRect; Canvas: TCanvas; Source: TRect);
  procedure Destroy; override;
  procedure Draw(X: Longint; Y: Longint; Graphic: TGraphic);
  procedure DrawFocusRect(Rect: TRect);
  procedure Ellipse(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint); overload;
  procedure Ellipse(Rect: TRect); overload;
  procedure FillRect(Rect: TRect);
  procedure FloodFill(X: Longint; Y: Longint; Color: Longint; FillStyle: TFillStyle);
  procedure FrameRect(Rect: TRect);
  function HandleAllocated: Boolean;
  procedure LineTo(X: Longint; Y: Longint);
  procedure Lock;
  procedure MoveTo(X: Longint; Y: Longint);
  procedure Pie(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint; X3: Longint; Y3: Longint; X4: Longint; Y4: Longint);
  procedure PolyBezier(Points: array of TPoint);
  procedure PolyBezierTo(Points: array of TPoint);
  procedure Polygon(Points: array of TPoint);
  procedure Polyline(Points: array of TPoint);
  procedure Rectangle(Rect: TRect); overload;
  procedure Rectangle(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint); overload;
  procedure Refresh;
  procedure RoundRect(X1: Longint; Y1: Longint; X2: Longint; Y2: Longint; X3: Longint; Y3: Longint);
  procedure StretchDraw(Rect: TRect; Graphic: TGraphic);
  function TextExtent(Text: string): tagSIZE;
  function TextHeight(Text: string): Longint;
  procedure TextOut(X: Longint; Y: Longint; Text: string);
  procedure TextRect(Rect: TRect; X: Longint; Y: Longint; Text: string);
  function TextWidth(Text: string): Longint;
  function TryLock: Boolean;
  procedure Unlock;
  property Brush: TBrush;
  property CanvasOrientation: TCanvasOrientation;
  property ClipRect: TRect; readonly;
  property CopyMode: Longint;
  property Font: TFont;
  property Handle: Longword;
  property LockCount: Longint;
  property OnChange: TNotifyEvent;
  property OnChanging: TNotifyEvent;
  property Pen: TPen;
  property PenPos: TPoint;
  property Pixels[Longint, Longint]: Longint;
  property TextFlags: Longint;
end;
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-16 11:59:14 | 显示全部楼层
可以先结帖了
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-1-2 01:17 , Processed in 0.044318 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表