ÒÔÎı¾·½Ê½²é¿´Ö÷Ìâ

-  ÖÐÎÄXMLÂÛ̳ - רҵµÄXML¼¼ÊõÌÖÂÛÇø  (http://bbs.xml.org.cn/index.asp)
--  ¡º SVG/GML/VRML/X3D/XAML ¡»  (http://bbs.xml.org.cn/list.asp?boardid=21)
----  [ÍƼö]EvolGrafiX SVGCanvas 1.0  (http://bbs.xml.org.cn/dispbbs.asp?boardid=21&rootid=&id=14808)


--  ×÷ÕߣºSCYANGYU
--  ·¢²¼Ê±¼ä£º2/26/2005 12:16:00 PM

--  [ÍƼö]EvolGrafiX SVGCanvas 1.0
SVGCanvas 1.0

°´´ËÔÚд°¿Úä¯ÀÀͼƬ
SVGCanvas emulates a TCanvas.

Company (Author):  Alexander Adam  
Version [date of release]:  1.0 [2004-03-10]  
Size:  2000  
View Count(since 10 Feb 2004):  288  
Requirements:  Delphi 6,7  
Purchase Information:  Shareware €199  
Downloads:  78  
  Categories:  Delphi - Graphics - Other

SVGCanvas is a Delphi VCL Component fully written in ObjectPascal. SVGCanvas emulates a TCanvas (used by most drawing routines in Delphi) but outputs to a SVG-File instead to Screen. SVGCanvas makes it very easy to use existing graphics and outputting them to SVG by just changing a few lines.

http://www.devarchive.com/f1801.html

[´ËÌù×ÓÒѾ­±»×÷ÕßÓÚ2005-2-26 14:56:13±à¼­¹ý]

--  ×÷ÕߣºSCYANGYU
--  ·¢²¼Ê±¼ä£º2/26/2005 12:20:00 PM

--  
About SVGCanvas

SVGCanvas is a Delphi VCL Component fully written in ObjectPascal. SVGCanvas emulates a TCanvas (used by most drawing routines in Delphi) but outputs to a SVG-File instead to Screen. SVGCanvas makes it very easy to use existing graphics and outputting them to SVG by just changing a few lines.

Benefits


No Code Changes Required
SVGCanvas emulates the standard TCanvas and also provides a TCanvas, Windows-API compatible Handle
Embed Images
T he SVGCanvas converts all images into SVG-Compatible JPG Images and can embed them into the document if needed.
Easy to Use
The SVGCanvas contains only a few settings that are documented and includes a sample application
Print SVG
The SVGCanvas works like the Delphi Printers Unit
Convert
Make existing applications able to export to the Scalable Vector Graphics by adding only a few lines
Customizeable
Buy the SVGCanvas and you'll receive the full code to modify it for your needs

SVG Canvas Feature Matrix

TCanvas Emulation (Provides a HDC Handle)
Support of Text-Drawing Commands
Support of Ellipse
Support of Rect
Support of RoundRect
Support of Arc (AngleArc, Arc)
Support of Polyline, Polygon
Support of PolyBezier
Support of BeginPath, EndPath
Support of TextColor (Foreground)
Support of Background Color
Support of Images (external or embed)
Creates SVG 1.1 Files
Small Source File to include
Native compiled into your application
Comes with full source


--  ×÷ÕߣºSCYANGYU
--  ·¢²¼Ê±¼ä£º2/26/2005 12:24:00 PM

--  
SVG Canvas How To Use

You can use the TSVGCanvas in the exact same way like you do with the Printers Unit of Delphi.
First add SVGPrinter to your uses definition:
uses Windows, Graphics, ..., SVGPrinter;
Now you have access to the global SVGCanvas Object. To print something into the SVGCanvas you
must first setup an output filename:

SVGCanvas.Filename := 'c:\output.svg';
Then you call the BeginDoc() Routine to start the printing:

SVGCanvas.BeginDoc('400px', '50%', 'My Title');
The Parameters are the Following:

Parameter 1 - The Width of the Document, can be px, cm, pt or % or when left empty 100% is taken
Parameter 2 - The Height of the Document, can be px, cm, pt or % or when left empty 100% is taken
Parameter 3 - An additional Title that is shown in the Browser's Title
Now you can draw to the SVGCanvas.Canvas Property which provides a usual TCanvas Object.

SVGCanvas.Canvas.Pen.Color := clRed;
SVGCanvas.Canvas.Pen.Style := psDot;
SVGCanvas.Canvas.MoveTo(100, 100);
SVGCanvas.Canvas.LineTo(200, 100);
To finish the printing process call the EndDoc() Routine once:

SVGCanvas.EndDoc(True);
There's one parameter for this routine:

Parameter 1 - Set to true if you want to preview the document after it was written
To print for example the content of a TChart Object to SVG, use the following between the BeginDoc() and EndDoc():

Chart1.DrawToMetaCanvas(SVGCanvas.Canvas, Rect(0, 0, Chart1.Width, Chart1.Height));
Before printing you can setup the following properties of the SVGCanvas:

Filename -- Must be set. Specifies the output SVG-File.
Encoding -- The encoding used for the document. Default is "UTF-8".
DrawMode:
dwAntiAlias (default) - Antialiased shapes
dwCrisp - Crisped shapes (more detailed)
DPI -- Print Resolution
This is automatically set to the screen resolution so that your documents look the same like in your Delphi Application
Embedmages -- When true, all images are embed into the document otherwise they're saved as JPGs in the same folder
JPEGQuality -- A Value from 0..100 setting up the quality and the image file size (has also effects when EmbedImages is set to true)  


--  ×÷ÕߣºSCYANGYU
--  ·¢²¼Ê±¼ä£º2/26/2005 12:25:00 PM

--  
SVG Canvas System Requirements

SVG Canvas System Requirements


Tested with Borland Delphi Version 6,7.
Borland Delphi 6.0, 7.0
Comes with full source code




W 3 C h i n a ( since 2003 ) Æì Ï վ µã
ËÕICP±¸05006046ºÅ¡¶È«¹úÈË´ó³£Î¯»á¹ØÓÚά»¤»¥ÁªÍø°²È«µÄ¾ö¶¨¡·¡¶¼ÆËã»úÐÅÏ¢ÍøÂç¹ú¼ÊÁªÍø°²È«±£»¤¹ÜÀí°ì·¨¡·
46.875ms