請問一下!已經線段長度,如果要求線上的點(非節點,而是線段長度的10%位置)的坐標,請問有可能嗎!如果可以的話應該如何寫,謝謝
假設這個點是線段長度的10%的位置

Dim s As Shape
Set s = ActiveSelection.Shapes(1)
MsgBox "線段長度為: " & (s.Curve.Length * 25.4)
uj5u.com熱心網友回復:
借助API LineDDA ?LineDDA
The LineDDA function determines which pixels should be highlighted for a line defined by the specified starting and ending points.
BOOL LineDDA(
int nXStart, // x-coordinate of line's starting point
int nYStart, // y-coordinate of line's starting point
int nXEnd, // x-coordinate of line's ending point
int nYEnd, // y-coordinate of line's ending point
LINEDDAPROC lpLineFunc, // pointer to callback function
LPARAM lpData // pointer to application-defined data
);
Parameters
nXStart
Specifies the x-coordinate of the line's starting point.
nYStart
Specifies the y-coordinate of the line's starting point.
nXEnd
Specifies the x-coordinate of the line's ending point.
nYEnd
Specifies the y-coordinate of the line's ending point.
lpLineFunc
Pointer to an application-defined callback function. For more information, see the LineDDAProc callback function.
lpData
Pointer to the application-defined data.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT: To get extended error information, callGetLastError.
Remarks
The LineDDA function passes the coordinates for each point along the line, except for the line's ending point, to the application-defined callback function. In addition to passing the coordinates of a point, this function passes any existing application-defined data.
The coordinates passed to the callback function match pixels on a video display only if the default transformations and mapping modes are used.
QuickInfo
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
See Also
Lines and Curves Overview, Line and Curve Functions, LineDDAProc
uj5u.com熱心網友回復:
這是機器人的提問?相似的問題,連號的用戶id。
uj5u.com熱心網友回復:
樓主開發的這個插件功能是什么啊。想熟練做cdr插件開發必須很熟悉它的api檔案。另外可以讀一讀下人家插件的代碼。uj5u.com熱心網友回復:
機器人問題?機器人問得出這樣的問題的話,那你弄個機器人來表演一下!哈哈!其實程式我以前學過pascal兩年,后來覺得有用的資料太過少,往往一個問題就要自己就要自己琢磨好多時間,很難搜索到有用資料,并且此語言也不太流行,學好了也沒什么前途,就放棄了,現在只做一些網站(PHP)設計和廣告設計。
這問題也只是我在使用CorelDraw設計廣告的時候遇到的一問題,看一下有沒辦法使用按鈕來得到這個值,并非開發什么插件,因為我對CorelDraw VBA完全不懂,所以更談不上開發啦!
uj5u.com熱心網友回復:
我的意思是用自動程式將其他論壇的問題貼到這里來了。wmkandyk12373
wmkandyk12374
你提個問題就換個用戶?
uj5u.com熱心網友回復:
coreldraw vba,里有現在的函式就可以實作轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/108057.html
標籤:VBA
