* the x coordinate for the overlay
* @param y
* the y coordinate for the overlay
+ * @param width
+ * the width of the image
+ * @param height
+ * the height of the image
*/
- public void createIncludePageSegment(String name, int x, int y) {
+ public void createIncludePageSegment(String name, int x, int y, int width, int height) {
int xOrigin;
int yOrigin;
int orientation = paintingState.getRotation();
switch (orientation) {
case 90:
- xOrigin = currentPage.getWidth() - y;
- yOrigin = x;
+ xOrigin = x - height;
+ yOrigin = y;
break;
case 180:
- xOrigin = currentPage.getWidth() - x;
- yOrigin = currentPage.getHeight() - y;
+ xOrigin = x - width;
+ yOrigin = y - height;
break;
case 270:
- xOrigin = y;
- yOrigin = currentPage.getHeight() - x;
+ xOrigin = x;
+ yOrigin = y - height;
break;
default:
xOrigin = x;
if (name != null) {
float[] srcPts = {rect.x, rect.y};
int[] coords = unitConv.mpts2units(srcPts);
- getDataStream().createIncludePageSegment(name, coords[X], coords[Y]);
+ int width = Math.round(unitConv.mpt2units(rect.width));
+ int height = Math.round(unitConv.mpt2units(rect.height));
+
+ getDataStream().createIncludePageSegment(name, coords[X], coords[Y], width, height);
} else {
drawImageUsingURI(uri, rect);
}
String name = (String)pageSegmentMap.get(uri);
if (name != null) {
- float[] srcPts = {x, y};
+ float[] srcPts = {x, y, posInt.width, posInt.height};
int[] coords = unitConv.mpts2units(srcPts);
- dataStream.createIncludePageSegment(name, coords[X], coords[Y]);
+ int width = Math.round(unitConv.mpt2units(posInt.width));
+ int height = Math.round(unitConv.mpt2units(posInt.height));
+ dataStream.createIncludePageSegment(name, coords[X], coords[Y], width, height);
} else {
ImageManager manager = userAgent.getFactory().getImageManager();
ImageInfo info = null;
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Renderers" dev="CB" type="fix" fixes-bug="48453">
+ Bugfix: AFP Renderer: Page Segments not positioned correctly when reference-orientation != 0
+ </action>
<action context="Fonts" dev="JM" type="add">
Added support for TrueType fonts with symbol character maps (like "Wingdings" and "Symbol").
Character for these fonts are usually found in the 0xF020 to 0xF0FF range