Package org.apache.batik.parser
Interface PathHandler
-
- All Known Implementing Classes:
AbstractSVGNormPathSegList.NormalizedPathSegListBuilder,AbstractSVGPathSegList.PathSegListBuilder,AWTPathProducer,DefaultPathHandler,PathArrayProducer
public interface PathHandlerThis interface must be implemented and then registred as the handler of aPathParserinstance in order to be notified of parsing events.- Version:
- $Id: PathHandler.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidarcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)Invoked when an absolute elliptical arc command has been parsed.voidarcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)Invoked when a relative elliptical arc command has been parsed.voidclosePath()Invoked when a closepath has been parsed.voidcurvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y)Invoked when an absolute cubic bezier curve command has been parsed.voidcurvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)Invoked when a relative cubic bezier curve command has been parsed.voidcurvetoCubicSmoothAbs(float x2, float y2, float x, float y)Invoked when an absolute smooth cubic bezier curve command has been parsed.voidcurvetoCubicSmoothRel(float x2, float y2, float x, float y)Invoked when a relative smooth cubic bezier curve command has been parsed.voidcurvetoQuadraticAbs(float x1, float y1, float x, float y)Invoked when an absolute quadratic bezier curve command has been parsed.voidcurvetoQuadraticRel(float x1, float y1, float x, float y)Invoked when a relative quadratic bezier curve command has been parsed.voidcurvetoQuadraticSmoothAbs(float x, float y)Invoked when an absolute smooth quadratic bezier curve command has been parsed.voidcurvetoQuadraticSmoothRel(float x, float y)Invoked when a relative smooth quadratic bezier curve command has been parsed.voidendPath()Invoked when the path ends.voidlinetoAbs(float x, float y)Invoked when an absolute line command has been parsed.voidlinetoHorizontalAbs(float x)Invoked when an horizontal absolute line command has been parsed.voidlinetoHorizontalRel(float x)Invoked when an horizontal relative line command has been parsed.voidlinetoRel(float x, float y)Invoked when a relative line command has been parsed.voidlinetoVerticalAbs(float y)Invoked when a vertical absolute line command has been parsed.voidlinetoVerticalRel(float y)Invoked when a vertical relative line command has been parsed.voidmovetoAbs(float x, float y)Invoked when an absolute moveto command has been parsed.voidmovetoRel(float x, float y)Invoked when a relative moveto command has been parsed.voidstartPath()Invoked when the path starts.
-
-
-
Method Detail
-
startPath
void startPath() throws ParseExceptionInvoked when the path starts.- Throws:
ParseException- if an error occured while processing the path
-
endPath
void endPath() throws ParseExceptionInvoked when the path ends.- Throws:
ParseException- if an error occured while processing the path
-
movetoRel
void movetoRel(float x, float y) throws ParseExceptionInvoked when a relative moveto command has been parsed.Command : m
- Parameters:
x- the relative x coordinate for the end pointy- the relative y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
movetoAbs
void movetoAbs(float x, float y) throws ParseExceptionInvoked when an absolute moveto command has been parsed.Command : M
- Parameters:
x- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
closePath
void closePath() throws ParseExceptionInvoked when a closepath has been parsed.Command : z | Z
- Throws:
ParseException- if an error occured while processing the path
-
linetoRel
void linetoRel(float x, float y) throws ParseExceptionInvoked when a relative line command has been parsed.Command : l
- Parameters:
x- the relative x coordinates for the end pointy- the relative y coordinates for the end point- Throws:
ParseException- if an error occured while processing the path
-
linetoAbs
void linetoAbs(float x, float y) throws ParseExceptionInvoked when an absolute line command has been parsed.Command : L
- Parameters:
x- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
linetoHorizontalRel
void linetoHorizontalRel(float x) throws ParseExceptionInvoked when an horizontal relative line command has been parsed.Command : h
- Parameters:
x- the relative X coordinate of the end point- Throws:
ParseException- if an error occured while processing the path
-
linetoHorizontalAbs
void linetoHorizontalAbs(float x) throws ParseExceptionInvoked when an horizontal absolute line command has been parsed.Command : H
- Parameters:
x- the absolute X coordinate of the end point- Throws:
ParseException- if an error occured while processing the path
-
linetoVerticalRel
void linetoVerticalRel(float y) throws ParseExceptionInvoked when a vertical relative line command has been parsed.Command : v
- Parameters:
y- the relative Y coordinate of the end point- Throws:
ParseException- if an error occured while processing the path
-
linetoVerticalAbs
void linetoVerticalAbs(float y) throws ParseExceptionInvoked when a vertical absolute line command has been parsed.Command : V
- Parameters:
y- the absolute Y coordinate of the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoCubicRel
void curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y) throws ParseExceptionInvoked when a relative cubic bezier curve command has been parsed.Command : c
- Parameters:
x1- the relative x coordinate for the first control pointy1- the relative y coordinate for the first control pointx2- the relative x coordinate for the second control pointy2- the relative y coordinate for the second control pointx- the relative x coordinate for the end pointy- the relative y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoCubicAbs
void curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y) throws ParseExceptionInvoked when an absolute cubic bezier curve command has been parsed.Command : C
- Parameters:
x1- the absolute x coordinate for the first control pointy1- the absolute y coordinate for the first control pointx2- the absolute x coordinate for the second control pointy2- the absolute y coordinate for the second control pointx- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoCubicSmoothRel
void curvetoCubicSmoothRel(float x2, float y2, float x, float y) throws ParseExceptionInvoked when a relative smooth cubic bezier curve command has been parsed. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point.Command : s
- Parameters:
x2- the relative x coordinate for the second control pointy2- the relative y coordinate for the second control pointx- the relative x coordinate for the end pointy- the relative y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoCubicSmoothAbs
void curvetoCubicSmoothAbs(float x2, float y2, float x, float y) throws ParseExceptionInvoked when an absolute smooth cubic bezier curve command has been parsed. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point.Command : S
- Parameters:
x2- the absolute x coordinate for the second control pointy2- the absolute y coordinate for the second control pointx- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoQuadraticRel
void curvetoQuadraticRel(float x1, float y1, float x, float y) throws ParseExceptionInvoked when a relative quadratic bezier curve command has been parsed.Command : q
- Parameters:
x1- the relative x coordinate for the control pointy1- the relative y coordinate for the control pointx- the relative x coordinate for the end pointy- the relative x coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoQuadraticAbs
void curvetoQuadraticAbs(float x1, float y1, float x, float y) throws ParseExceptionInvoked when an absolute quadratic bezier curve command has been parsed.Command : Q
- Parameters:
x1- the absolute x coordinate for the control pointy1- the absolute y coordinate for the control pointx- the absolute x coordinate for the end pointy- the absolute x coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoQuadraticSmoothRel
void curvetoQuadraticSmoothRel(float x, float y) throws ParseExceptionInvoked when a relative smooth quadratic bezier curve command has been parsed. The control point is assumed to be the reflection of the control point on the previous command relative to the current point.Command : t
- Parameters:
x- the relative x coordinate for the end pointy- the relative y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
curvetoQuadraticSmoothAbs
void curvetoQuadraticSmoothAbs(float x, float y) throws ParseExceptionInvoked when an absolute smooth quadratic bezier curve command has been parsed. The control point is assumed to be the reflection of the control point on the previous command relative to the current point.Command : T
- Parameters:
x- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
arcRel
void arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseExceptionInvoked when a relative elliptical arc command has been parsed.Command : a
- Parameters:
rx- the X axis radius for the ellipsery- the Y axis radius for the ellipsexAxisRotation- the rotation angle in degrees for the ellipse's X-axis relative to the X-axislargeArcFlag- the value of the large-arc-flagsweepFlag- the value of the sweep-flagx- the relative x coordinate for the end pointy- the relative y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
arcAbs
void arcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y) throws ParseExceptionInvoked when an absolute elliptical arc command has been parsed.Command : A
- Parameters:
rx- the X axis radius for the ellipsery- the Y axis radius for the ellipsexAxisRotation- the rotation angle in degrees for the ellipse's X-axis relative to the X-axislargeArcFlag- the value of the large-arc-flagsweepFlag- the value of the sweep-flagx- the absolute x coordinate for the end pointy- the absolute y coordinate for the end point- Throws:
ParseException- if an error occured while processing the path
-
-