public class Viewport extends Viewbox
hasWidthAndHeight, height, preserveAspectRatio, viewboxHeight, viewboxWidth, viewboxX, viewboxY, width| Constructor and Description |
|---|
Viewport() |
Viewport(double width,
double height) |
| Modifier and Type | Method and Description |
|---|---|
double |
getBestHeight()
Return the height.
|
double |
getBestWidth()
Return the "best" width.
|
double |
getDefaultPosition(double defaultValue,
boolean isWidth)
Return a default position.
|
double |
getScale()
Return the scale.
|
boolean |
isScaled()
Return true if lengths must be scaled.
|
boolean |
isScalingLineWidth()
Return true if line widths must be scaled.
|
double |
scaleLength(double length)
Scale a length value.
|
double |
scaleLineWidth(double width)
Scale a line width.
|
double |
scalePosition(double value,
boolean isWidth)
Scale a position value.
|
void |
scaleShape(javafx.scene.shape.Shape shape)
Scale a shape.
|
void |
setScale(double scale,
boolean scaleLineWidth)
Set the scale value.
|
getHeight, getViewboxHeight, getViewboxWidth, getViewboxX, getViewboxY, getWidth, hasWidthAndHeight, isPreservingAspectRatio, scaleNode, scaleValue, setPreserveAspectRatio, setViewboxpublic double getBestWidth()
public double getBestHeight()
public void scaleShape(javafx.scene.shape.Shape shape)
shape - the shapepublic double getDefaultPosition(double defaultValue,
boolean isWidth)
defaultValue - the default position valueisWidth - true for a widthpublic double scalePosition(double value,
boolean isWidth)
value - the positionisWidth - true for a widgdth coordinatepublic double scaleLength(double length)
length - the lengthpublic double scaleLineWidth(double width)
width - the line width.public void setScale(double scale,
boolean scaleLineWidth)
scale - the scalescaleLineWidth - true if line widths must also be scaledpublic double getScale()
public boolean isScaled()
public boolean isScalingLineWidth()
Copyright © 2021, 2022, 2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence