- UID
- 5043
- 积分
- 1347
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2002-5-13
- 最后登录
- 1970-1-1
|
发表于 2013-8-24 20:10:52
|
显示全部楼层
本帖最后由 LoveArx 于 2013-8-24 20:12 编辑
你是说画那种向量,刷新后就没的那种?
ARX有全局函数:
acedGrDraw Global Function
int acedGrDraw( const ads_point from, const ads_point to, int color, int hl); from | Beginning point of the vector, expressed in the current UCS; can be a three-dimensional point | to | End point of the vector, expressed in the current UCS; can be a three-dimensional point | color | Vector's AutoCAD color number (in the range 0-255); I -1, the vector is drawn in XOR ink, which complements anything it draws over and erases itself when overdrawn | hl | If nonzero, the vector is highlighted; if zero, the vector is drawn in normal display mode | Draws a vector between two points in the current viewport.
AutoCAD clips the vector as required to fit the screen.
Highlighting, controlled by the hl argument, depends on the display device. Most display drivers indicate highlighting by a dashed line, but some indicate it by using a distinctive color.
Unless a critical error occurs, acedGrDraw() returns RTNORM.
Include Fileacedads.h
acedGrVecs Global Function
int acedGrVecs( const struct resbuf * vlist, ads_matrix mat); vlist | List of result buffers that specify the vectors to draw | mat | 4 x 4 transformation matrix that acedGrVecs() applies to the vectors before displaying them; if NULL, defaults to the identity matrix | Draws multiple vectors on the graphics screen.
Result-buffer elements in the vlist can be as follows:
- A pair of points (RTPOINT or RT3DPOINT) that specify the endpoints of the vector, expressed in the current UCS; these can be three-dimensional points.
Note You must pass these points as pairs--that is, in two successive result buffers--or the acedGrVecs() call will fail. - A color value that applies to all succeeding vectors until vlist specifies another color. The color is specified as a short integer (RTSHORT). AutoCAD colors are in the range 0-255. If the color value is greater than 255, succeeding vectors are drawn in XOR ink, which complements anything it draws over and erases itself when overdrawn. If the color value is less than 0, the vector is highlighted.
AutoCAD clips the vectors as required to fit the screen.
The mat argument is useful in conjunction with acedDragGen() when you want to display vectors that are transformed with the selection set.
If it succeeds, acedGrVecs() returns RTNORM; it returns RTERROR if it encounters a result buffer of the wrong type or if the points in vlist are not paired correctly.
Include Fileacedads.h
acedGrText Global Function
extern "C" int acedGrText( int box, const ACHAR * text, int hl); box | Graphics screen area in which to display the text | text | Text string to display | hl | Controls highlighting of menu items | Displays the specified text in the menu, mode, or status area of the graphics screen.
If box equals the number of a screen menu box and hl is less than 0, acedGrText() displays text in that box. The menu boxes are numbered beginning at 0. If the value of box is greater than the number of menu boxes minus one, the call to acedGrText() usually has no effect.
If box specifies a screen menu box and hl is greater than 0, the text displayed by acedGrText() is highlighted. If hl equals 0 and the box is highlighted, acedGrText() turns highlighting off. (Remember that AutoCAD allows only one menu box to be highlighted at a time. A call that highlights a different box automatically turns off any previous highlighting.) When hl is greater than or equal to 0, the text argument is ignored.
If box equals -1, acedGrText() writes the text into the mode status line (the hl argument is ignored). The length of the mode status line differs from display to display; most allow at least 40 characters. If text contains more characters than the mode status line allows, it is truncated; if it contains fewer characters, it is padded with blanks.
If box equals -2, acedGrText() writes the text into the coordinate status line (the hl argument is ignored). If coordinate tracking is turned on, any value written into this field is overwritten as soon as the pointer sends another set of coordinates.
Finally, if box is less than -2 (for example: box equals -5), acedGrText() restores all the text areas on the screen to their standard values.
If it succeeds, acedGrText() returns RTNORM. It returns RTERROR if the box number is out of range.
Include Fileacedads.h
acedGrRead Global Function
int acedGrRead( int track, int * type, struct resbuf * result); track | Control bits that affect the behavior of acedGrRead(); not mutually exclusive, so to set multiple conditions add the values together | type | Device and kind of input entered; used to control the cursor display | result | Value obtained from the user | Input devices directly read the next input that the user provides to any AutoCAD input device.
Note Only specialized ARX applications need this function. The various user input functions (acedGetXxx(), acedEntSel(), acedNEntSelP(), acedNEntSel(), and acedDragGen()) are sufficient for almost all purposes.
The following list describes the control bits.
|
|