1 51 package org.apache.fop.image; 52 53 import org.apache.fop.layout.*; 54 import org.apache.fop.layout.inline.*; 55 56 import org.apache.fop.render.Renderer; 57 58 public class ImageArea extends InlineArea { 59 60 protected int xOffset = 0; 61 protected int align; 62 protected int valign; 63 protected FopImage image; 64 65 66 public ImageArea(FontState fontState, FopImage img, int AllocationWidth, 67 int width, int height, int startIndent, int endIndent, 68 int align) { 69 super(fontState, width, 0, 0, 0); 70 this.currentHeight = height; 71 this.contentRectangleWidth = width; 72 this.height = height; 73 this.image = img; 74 this.align = align; 75 76 96 } 97 98 public int getXOffset() { 99 return this.xOffset; 100 } 101 102 public FopImage getImage() { 103 return this.image; 104 } 105 106 public void render(Renderer renderer) { 107 renderer.renderImageArea(this); 108 } 109 110 public int getImageHeight() { 111 return currentHeight; 112 } 113 114 public void setAlign(int align) { 115 this.align = align; 116 } 117 118 public int getAlign() { 119 return this.align; 120 } 121 122 public void setVerticalAlign(int align) { 123 this.valign = align; 124 } 125 126 public int getVerticalAlign() { 127 return this.valign; 128 } 129 130 public void setStartIndent(int startIndent) { 131 xOffset = startIndent; 132 } 133 134 135 136 } 137 138 139 | Popular Tags |