skeinforge_application.skeinforge_plugins.analyze_plugins.export_canvas_plugins.scalable_vector_graphics ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/analyze_plugins/export_canvas_plugins/scalable_vector_graphics.py

Previous / Next / Contents

`
Scalable vector graphics is an export canvas plugin to export the canvas to a scalable vector graphics (.svg) file.
When the export menu item in the file menu in an analyze viewer tool, like skeinlayer or skeiniso is clicked, the postscript dialog will be displayed. When the 'Export to Scalable Vector Graphics' button on that dialog is clicked, the canvas will be exported as a scalable vector graphics file. If the 'Scalable Vector Graphics Program' is set to the default 'webbrowser', the scalable vector graphics file will be sent to the default browser to be opened. If the 'Scalable Vector Graphics Program' is set to a program name, the scalable vector graphics file will be sent to that program to be opened.
If furthermore the 'File Extension' is set to a file extension, the scalable vector graphics file will be sent to the program, along with the file extension for the converted output. The default is blank because some systems do not have an image conversion program; if you have or will install an image conversion program, a common 'File Extension' is png. A good open source conversion program is Image Magick, which is available at:
http://www.imagemagick.org/script/index.php
An export canvas plugin is a script in the export_canvas_plugins folder which has the function getNewRepository, and which has a repository class with the functions setCanvasFileNameSuffix to set variables and execute to save the file. It is meant to be run from an analyze viewer tool, like skeinlayer or skeiniso. To ensure that the plugin works on platforms which do not handle file capitalization properly, give the plugin a lower case name.`

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.archive | cStringIO fabmetheus_utilities.gcodec | os fabmetheus_utilities.settings | sys

Classes
`` |  | ScalableVectorGraphicsRepository
class ScalableVectorGraphicsRepository
`` | `A class to handle the export settings.`
| Methods defined here: __init__(self) `Set the default settings, execute title & settings fileName.` addCanvasLineToOutput(self, canvasLinesOutput, objectIDNumber) `Add the canvas line to the output.` execute(self) `Export the canvas as an svg file.` getCanvasLinesOutput(self) `Add the canvas line to the output.` setCanvasFileNameSuffix(self, canvas, fileName, suffix) `Set the canvas and initialize the execute title.`

Functions
`` |  | getNewRepository() `Get the repository constructor.` main() `Display the file or directory dialog.` parseLineReplace(firstWordTable, line, output) `Parse the line and replace it if the first word of the line is in the first word table.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __date__ = '$Date: 2008/21/04 $' __license__ = 'GPL 3.0' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)