翻譯|使用教程|編輯:李顯亮|2020-08-17 11:26:39.273|閱讀 493 次
概述:SVG文件是基于XML格式的文檔的二維矢量圖像。SVG格式不僅用于描述二維矢量圖形,而且還用于混合矢量光柵圖像。本文將為你講解如何從Delphi / C ++ Builder / Lazarus保存SVG圖像。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
報(bào)表生成器FastReport VCL是用于在軟件中集成商務(wù)智能的現(xiàn)代解決方案。它提供了可視化模板設(shè)計(jì)器,可以訪問最受歡迎的數(shù)據(jù)源,報(bào)告引擎,預(yù)覽,將過濾器導(dǎo)出為30多種格式,并可以部署到云,Web,電子郵件和打印中。
近日,F(xiàn)astReport VCL更新至v6.7,在新版本中,添加了對(duì)最新版本IDE的支持,簡化了用于付款標(biāo)準(zhǔn)的條形碼的創(chuàng)建,新增從預(yù)覽窗口直接編輯RichView的功能,同時(shí)修復(fù)了多個(gè)Bug問題。歡迎下載體驗(yàn)。(點(diǎn)擊下方按鈕下載)
SVG文件是基于XML格式的文檔的二維矢量圖像。SVG格式不僅用于描述二維矢量圖形,而且還用于混合矢量光柵圖像。span>
讓我們看看SVG格式有哪些優(yōu)點(diǎn):
SVG
讓我們看看SVG格式有哪些缺陷:
創(chuàng)建報(bào)告。在我們創(chuàng)建了所需的東西之后,啟動(dòng)它并查看。調(diào)用預(yù)覽并選擇我們需要的格式。
現(xiàn)在,我們看到一個(gè)具有許多不同設(shè)置的窗口。設(shè)置我們需要的一切,然后單擊“確定”!
procedure TForm1.Button1Click(Sender: TObject); begin {Generate a report. The report must be generated before exporting} frxReport1.PrepareReport(); {Set the range of pages to export. By default, all pages of the generated report are exported} frxSVGExport1.PageNumbers := '2-3'; {Set whether to export styles of the objects} frxSVGExport1.EmbeddedCSS := True; {Set whether to convert all images in accordance with PictureFormat:} {if the image in the report is in BMP format and the PictureFormat is PNG, then BMP will be saved in PNG format} frxSVGExport1.UnifiedPictures := True; {Set whether to format the source text of SVG (increases the size of the resulting file)} frxSVGExport1.Formatted := False; {Set whether to export pictures} frxSVGExport1.EmbeddedPictures := True; {Set whether to export each page to a separate SVG file} frxSVGExport1.Multipage := False; {Set whether to add navigation buttons to the resulting SVG file} frxSVGExport1.Navigation := False; {Set in which format to export pictures} //uses frxExportHelpers; // TfrxPictureFormat = (pfPNG, {$IFNDEF FPC}pfEMF,{$ENDIF} pfBMP, pfJPG);) frxSVGExport1.PictureFormat := pfPNG; {Set whether to open the resulting file after export} frxSVGExport1.OpenAfterExport := False; {Set whether to display export progress (show which page is currently being exported)} frxSVGExport1.ShowProgress := False; {Set whether to display the export filter dialog box} frxSVGExport1.ShowDialog := False; {Set the name of the resulting file.} {Please note that if you do not set the file name and disable the export filter dialog box,} {the file name selection dialog will still be displayed} frxSVGExport1.FileName := 'C:\Output\test.svg'; {Export the report} frxReport1.Export(frxSVGExport1); end;
讓我們比較一下導(dǎo)出柵格和矢量對(duì)象的結(jié)果!將在下面提供JPEG和SVG示例。
JPEG格式
SVG格式
還想要更多嗎?您可以點(diǎn)擊閱讀【FastReport 報(bào)表2020最新資源盤點(diǎn)】,查找需要的教程資源。如果您有任何疑問或需求,請(qǐng)隨時(shí)加入FastReport技術(shù)交流群(783996712),我們很高興為您提供查詢和咨詢。
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn