public final class ScenePrinter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ScenePrinter.ScaleStrategy
Scaling strategies to be used for printing a scene.
|
Modifier and Type | Method and Description |
---|---|
static void |
print(Scene scene)
Print the scene exactly as it is.
|
static void |
print(Scene scene,
double scaleX,
double scaleY)
Print the Scene with specific scaling percentages for the horizontal and
vertical direction.
|
static void |
print(Scene scene,
PageFormat format)
Print the Scene with provided PageFormat.
|
static void |
print(Scene scene,
PageFormat format,
Rectangle region)
Print a specific section of the Scene according to the provided Format.
|
static void |
print(Scene scene,
PageFormat format,
ScenePrinter.ScaleStrategy scaleStrategy)
Print the Scene with the provided format and scale type.
|
static void |
print(Scene scene,
PageFormat format,
ScenePrinter.ScaleStrategy scaleStrategy,
double scaleX,
double scaleY,
boolean selectedOnly,
boolean visibleOnly,
Rectangle region,
List<LayerWidget> hiddenLayers)
This is the master print call.
|
static void |
print(Scene scene,
ScenePrinter.ScaleStrategy scaleStrategy)
Print the Scene with the default PageFormat and the provided scale type.
|
public static void print(Scene scene)
scene
- The Scene to be printed.public static void print(Scene scene, PageFormat format)
scene
- The Scene to be printed.format
- format used for printing Scene.public static void print(Scene scene, ScenePrinter.ScaleStrategy scaleStrategy)
scene
- The Scene to be printed.scaleStrategy
- Value representing the scaling strategy to use for the printing.public static void print(Scene scene, double scaleX, double scaleY)
scene
- The Scene to be printed.scaleX
- scaling percentage in the horizontal dimension.scaleY
- scaling percentage in the vertical dimension.public static void print(Scene scene, PageFormat format, ScenePrinter.ScaleStrategy scaleStrategy)
scene
- The Scene to be printed.format
- Format used for printing Scene.scaleStrategy
- Value representing the scaling strategy to use for the printing.public static void print(Scene scene, PageFormat format, Rectangle region)
scene
- The Scene to be printed.format
- Format used for printing Scene.region
- The rectangle representing the are of the Scene to be printed.public static void print(Scene scene, PageFormat format, ScenePrinter.ScaleStrategy scaleStrategy, double scaleX, double scaleY, boolean selectedOnly, boolean visibleOnly, Rectangle region, List<LayerWidget> hiddenLayers)
scene
- The Scene to be printed.format
- format used for printing Scene. If null then a new default
PageFormat is created.scaleStrategy
- value representing the how to scale the printing.scaleX
- Directly set the horizontal scale percentage. This parameter
is only used when the scale strategy is ScaleStrategy.SCALE_PERCENT. Otherwise
it is ignored.scaleY
- Directly set the vertical scale percentage. This parameter
is only used when the scale strategy is ScaleStrategy.SCALE_PERCENT. Otherwise
it is ignored.selectedOnly
- Print only the objects from the Scene that have been
selected. Note that in this case the Scene must be an instnace of an ObjectScene
since this is required to determine the selected objects.visibleOnly
- Print only the object in the visible window.region
- The rectangle representing the are of the Scene to be printed.hiddenLayers
- Layer that are not to be printed. Might be used to
hide the background while printing.