Package com.luciad.format.svg
Class TLcdSVGUnStyledShapeWriter
java.lang.Object
com.luciad.format.svg.ALcdSVGShapeWriter
com.luciad.format.svg.TLcdSVGUnStyledShapeWriter
- All Implemented Interfaces:
ILcdSVGShapeWriter
This class is an implementation of
ILcdSVGShapeWriter
to write a ILcdShape
down without extra properties like color, line-width, etc...
This class can be set to the TLcdSVGModelEncoder
TLcdSVGModelEncoder
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
createTextStyleAttribute
(ILcdText aText) Creates the style attribute for a text element from aILcd2DEditableText
.protected String
Creates a rotation attribute.static boolean
Deprecated.This method has been deprecated.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.protected void
writeArcBand
(ILcdArcBand aArcBand, Writer aTarget) Appends anILcdArcBand
to aStringBuffer
.protected void
writeArcBandProperties
(ILcdArcBand aArcBand, Writer aTarget) Writes the properties specific to an arcband: center (x,y) minimum radius maximum radius start angle end angle .protected void
writeBounds
(ILcdBounds aBounds, Writer aTarget) Appends anILcdBounds
to aStringBuffer
.protected void
writeBoundsProperties
(ILcdBounds aBounds, Writer aTarget) Writes properties specific to a bounds (rectangle) object: the coordinates of the bottom left point (x,y) the width the height .protected void
writeCircle
(ILcdCircle aCircle, Writer aTarget) Appends anILcdCircle
to aStringBuffer
.protected void
writeCircleProperties
(ILcdCircle aCircle, Writer aTarget) Writes properties specific to a circle object: the position of the center point (x,y) the radius .protected void
writeEllipse
(ILcdEllipse aEllipse, Writer aTarget) Appends anILcdEllipse
to aStringBuffer
.protected void
writeEllipseProperties
(ILcdEllipse aEllipse, Writer aTarget) Writes properties specific to an ellipse: center (x,y) short axis long axis .protected void
writePoint
(ILcdPoint aPoint, Writer aTarget) Appends anILcdPoint
to aStringBuffer
.protected void
writePointProperties
(ILcdPoint aPoint, Writer aTarget) Writes properties specific to a point object: the position (x,y) .protected void
writePolygon
(ILcdPolygon aPolygon, Writer aTarget) Appends anILcdPolygon
to aStringBuffer
.protected void
writePolygonProperties
(ILcdPolygon aPolygon, Writer aTarget) Writes properties specific to a polygon object: the position of the points (x,y): x1,y1,x2,y2,x3,y3, .protected void
writePolyline
(ILcdPolyline aPolyline, Writer aTarget) Appends anILcdPolyline
to aStringBuffer
.protected void
writePolylineProperties
(ILcdPolyline aPolyline, Writer aTarget) Writes properties specific to a polyline object: the position of the points (x,y): x1,y1,x2,y2,x3,y3, .protected void
writeShapeList
(ILcdShapeList aShapeList, Writer aTarget) Appends anILcdShapeList
to aStringBuffer
.protected void
Appends anILcdText
to aStringBuffer
.protected void
writeTextProperties
(ILcdText aText, Writer aTarget) Writes properties specific to a text object: the position of the text (x,y) the angle of the text .protected void
writeUnknownShape
(ILcdShape aShape, Writer aTarget) This implementation does nothing.Methods inherited from class com.luciad.format.svg.ALcdSVGShapeWriter
isTrueSVG, setTrueSVG, writeElement, writeProperty, writeProperty, writeProperty
-
Constructor Details
-
TLcdSVGUnStyledShapeWriter
public TLcdSVGUnStyledShapeWriter()
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
isClassTraceOn
public static boolean isClassTraceOn()Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Returnstrue
if tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
writeCircle
Description copied from class:ALcdSVGShapeWriter
Appends anILcdCircle
to aStringBuffer
.- Specified by:
writeCircle
in classALcdSVGShapeWriter
- Parameters:
aCircle
- theILcdCircle
element
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writeCircleProperties
Writes properties specific to a circle object:- the position of the center point (x,y)
- the radius
- Parameters:
aCircle
- the circle to write the properties of.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writePolyline
Description copied from class:ALcdSVGShapeWriter
Appends anILcdPolyline
to aStringBuffer
.- Specified by:
writePolyline
in classALcdSVGShapeWriter
- Parameters:
aPolyline
- theILcdPolyline
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writePolylineProperties
Writes properties specific to a polyline object:- the position of the points (x,y): x1,y1,x2,y2,x3,y3,
- Parameters:
aPolyline
- the polygon for which to write the properties.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writePolygon
Description copied from class:ALcdSVGShapeWriter
Appends anILcdPolygon
to aStringBuffer
.- Specified by:
writePolygon
in classALcdSVGShapeWriter
- Parameters:
aPolygon
- theILcdPolygon
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writePolygonProperties
Writes properties specific to a polygon object:- the position of the points (x,y): x1,y1,x2,y2,x3,y3,
- Parameters:
aPolygon
- the polygon for which to write the properties.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writeBounds
Description copied from class:ALcdSVGShapeWriter
Appends anILcdBounds
to aStringBuffer
.- Specified by:
writeBounds
in classALcdSVGShapeWriter
- Parameters:
aBounds
- theILcdBounds
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writeUnknownShape
This implementation does nothing. Override this method to export unknown shapes to the writer.- Specified by:
writeUnknownShape
in classALcdSVGShapeWriter
- Parameters:
aShape
- a shape that is not part of the set of exported shapes (seeALcdSVGShapeWriter.writeElement(java.lang.Object, java.io.Writer)
.aTarget
- the writer to write to.- Throws:
IOException
- when an I/O error occurred writing this shape. Never in this implementation.
-
writeBoundsProperties
Writes properties specific to a bounds (rectangle) object:- the coordinates of the bottom left point (x,y)
- the width
- the height
- Parameters:
aBounds
- the bounds to write the properties of.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writeText
Description copied from class:ALcdSVGShapeWriter
Appends anILcdText
to aStringBuffer
.- Specified by:
writeText
in classALcdSVGShapeWriter
- Parameters:
aText
- theILcdText
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writeTextProperties
Writes properties specific to a text object:- the position of the text (x,y)
- the angle of the text
- Parameters:
aText
- the text to write the properties of.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writeShapeList
Description copied from class:ALcdSVGShapeWriter
Appends anILcdShapeList
to aStringBuffer
.- Specified by:
writeShapeList
in classALcdSVGShapeWriter
- Parameters:
aShapeList
- theILcdShapeList
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writePoint
Description copied from class:ALcdSVGShapeWriter
Appends anILcdPoint
to aStringBuffer
. Warning: not a true svg tag shape !- Specified by:
writePoint
in classALcdSVGShapeWriter
- Parameters:
aPoint
- theILcdPoint
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writePointProperties
Writes properties specific to a point object:- the position (x,y)
- Parameters:
aPoint
- the point for which the properties are to be written.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writeArcBand
Description copied from class:ALcdSVGShapeWriter
Appends anILcdArcBand
to aStringBuffer
. Warning: not a true svg tag shape !- Specified by:
writeArcBand
in classALcdSVGShapeWriter
- Parameters:
aArcBand
- theILcdArcBand
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writeArcBandProperties
Writes the properties specific to an arcband:- center (x,y)
- minimum radius
- maximum radius
- start angle
- end angle
- Parameters:
aArcBand
- the arcband whose properties to write.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
writeEllipse
Description copied from class:ALcdSVGShapeWriter
Appends anILcdEllipse
to aStringBuffer
. Warning: not a true svg tag shape !- Specified by:
writeEllipse
in classALcdSVGShapeWriter
- Parameters:
aEllipse
- theILcdEllipse
aTarget
- theStringBuffer
- Throws:
IOException
- when output to aTarget fails.
-
writeEllipseProperties
Writes properties specific to an ellipse:- center (x,y)
- short axis
- long axis
- Parameters:
aEllipse
- the Ellipse to write the properties of.aTarget
- the output sink.- Throws:
IOException
- when the output fails.
-
createTextStyleAttribute
Creates the style attribute for a text element from aILcd2DEditableText
. Properties encoded are:- horizontal alignment.
- vertical alignment.
- character width
- character height
- Parameters:
aText
-ILcd2DEditableText
to create the styleString
for.- Returns:
- a String representation of the text style.
-
createTextTransformAttribute
Creates a rotation attribute.- Parameters:
aText
-ILcd2DEditableText
to read the rotation angle from.- Returns:
- a String representing the rotation attribute.
-