ae909269fbe4060e368adcc9fc32a9f6475fc32a
[debian/openrocket] / src / net / sf / openrocket / gui / print / PrintFigure.java
1 /*
2  * PrintFigure.java
3  */
4 package net.sf.openrocket.gui.print;
5
6 import net.sf.openrocket.gui.scalefigure.RocketFigure;
7 import net.sf.openrocket.rocketcomponent.Configuration;
8
9 /**
10  * A figure used to override the scale factor in RocketFigure.  This allows pinpoint scaling to allow a diagram
11  * to fit in the width of the chosen page size.
12  */
13 public class PrintFigure extends RocketFigure {
14
15     /**
16      * Constructor.
17      * 
18      * @param configuration  the configuration
19      */
20     public PrintFigure (final Configuration configuration) {
21         super(configuration);
22     }
23
24     protected double computeTy (int heightPx) {
25         super.computeTy(heightPx);
26         return 0;
27     }
28     
29     public void setScale (final double theScale) {
30         this.scale = theScale; //dpi/0.0254*scaling;
31         updateFigure();
32     }
33 }