Browse Source

Superseded by the BlockArea inner class BlockAllocationRectangle


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197834 13f79535-47bb-0310-9956-ffa450edef68
tags/Defoe_export
Peter Bernard West 20 years ago
parent
commit
26a0d83514

+ 0
- 62
src/java/org/apache/fop/area/BlockAllocationRectangle.java View File

@@ -1,62 +0,0 @@
/*
*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Created on 17/06/2004
* $Id$
*/
package org.apache.fop.area;


/**
* @author pbw
* @version $Revision$ $Name$
*/
public class BlockAllocationRectangle extends AreaFrame implements
AllocationRectangle {

private PaddingRectangle padding;
private BorderRectangle borders;
private SpacesRectangle spaces;

/**
* @param area
* @param contents
*/
public BlockAllocationRectangle(Area area) {
// For block-areas, the allocation-area is bounded in the
// block-progression-direction by the border-rectangle, and in the
// inline-progression-direction by the spaces-rectangle.
// See 4.2.3 Geometric Definitions
// The contents of the BlockAllocationRectangle is the ContentRectangle.
// Initally, set up the AreaFrame representing the allocation
// rectangle to co-incide with the content-rectangle.
super(area, area.getContent());
// Now extend the AreaFrame to co-incide with the
// edges of the border rectangle in the BPDir, and with the edges of
// the spaces rectangle in the IPDir.
padding = area.getPadding();
borders = area.getBorders();
spaces = area.getSpaces();
setAllocationFrame();
}

public void setAllocationFrame() {
setStart(spaces.getStart() + borders.getStart() + padding.getStart());
setEnd(spaces.getEnd() + borders.getEnd() + padding.getEnd());
setBefore(borders.getBefore() + padding.getBefore());
setAfter(borders.getAfter() + padding.getAfter());
}
}

+ 0
- 58
src/java/org/apache/fop/area/BlockContentRectangle.java View File

@@ -1,58 +0,0 @@
/*
*
* Copyright 2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Created on 17/06/2004
* $Id$
*/
package org.apache.fop.area;


/**
* @author pbw
* @version $Revision$ $Name$
*/
public class BlockContentRectangle extends ContentRectangle {

/**
* @param area
*/
public BlockContentRectangle(Area area) {
super(area);
// TODO Auto-generated constructor stub
}

/**
* @param area
* @param ipOrigin
* @param bpOrigin
* @param ipDim
* @param bpDim
*/
public BlockContentRectangle(Area area, double ipOrigin, double bpOrigin,
double ipDim, double bpDim) {
super(area, ipOrigin, bpOrigin, ipDim, bpDim);
// TODO Auto-generated constructor stub
}

private BlockAllocationRectangle allocation;

public void setBlockAllocationRectangle(
BlockAllocationRectangle allocation) {
this.allocation = allocation;
// Set the content dimension of the allocation rectangle
}
}

Loading…
Cancel
Save