aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-05 10:15:51 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-05 10:15:51 +0000
commite4de9639e4759965d90070b010d5fd80f919c7bc (patch)
tree9eb116ac165496e444867603cc35b4eda6e3b084 /src/java/org
parentefbd0e3b92621f3bbeb0cfdc0898098dc5c8b82e (diff)
downloadxmlgraphics-fop-e4de9639e4759965d90070b010d5fd80f919c7bc.tar.gz
xmlgraphics-fop-e4de9639e4759965d90070b010d5fd80f919c7bc.zip
State --> PaintingState cleanup.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@711549 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphics2D.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/java/org/apache/fop/afp/AFPGraphics2D.java b/src/java/org/apache/fop/afp/AFPGraphics2D.java
index 190e5e465..dd9a0dc03 100644
--- a/src/java/org/apache/fop/afp/AFPGraphics2D.java
+++ b/src/java/org/apache/fop/afp/AFPGraphics2D.java
@@ -98,7 +98,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
private AFPResourceInfo resourceInfo = null;
/** Current AFP state */
- private AFPPaintingState state = null;
+ private AFPPaintingState paintingState = null;
/** The AFP FontInfo */
private FontInfo fontInfo;
@@ -128,7 +128,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
this.customTextHandler = g2d.customTextHandler;
this.resourceManager = g2d.resourceManager;
this.resourceInfo = g2d.resourceInfo;
- this.state = g2d.state;
+ this.paintingState = g2d.paintingState;
}
/**
@@ -176,7 +176,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
// set line type/style (note: this is an approximation at best!)
float[] dashArray = basicStroke.getDashArray();
- if (state.setDashArray(dashArray)) {
+ if (paintingState.setDashArray(dashArray)) {
byte type = GraphicsSetLineType.DEFAULT; // normally SOLID
if (dashArray != null) {
type = GraphicsSetLineType.DOTTED; // default to plain DOTTED if dashed line
@@ -224,7 +224,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
}
Color color = getColor();
- if (state.setColor(color)) {
+ if (paintingState.setColor(color)) {
graphicsObj.setColor(color);
}
@@ -422,7 +422,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
- imageObjectInfo.setBitsPerPixel(state.getBitsPerPixel());
+ imageObjectInfo.setBitsPerPixel(paintingState.getBitsPerPixel());
imageObjectInfo.setResourceInfo(resourceInfo);
@@ -432,7 +432,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
int dataWidth = renderedImage.getWidth();
imageObjectInfo.setDataWidth(dataWidth);
- boolean colorImages = state.isColorImages();
+ boolean colorImages = paintingState.isColorImages();
imageObjectInfo.setColor(colorImages);
ByteArrayOutputStream boas = new ByteArrayOutputStream();
@@ -442,7 +442,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
// convert to grayscale
if (!colorImages) {
boas.reset();
- int bitsPerPixel = state.getBitsPerPixel();
+ int bitsPerPixel = paintingState.getBitsPerPixel();
imageObjectInfo.setBitsPerPixel(bitsPerPixel);
ImageEncodingHelper.encodeRGBAsGrayScale(
imageData, dataWidth, dataHeight, bitsPerPixel, boas);
@@ -464,7 +464,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
objectAreaInfo.setX(Math.round(dstPts[X]));
objectAreaInfo.setY(Math.round(dstPts[Y]));
- AFPUnitConverter unitConv = state.getUnitConverter();
+ AFPUnitConverter unitConv = paintingState.getUnitConverter();
int w = Math.round(unitConv.pt2units(width));
objectAreaInfo.setWidth(w);
@@ -472,7 +472,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
int h = Math.round(unitConv.pt2units(height));
objectAreaInfo.setHeight(h);
- int resolution = state.getResolution();
+ int resolution = paintingState.getResolution();
objectAreaInfo.setWidthRes(resolution);
objectAreaInfo.setHeightRes(resolution);
@@ -577,19 +577,19 @@ public class AFPGraphics2D extends AbstractGraphics2D {
/**
* Sets the AFP painting state
*
- * @param state the AFP painting state
+ * @param paintingState the AFP painting state
*/
- public void setPaintingState(AFPPaintingState state) {
- this.state = state;
+ public void setPaintingState(AFPPaintingState paintingState) {
+ this.paintingState = paintingState;
}
/**
- * Returns the AFP state
+ * Returns the AFP painting state
*
- * @return the AFP state
+ * @return the AFP painting state
*/
public AFPPaintingState getPaintingState() {
- return this.state;
+ return this.paintingState;
}
/**