SvgVectorOutput()

Syntax

Result = SvgVectorOutput(Filename$, Width.d, Height.d [, Unit])
Description
Creates an SVG (scalable vector graphics) file and returns the OutputID to perform vector drawing operations. The actual drawing operations must be enclosed in a StartVectorDrawing() / StopVectorDrawing() block. The SVG file can have multiple pages using the NewVectorPage() command.

Note: This function is only available on Linux.

Parameters

FileName$ Specifies the filename of the SVG file to create. If the file exists, it will be overwritten.
Width.d, Height.d Specifies the dimensions of a page in the SVG file in units of the vector drawing output.
Unit (optional) Specifies the units for the vector drawing output. The default unit for SVG files is #PB_Unit_Point.
  #PB_Unit_Pixel     : Values are measured in pixels (or dots in case of a printer)
  #PB_Unit_Point     : Values are measured in points (1/72 inch)
  #PB_Unit_Inch      : Values are measured in inches
  #PB_Unit_Millimeter: Values are measured in millimeters

Return value

The OutputID of the given file to perform 2D rendering operation on it using StartVectorDrawing().

Example

  If StartVectorDrawing(SvgVectorOutput("test.svg", 400, 200))

    AddPathBox(50, 50, 200, 50)
    AddPathBox(150, 75, 200, 50)
    VectorSourceColor(RGBA(255, 0, 0, 255))
    StrokePath(10)
  
    StopVectorDrawing()
  EndIf

See Also

PdfVectorOutput(), ImageVectorOutput(), PrinterVectorOutput(), WindowVectorOutput(), CanvasVectorOutput()

Supported OS

Linux

<- StrokePath() - VectorDrawing Index - TranslateCoordinates() ->