aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/AFPBorderPainter.java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-20 16:38:44 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-20 16:38:44 +0000
commit8a08b69ee6049677c1578a9c0791140caf6a1d6a (patch)
treedd944704ebf88860345226a0e1ff7c82cf774cae /src/java/org/apache/fop/afp/AFPBorderPainter.java
parent13992fd89fac85aa890b253468a405c3609c322c (diff)
downloadxmlgraphics-fop-8a08b69ee6049677c1578a9c0791140caf6a1d6a.tar.gz
xmlgraphics-fop-8a08b69ee6049677c1578a9c0791140caf6a1d6a.zip
SetCurrentPosition fix for line drawing.
AbstractPaintingState push(), pushAll(), pop(), popAll() renamed to save(), saveAll() and restore(), restoreAll(). Some Javadoc improvements/updates. Added Completable, Startable object writing interfaces. StructuredDataObject interface renamed to StructuredData. High level DataStream class moved from afp.modca to afp package. Graphics*Relative objects removed and feature provided by absolute implementation. GraphicsArea broken into GraphicsAreaBegin and GraphicsAreaEnd since areas are able to span more than one segment. Improvement in SetLineWidth thickness precision. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@719274 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp/AFPBorderPainter.java')
-rw-r--r--src/java/org/apache/fop/afp/AFPBorderPainter.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/afp/AFPBorderPainter.java b/src/java/org/apache/fop/afp/AFPBorderPainter.java
index 86960b7ff..4c56c0def 100644
--- a/src/java/org/apache/fop/afp/AFPBorderPainter.java
+++ b/src/java/org/apache/fop/afp/AFPBorderPainter.java
@@ -21,7 +21,6 @@ package org.apache.fop.afp;
import java.awt.geom.AffineTransform;
-import org.apache.fop.afp.modca.DataStream;
import org.apache.fop.fo.Constants;
import org.apache.fop.util.ColorUtil;
@@ -33,16 +32,16 @@ public class AFPBorderPainter extends AbstractAFPPainter {
/**
* Main constructor
*
- * @param state the AFP painting state converter
+ * @param paintingState the AFP painting state converter
* @param dataStream the AFP datastream
*/
- public AFPBorderPainter(AFPPaintingState state, DataStream dataStream) {
- super(state, dataStream);
+ public AFPBorderPainter(AFPPaintingState paintingState, DataStream dataStream) {
+ super(paintingState, dataStream);
}
/** {@inheritDoc} */
- public void paint(PaintInfo paintInfo) {
- BorderPaintInfo borderPaintInfo = (BorderPaintInfo)paintInfo;
+ public void paint(PaintingInfo paintInfo) {
+ BorderPaintingInfo borderPaintInfo = (BorderPaintingInfo)paintInfo;
float w = borderPaintInfo.getX2() - borderPaintInfo.getX1();
float h = borderPaintInfo.getY2() - borderPaintInfo.getY1();
if ((w < 0) || (h < 0)) {
@@ -52,15 +51,15 @@ public class AFPBorderPainter extends AbstractAFPPainter {
int pageWidth = dataStream.getCurrentPage().getWidth();
int pageHeight = dataStream.getCurrentPage().getHeight();
- AFPUnitConverter unitConv = state.getUnitConverter();
- AffineTransform at = state.getData().getTransform();
+ AFPUnitConverter unitConv = paintingState.getUnitConverter();
+ AffineTransform at = paintingState.getData().getTransform();
float x1 = unitConv.pt2units(borderPaintInfo.getX1());
float y1 = unitConv.pt2units(borderPaintInfo.getY1());
float x2 = unitConv.pt2units(borderPaintInfo.getX2());
float y2 = unitConv.pt2units(borderPaintInfo.getY2());
- switch (state.getRotation()) {
+ switch (paintingState.getRotation()) {
case 0:
x1 += at.getTranslateX();
y1 += at.getTranslateY();
@@ -89,7 +88,7 @@ public class AFPBorderPainter extends AbstractAFPPainter {
AFPLineDataInfo lineDataInfo = new AFPLineDataInfo();
lineDataInfo.setColor(borderPaintInfo.getColor());
- lineDataInfo.setRotation(state.getRotation());
+ lineDataInfo.setRotation(paintingState.getRotation());
lineDataInfo.x1 = Math.round(x1);
lineDataInfo.y1 = Math.round(y1);
if (borderPaintInfo.isHorizontal()) {