Revision 13402 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/layout/Attributes.java

View differences:

Attributes.java
602 602
				m_type = MediaSizeName.PERSONAL_ENVELOPE;
603 603

  
604 604
				if (isLandSpace()) {
605
					m_sizePaper = new Size(CUSTOM_PAPER_SIZE.getAncho(),
606
							CUSTOM_PAPER_SIZE.getAlto());
605
					m_sizePaper = new Size(CUSTOM_PAPER_SIZE.getAncho()*m_TypeUnit,
606
						CUSTOM_PAPER_SIZE.getAlto()*m_TypeUnit);
607 607
				} else {
608
					m_sizePaper = CUSTOM_PAPER_SIZE;
608
					m_sizePaper = new Size(CUSTOM_PAPER_SIZE.getAlto()*m_TypeUnit,
609
						CUSTOM_PAPER_SIZE.getAncho()*m_TypeUnit);
609 610
				}
610 611

  
611 612
				break;
......
696 697
			case (CUSTOM):
697 698

  
698 699
				if (isLand) {
699
					size = new Size(CUSTOM_PAPER_SIZE.getAncho(),
700
							CUSTOM_PAPER_SIZE.getAlto());
700
					size = new Size(CUSTOM_PAPER_SIZE.getAncho()*m_TypeUnit,
701
							CUSTOM_PAPER_SIZE.getAlto()*m_TypeUnit);
701 702
				} else {
702
					size = CUSTOM_PAPER_SIZE;
703
					size = new Size(CUSTOM_PAPER_SIZE.getAlto()*m_TypeUnit,
704
							CUSTOM_PAPER_SIZE.getAncho()*m_TypeUnit);
703 705
				}
704 706

  
705 707
				break;
......
829 831
	 * @param rect rectangle.
830 832
	 *
831 833
	 */
832
	public void obtainRect(Rectangle2D rect) {
834
	public void obtainRect(boolean isPrint, Rectangle2D rect, int w, int h) {
833 835
		double value1 = 0;
834 836
		double value2 = 0;
835 837

  
836
//		if (!isPrint) {
837
//			if (isLandSpace()) {
838
//				anchoXalto = m_sizePaper.getAncho() / m_sizePaper.getAlto();
839
//				rect = getRectangleLandscape(rect, w, h);
840
//			} else {
841
//				anchoXalto = m_sizePaper.getAlto() / m_sizePaper.getAncho();
842
//				rect = getRectanglePortrait(rect, w, h);
843
//			}
844
//		} else {
838
		if (!isPrint) {
839
			if (isLandSpace()) {
840
				anchoXalto = m_sizePaper.getAncho() / m_sizePaper.getAlto();
841
				rect = getRectangleLandscape(rect, w, h);
842
			} else {
843
				anchoXalto = m_sizePaper.getAlto() / m_sizePaper.getAncho();
844
				rect = getRectanglePortrait(rect, w, h);
845
			}
846
		} else {
845 847
			value1 = m_sizePaper.getAncho();
846 848
			value2 = m_sizePaper.getAlto();
847 849
			rect.setRect(0, 0, ((value1 / PULGADA) * DPI),
848 850
				((value2 / PULGADA) * DPI));
849
//		}
851
		}
850 852

  
851 853
		setDistanceUnitX(rect);
852 854
		setDistanceUnitY(rect);

Also available in: Unified diff