簡體   English   中英

如何添加無邊框的Rect?

[英]How can I add a Rect without a border?

是否可以創建帶有黑色字體,沒有邊框或至少具有白色邊框的Rect文本區域?

另外,是否可以添加圖像而不使其縮放以適合Rect?

制作白色邊框

PDFDoc.Color.String = "255 255 255"
PDFDoc.Rect.Left = 100
...

根據他們的文檔,“線條顏色由當前顏色確定”

用黑色字體創建矩形文本區域:

Dim PDFDoc As WebSupergoo.ABCpdf8.Doc

'Dimensions
PDFDoc.Rect.Left =100
PDFDoc.Rect.Bottom = 100
PDFDoc.Rect.Width = 100 
PDFDoc.Rect.Height = 100
PDFDoc.Color.String = "0, 0, 0" 'black font

PDFDoc.AddText(text)

不過要小心。 如果文本大於矩形,則不會出現。

默認情況下將沒有邊框。 如果您需要一個,請使用:

PDFDoc.FrameRect()

要添加圖像:

Dim bm As Bitmap

bm = New Bitmap(filename)
'Dimensions
PDFDoc.Rect.Left = 100
PDFDoc.Rect.Bottom = 100 'N.B Measures from bottom, not top     
PDFDoc.Rect.Width = 100
PDFDoc.Rect.Height = 100

PDFDoc.FillRect()
PDFDoc.AddImageBitmap(bm, True)

但是,我認為不可能使其不適合Rect。 據我了解,無論如何,這就是Rect的意義所在。

另外,我建議您看看websupergoo的文檔 這是相當不錯。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM