API documentation for visualization library

Michael Galloy

single page | use frames     summary     class     fields     routine details     file attributes

objectgraphics/

visgrsvg__define.pro

includes main-level program

Object graphics destination for producing Scalable Vector Graphics (SVG) files.

Because SVG is inherently 2-dimensional, it only supports 2-dimensional object graphics hierarchies. Only objects of the following classes are supported:

IDLgrScene svg element IDLgrViewGroup svg element IDLgrView svg element IDLgrModel g element IDLgrText (and IDLgrFont) text element IDLgrPolygon (and IDLgrPattern) path element (TODO: handle patterns) IDLgrPolyline (and IDLgrSymbol) path element (TODO: handle symbols) IDLgrPlot path element IDLgrAxis IDLgrImage image element

Examples

Run the main-level program at the end of this file to see an example:

IDL> .run visgrsvg__define
This should produce the following:

Class description for visgrsvg

Properties

pc set
mm set
em set
_extra init
pt set
ex set
px set
text_multipler get
cm set
filename get set

filename of file to write to

dimensions get set

dimensions of the drawing canvas in units specified by the EM, EX, PX, PT, PC, CM, MM, INCHES, PERCENTAGE property at the same time as the DIMENSIONS property is set; if no dimensions are specified, the canvas is scaled to fill the available area

graphics_tree get set

default picture to draw

percentage set
dimension_units get
inches set

Routines

result = visgrsvg::_getRgb(color)

Return a valid SVG specification for a color.

result = visgrsvg::_getVpr(tree, dimensions=dimensions, dimension_units=dimension_units)

Returns the VIEWPLANE_RECT for the view that contains the item.

result = visgrsvg::_convertUnits(x, xUnits, outUnits)
result = visgrsvg::_transformCoords(data, tree=tree)
visgrsvg::_handleScene, scene, lun=long, indent=string

Handle IDLgrScene objects.

visgrsvg::_handleViewgroup, viewgroup, lun=long, indent=string

Handle IDLgrViewGroup objects.

visgrsvg::_handleView, view, lun=long, indent=string

Handle IDLgrView objects.

visgrsvg::_handleModel, model, lun=long, indent=string

Handle IDLgrModel objects.

visgrsvg::_handlePolyline, polyline, lun=long, indent=string

Handle IDLgrPolyline objects.

visgrsvg::_handlePolygon, polygon, lun=long, indent=string

Handle IDLgrPolygon objects.

visgrsvg::_handleText, text, lun=long, indent=string

Handle IDLgrText objects.

visgrsvg::_handleImage, image, lun=long, indent=string

Handle IDLgrImage objects.

visgrsvg::_handlePlot, plot, lun=long, indent=string

Handle IDLgrPlot objects.

visgrsvg::_handleAxis, axis, lun=long, indent=string

Handle IDLgrAxis objects.

visgrsvg::_traverse, tree, lun=long, indent=string

Routine which is recursively called to traverse the object graphics hierarchy.

visgrsvg::draw [, tree]

Write the object graphics rooted at the specified scene or view.

visgrsvg::setProperty, filename=filename, graphics_tree=graphics_tree, dimensions=dimensions, em=em, ex=ex, px=px, pt=pt, pc=pc, cm=cm, mm=mm, inches=inches, percentage=percentage

Set properties.

visgrsvg::getProperty, filename=filename, graphics_tree=graphics_tree, text_multipler=text_multipler, dimensions=dimensions, dimension_units=dimension_units

Get properties.

visgrsvg::cleanup

Free resources.

result = visgrsvg::init( [_extra=keywords])

Create an SVG destination.

visgrsvg__define

Define instance variables.

Routine details

top visgrsvg::_getRgb

result = visgrsvg::_getRgb(color)

Return a valid SVG specification for a color.

Return value

string

Parameters

color in required type=bytarr(3)

color to convert

top visgrsvg::_getVpr

result = visgrsvg::_getVpr(tree, dimensions=dimensions, dimension_units=dimension_units)

Returns the VIEWPLANE_RECT for the view that contains the item.

Return value

fltarr(4) or -1L

Parameters

tree in required type=object

object in the object graphics hierarchy

Keywords

dimensions
dimension_units

top visgrsvg::_convertUnits

result = visgrsvg::_convertUnits(x, xUnits, outUnits)

Parameters

x
xUnits
outUnits

top visgrsvg::_transformCoords

result = visgrsvg::_transformCoords(data, tree=tree)

Parameters

data

Keywords

tree

top visgrsvg::_handleScene

visgrsvg::_handleScene, scene, lun=long, indent=string

Handle IDLgrScene objects.

Parameters

scene in required type=object

IDLgrScene object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleViewgroup

visgrsvg::_handleViewgroup, viewgroup, lun=long, indent=string

Handle IDLgrViewGroup objects.

Parameters

viewgroup in required type=object

IDLgrViewGroup object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleView

visgrsvg::_handleView, view, lun=long, indent=string

Handle IDLgrView objects.

Parameters

view in required type=object

IDLgrView object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleModel

visgrsvg::_handleModel, model, lun=long, indent=string

Handle IDLgrModel objects.

Parameters

model in required type=object

IDLgrModel object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handlePolyline

visgrsvg::_handlePolyline, polyline, lun=long, indent=string

Handle IDLgrPolyline objects.

Parameters

polyline in required type=object

IDLgrPolyline object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handlePolygon

visgrsvg::_handlePolygon, polygon, lun=long, indent=string

Handle IDLgrPolygon objects.

Parameters

polygon in required type=object

IDLgrPolygon object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleText

visgrsvg::_handleText, text, lun=long, indent=string

Handle IDLgrText objects.

Parameters

text in required type=object

IDLgrText object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleImage

visgrsvg::_handleImage, image, lun=long, indent=string

Handle IDLgrImage objects.

Parameters

image in required type=object

IDLgrImage object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handlePlot

visgrsvg::_handlePlot, plot, lun=long, indent=string

Handle IDLgrPlot objects.

Parameters

plot in required type=object

IDLgrPlot object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_handleAxis

visgrsvg::_handleAxis, axis, lun=long, indent=string

Handle IDLgrAxis objects.

Parameters

axis in required type=object

IDLgrAxis object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::_traverse

visgrsvg::_traverse, tree, lun=long, indent=string

Routine which is recursively called to traverse the object graphics hierarchy.

Parameters

tree in required type=object

object graphics element

Keywords

lun in required type=long

logical unit number of file to write output to

indent in required type=string

string to prefix each line of output by

top visgrsvg::draw

visgrsvg::draw [, tree]

Write the object graphics rooted at the specified scene or view.

Parameters

tree in optional type=object

scene or view object

top visgrsvg::setProperty

visgrsvg::setProperty, filename=filename, graphics_tree=graphics_tree, dimensions=dimensions, em=em, ex=ex, px=px, pt=pt, pc=pc, cm=cm, mm=mm, inches=inches, percentage=percentage

Set properties.

Keywords

filename

filename of file to write to

graphics_tree

default picture to draw

dimensions

dimensions of the drawing canvas in units specified by the EM, EX, PX, PT, PC, CM, MM, INCHES, PERCENTAGE property at the same time as the DIMENSIONS property is set; if no dimensions are specified, the canvas is scaled to fill the available area

em
ex
px
pt
pc
cm
mm
inches
percentage

top visgrsvg::getProperty

visgrsvg::getProperty, filename=filename, graphics_tree=graphics_tree, text_multipler=text_multipler, dimensions=dimensions, dimension_units=dimension_units

Get properties.

Keywords

filename

filename of file to write to

graphics_tree

default picture to draw

text_multipler
dimensions

dimensions of the drawing canvas in units specified by the EM, EX, PX, PT, PC, CM, MM, INCHES, PERCENTAGE property at the same time as the DIMENSIONS property is set; if no dimensions are specified, the canvas is scaled to fill the available area

dimension_units

top visgrsvg::cleanup

visgrsvg::cleanup

Free resources.

top visgrsvg::init

result = visgrsvg::init( [_extra=keywords])

Create an SVG destination.

Return value

1 if successful, 0 if fails

Keywords

_extra in optional type=keywords

any properties of the class

top visgrsvg__define

visgrsvg__define

Define instance variables.

File attributes

Modification date: Mon Nov 29 18:32:37 2010
Lines: 681
Docformat: rst rst