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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateTextStyleAttribute(ILcdText aText) Creates the style attribute for a text element from aILcd2DEditableText.protected StringCreates a rotation attribute.static booleanDeprecated.This method has been deprecated.static voidsetClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated.protected voidwriteArcBand(ILcdArcBand aArcBand, Writer aTarget) Appends anILcdArcBandto aStringBuffer.protected voidwriteArcBandProperties(ILcdArcBand aArcBand, Writer aTarget) Writes the properties specific to an arcband: center (x,y) minimum radius maximum radius start angle end angle .protected voidwriteBounds(ILcdBounds aBounds, Writer aTarget) Appends anILcdBoundsto aStringBuffer.protected voidwriteBoundsProperties(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 voidwriteCircle(ILcdCircle aCircle, Writer aTarget) Appends anILcdCircleto aStringBuffer.protected voidwriteCircleProperties(ILcdCircle aCircle, Writer aTarget) Writes properties specific to a circle object: the position of the center point (x,y) the radius .protected voidwriteEllipse(ILcdEllipse aEllipse, Writer aTarget) Appends anILcdEllipseto aStringBuffer.protected voidwriteEllipseProperties(ILcdEllipse aEllipse, Writer aTarget) Writes properties specific to an ellipse: center (x,y) short axis long axis .protected voidwritePoint(ILcdPoint aPoint, Writer aTarget) Appends anILcdPointto aStringBuffer.protected voidwritePointProperties(ILcdPoint aPoint, Writer aTarget) Writes properties specific to a point object: the position (x,y) .protected voidwritePolygon(ILcdPolygon aPolygon, Writer aTarget) Appends anILcdPolygonto aStringBuffer.protected voidwritePolygonProperties(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 voidwritePolyline(ILcdPolyline aPolyline, Writer aTarget) Appends anILcdPolylineto aStringBuffer.protected voidwritePolylineProperties(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 voidwriteShapeList(ILcdShapeList aShapeList, Writer aTarget) Appends anILcdShapeListto aStringBuffer.protected voidAppends anILcdTextto aStringBuffer.protected voidwriteTextProperties(ILcdText aText, Writer aTarget) Writes properties specific to a text object: the position of the text (x,y) the angle of the text .protected voidwriteUnknownShape(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 istruethen 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.Returnstrueif tracing is enabled for this class.- Returns:
- true if tracing is enabled for this class, false otherwise.
-
writeCircle
Description copied from class:ALcdSVGShapeWriterAppends anILcdCircleto aStringBuffer.- Specified by:
writeCirclein classALcdSVGShapeWriter- Parameters:
aCircle- theILcdCircleelementaTarget- 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:ALcdSVGShapeWriterAppends anILcdPolylineto aStringBuffer.- Specified by:
writePolylinein classALcdSVGShapeWriter- Parameters:
aPolyline- theILcdPolylineaTarget- 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:ALcdSVGShapeWriterAppends anILcdPolygonto aStringBuffer.- Specified by:
writePolygonin classALcdSVGShapeWriter- Parameters:
aPolygon- theILcdPolygonaTarget- 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:ALcdSVGShapeWriterAppends anILcdBoundsto aStringBuffer.- Specified by:
writeBoundsin classALcdSVGShapeWriter- Parameters:
aBounds- theILcdBoundsaTarget- 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:
writeUnknownShapein 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:ALcdSVGShapeWriterAppends anILcdTextto aStringBuffer.- Specified by:
writeTextin classALcdSVGShapeWriter- Parameters:
aText- theILcdTextaTarget- 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:ALcdSVGShapeWriterAppends anILcdShapeListto aStringBuffer.- Specified by:
writeShapeListin classALcdSVGShapeWriter- Parameters:
aShapeList- theILcdShapeListaTarget- theStringBuffer- Throws:
IOException- when output to aTarget fails.
-
writePoint
Description copied from class:ALcdSVGShapeWriterAppends anILcdPointto aStringBuffer. Warning: not a true svg tag shape !- Specified by:
writePointin classALcdSVGShapeWriter- Parameters:
aPoint- theILcdPointaTarget- 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:ALcdSVGShapeWriterAppends anILcdArcBandto aStringBuffer. Warning: not a true svg tag shape !- Specified by:
writeArcBandin classALcdSVGShapeWriter- Parameters:
aArcBand- theILcdArcBandaTarget- 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:ALcdSVGShapeWriterAppends anILcdEllipseto aStringBuffer. Warning: not a true svg tag shape !- Specified by:
writeEllipsein classALcdSVGShapeWriter- Parameters:
aEllipse- theILcdEllipseaTarget- 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-ILcd2DEditableTextto create the styleStringfor.- Returns:
- a String representation of the text style.
-
createTextTransformAttribute
Creates a rotation attribute.- Parameters:
aText-ILcd2DEditableTextto read the rotation angle from.- Returns:
- a String representing the rotation attribute.
-