Graphics Reference
In-Depth Information
Just like HTML, XML uses tags to specify the meaning of data. he grammar as-
sociated with XML tagscan easily enable computational processing whilesimultane-
ously expressing various types of data flexibly, enabling the data type to be set freely.
Oneof the advantages ofSVG andX DbeingXML-based isthat documents writ-
ten in these languages are easily interconverted using XSL Transformations (XSLT).
XSLT is a language to convert XML document into other format, and itself is de-
scribed byXML. Suppose that a user wants to get a scatter plot by SVG format when
the data is given by XML format such as StatDataML. An XSLT that is possible to
convert can be applied to any data of StatDataML format. he other advantage in-
cludes that an interactive function can be realized by scripting source code of the
programming language which supports Document Object Model (DOM), such as
JavaScript,intheXMLdocument.DOMdefinesApplication ProgrammingInterface
(API)whichspecifies the manipulating methods forXML elements and attributes by
programming language and the tree-structured object model referenced by the in-
terface. Some examples will be shown in a later section.
XML Files as Text Files
WhileconventionalrastergraphicssuchasJPEG,GIF,PNGandBMParebinaryfiles,
XML graphics are text files. hus, we can confirm or modify the content of an XML
filebyopeningitasimpletexteditor.herefore,itiseasytoreusethecontentsofan
XML file. his also allows us to develop systems more flexibly, because graphics can
be output simply by displaying a text file, no matter what kind of programming lan-
guage isused. Moreover, ifthe graphics (e.g.,astatistical graph, a mapor aCAD) are
closely related to the outside resource, we include the related information between
the element of the graphics and the outside resource within the graphics themselves.
Forexample, a circleelement whichrepresents the point on ascatter plotcan include
not only its coordinates on the SVG canvas but also its data value and data label.
In the case of GIS, graphic elements of SVG which represent geographical objects
can include its latitude and longitude. On the other hand, raster graphics use binary
images, so it is di cult to link outside resources and images because we have no in-
formation about figure elements. Moreover, in order to generate raster graphics, we
need a library corresponding to the particular programming language we are using,
and for different programming languages, the graphics must be output by different
grammars.
Vector Graphics
herearetwomethodsofdisplayinggraphicsbyacomputer:rastergraphicsandvec-
tor graphics. Raster graphics, which are expressed as enumerations of points (pixels)
and colors (of the pixels), do not reproduce all of the information contained in the
original image. In raster graphics, outlines appear jagged (notches appear) when the
image is examined closely, and information is lost when we move away from the im-
age. herefore, raster graphics are not suitable for zooming or transformation. On
the other hand, vector graphics contain drawing information, such as position, size
and shape. herefore, image quality deterioration can be prevented by using this in-
Search WWH ::




Custom Search